/* hostwebhub – ein Homescreen an der grünen Stiegenhaus-Wand.
   Jede App ist eine Kachel in ihrer eigenen Farbe mit einem gezeichneten Symbol. */

@font-face {
  font-family: 'Overpass';
  src: url(/fonts/overpass-latin.woff2) format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Overpass';
  src: url(/fonts/overpass-latin-ext.woff2) format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --wall: #123A33;
  --wall-deep: #0D2B26;
  --wall-light: #EAF2EE;
  --wall-mute: #A3C2B8;
  --ink: #14181B;
  --badge: #E5243B;
  --focus: #FFC94D;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Overpass', system-ui, sans-serif;
  font-size: 1rem; line-height: 1.5;
  color: var(--wall-light);
  background-color: var(--wall);
  /* Verputz: zwei feine Punktraster und ein wenig Licht von oben */
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255,255,255,.09), transparent 70%),
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.3px),
    radial-gradient(rgba(0,0,0,.14) 1px, transparent 1.5px);
  background-size: auto, 5px 5px, 7px 7px;
  background-position: 0 0, 0 0, 2px 3px;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
html[lang=de] [data-only=en], html[lang=en] [data-only=de] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ─── Kopf ─── */
.top {
  width: 100%; max-width: 940px; margin: 0 auto;
  padding: clamp(20px, 5vw, 48px) clamp(20px, 4vw, 32px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  font-weight: 900; line-height: 1;
  letter-spacing: -.035em;
}
.lang { color: var(--wall-mute); font-weight: 700; padding: 8px 2px; text-decoration: underline; text-underline-offset: 4px; }
.lang:hover { color: var(--wall-light); }

/* ─── Kacheln ─── */
.home {
  flex: 1;
  width: 100%; max-width: 940px; margin: 0 auto;
  padding: 10px clamp(20px, 4vw, 32px) 32px;
}
.lede { font-size: 1.0625rem; color: var(--wall-mute); }

.apps {
  list-style: none;
  margin: clamp(28px, 6vw, 56px) -10px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 6px;
}
@media (min-width: 720px) {
  .apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 20px; }
}

.app {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 4px 6px 6px;
  color: var(--wall-light); text-decoration: none;
  border-radius: 18px;
  -webkit-tap-highlight-color: transparent;
}
.app:focus-visible { outline: none; }
.app:focus-visible .icon { outline: 3px solid var(--focus); outline-offset: 5px; }

.icon {
  position: relative;
  display: grid; place-items: center;
  width: clamp(72px, 21vw, 104px); aspect-ratio: 1;
  border-radius: 27%;
  color: var(--ink);
  background:
    linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,0) 48%),
    var(--c, #3C6E62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -3px 0 rgba(0,0,0,.14),
    0 1px 0 rgba(0,0,0,.25),
    0 14px 22px -12px rgba(0,0,0,.75);
  transition: transform .14s ease-out;
}
.icon svg { width: 58%; height: 58%; overflow: visible; }
.icon .line { fill: none; stroke: var(--ink, #fff); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: var(--ink, #fff); }
.icon .letter { fill: var(--ink, #fff); font: 900 22px 'Overpass', system-ui, sans-serif; }

/* roter Hinweis an der Ecke, wie eine Benachrichtigung am Handy */
.badge {
  position: absolute; top: -7px; right: -9px;
  min-width: 34px; padding: 4px 7px 2px;
  border-radius: 999px;
  background: var(--badge); color: #fff;
  font-size: .8125rem; font-weight: 900; line-height: 1.1; letter-spacing: -.01em;
  box-shadow: 0 0 0 3px var(--wall);
}

.name { margin-top: 12px; font-size: 1.0625rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.short { margin-top: 3px; max-width: 18ch; font-size: .875rem; line-height: 1.3; color: var(--wall-mute); }

@media (hover: hover) {
  .app:hover .icon { transform: translateY(-4px) rotate(-2deg); }
  .app:hover .name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
}
.app:active .icon { transform: scale(.93); transition-duration: .06s; }

@media (max-width: 420px) {
  .name { font-size: 1rem; }
  .short { font-size: .8125rem; }
  .badge { top: -6px; right: -7px; min-width: 30px; font-size: .75rem; }
}

/* Einmal beim Laden: die Kacheln springen der Reihe nach auf, wie beim Entsperren eines Handys */
@media (prefers-reduced-motion: no-preference) {
  body:not(.settled) .app { animation: pop .42s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
  @keyframes pop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
}

.noscript { text-align: center; font-weight: 700; padding: 16px; }

/* ─── Werbebanner Volt-Bet: fällt bewusst aus der grünen Wand heraus, wie ein Neonschild ─── */
.ad {
  --vb-bg: #070B0F; --volt: #D4FF1E; --vb-text: #F2F5F7; --vb-mute: #9AA6B2;
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: clamp(48px, 9vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 26%, 230px); align-items: center; gap: 12px;
  padding: clamp(22px, 4vw, 36px) clamp(20px, 4vw, 40px);
  border-radius: 22px;
  color: var(--vb-text);
  background:
    radial-gradient(circle at 82% 45%, rgba(212,255,30,.20), transparent 46%),
    linear-gradient(rgba(212,255,30,.05) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(212,255,30,.05) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--vb-bg);
  border: 1px solid rgba(212,255,30,.35);
  box-shadow: 0 0 0 1px #000, 0 22px 40px -18px rgba(0,0,0,.8), 0 0 50px -20px rgba(212,255,30,.45);
}
.ad-body { grid-column: 1; grid-row: 1; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ad-tags { display: flex; gap: 8px; }
.ad-tag { padding: 3px 9px 1px; border-radius: 6px; font-size: .75rem; font-weight: 800; color: var(--vb-mute); border: 1px solid rgba(154,166,178,.45); }
.ad-tag.ad-age { color: #fff; background: var(--badge); border-color: var(--badge); }
.ad-brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ad-word { font-size: 1.375rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.ad-word b { color: var(--volt); font-weight: 900; }
.ad-kind { font-size: .8125rem; font-weight: 700; color: var(--vb-mute); }
.ad-title {
  font-size: clamp(2rem, 6.4vw, 3.6rem); font-weight: 900; line-height: .98; letter-spacing: -.045em;
  color: var(--volt); text-shadow: 0 0 22px rgba(212,255,30,.45);
}
.ad-text { max-width: 46ch; color: var(--vb-text); opacity: .88; }
.ad-games { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.ad-games li { padding: 4px 11px 2px; border-radius: 999px; font-size: .875rem; font-weight: 700; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.ad-btn {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 2px 24px 0;
  border-radius: 14px; background: var(--volt); color: var(--vb-bg); text-decoration: none;
  font-size: 1.125rem; font-weight: 900; letter-spacing: -.01em;
  box-shadow: 0 0 0 3px rgba(212,255,30,.25), 0 10px 26px -8px rgba(212,255,30,.6);
  transition: transform .14s ease-out, box-shadow .14s ease-out;
}
.ad-btn svg { width: 20px; height: 20px; fill: currentColor; margin-top: -2px; }
.ad-btn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (hover: hover) { .ad-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(212,255,30,.3), 0 14px 30px -8px rgba(212,255,30,.75); } }
.ad-btn:active { transform: scale(.97); }
.ad-fine { font-size: .8125rem; line-height: 1.4; color: var(--vb-mute); max-width: 52ch; }

.ad-art { grid-column: 2; grid-row: 1; width: 100%; height: auto; overflow: visible; }
.ad-bolt { fill: var(--volt); stroke: #F7FFD0; stroke-width: 3; stroke-linejoin: round; }
.ad-bolt-glow { fill: var(--volt); filter: blur(14px); opacity: .7; }
.ad-arc { fill: none; stroke: var(--volt); stroke-width: 3; stroke-linecap: round; opacity: .55; }

/* Am Handy steht der Blitz groß hinter dem Text */
@media (max-width: 640px) {
  .ad { grid-template-columns: minmax(0, 1fr); }
  .ad-art { grid-column: 1; grid-row: 1; justify-self: end; align-self: start; width: 40%; margin: -14px -18px 0 0; opacity: .2; }
}

/* Einmal beim Laden: der Blitz flackert an wie eine Neonröhre */
@media (prefers-reduced-motion: no-preference) {
  .ad-bolt, .ad-bolt-glow, .ad-arc { animation: neon 1.1s steps(1, end) .7s both; }
  @keyframes neon { 0% { opacity: .08; } 12% { opacity: 1; } 18% { opacity: .1; } 30% { opacity: 1; } 34% { opacity: .2; } 46%, 100% { opacity: 1; } }
  .ad-arc { animation-name: neonArc; }
  @keyframes neonArc { 0% { opacity: 0; } 12% { opacity: .55; } 18% { opacity: 0; } 30% { opacity: .55; } 34% { opacity: 0; } 46%, 100% { opacity: .55; } }
  .ad-bolt-glow { animation-name: neonGlow; }
  @keyframes neonGlow { 0% { opacity: 0; } 12% { opacity: .7; } 18% { opacity: 0; } 30% { opacity: .7; } 34% { opacity: .1; } 46%, 100% { opacity: .7; } }
}

/* ─── Fuß ─── */
.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.link { color: var(--wall-mute); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.link:hover { color: var(--wall-light); }

/* ─── Impressum und Datenschutz ─── */
dialog { border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(6, 24, 20, .7); }
.doc { margin: auto; width: min(100% - 24px, 680px); max-height: min(100dvh - 24px, 900px); background: #F7F8F8; border-radius: 14px; padding: 0; }
.doc article { padding: 32px 24px 36px; }
.doc h2 { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 18px; padding-right: 44px; }
.doc h3 { font-size: 1.0625rem; font-weight: 800; margin: 20px 0 6px; }
.doc p { line-height: 1.6; max-width: 68ch; }
.doc a { color: #0E6B57; }
.doc-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 44px; height: 44px; border-radius: 50%; background: var(--wall-deep); color: #fff; font-size: 26px; line-height: 1; }

/* ─── 404 ─── */
.lost { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 20px; }
.lost-icon { --c: #3C6E62; --ink: #fff; margin-bottom: 14px; }
.lost h1 { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.lost p { color: var(--wall-mute); }
.lost .back { margin-top: 14px; color: var(--wall-light); font-weight: 800; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}
