/* Erste-Schicht-Testdruck: Logo-Gruen als Bettflaeche, weisse Filamentlinien, Raster */
/* Chakra Petch (SIL OFL 1.1, Lizenz: cg/fonts/OFL.txt), selbst gehostet */
@font-face { font-family: "Chakra Petch"; font-weight: 400; font-style: normal; font-display: swap; src: url("cg/fonts/ChakraPetch-Regular.ttf") format("truetype"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-style: normal; font-display: swap; src: url("cg/fonts/ChakraPetch-SemiBold.ttf") format("truetype"); }

:root {
  --green: #02301a;
  --white: #ffffff;
  --grey: #bcbcbc;      /* Text auf Gruen: 5.5:1 */
  --grey-deep: #808080; /* nur Deko (Raster, Geisterziffern), nie Text */
  --pitch: 32px;        /* Rasterabstand, alles rastet darauf ein */
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--green); color-scheme: dark; }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--white);
  background-color: var(--green);
  background-image:
    linear-gradient(to right, rgba(188, 188, 188, .13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(188, 188, 188, .13) 1px, transparent 1px);
  background-size: var(--pitch) var(--pitch);
  background-position: calc(var(--gutter) - 1px) calc(var(--gutter) - 1px);
  font-family: "Chakra Petch", Bahnschrift, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--white); color: var(--green); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
html { scrollbar-color: var(--grey-deep) var(--green); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Bettrand */
.bed {
  min-height: 100svh;
  margin: 0;
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.5vh, 48px);
  position: relative;
}
.bed::before {
  content: "";
  position: absolute;
  inset: calc(var(--gutter) / 2);
  border: 1px solid rgba(255, 255, 255, .38);
  pointer-events: none;
}

.intro {
  padding-top: clamp(8px, 3vh, 32px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2.5vh, 24px) var(--pitch);
  align-items: end;
}
@media (min-width: 900px) {
  .intro { grid-template-columns: auto 1fr; }
  .soon { justify-self: end; text-align: left; font-size: clamp(1.5rem, 2.6vw, 2.4rem); max-width: 16ch; }
}

/* Passermarken wie auf einem Testblatt: Kreuze an den Rahmenecken, Millimeter-Ticks am oberen Rand */
.bed::after {
  content: "";
  position: absolute;
  inset: calc(var(--gutter) / 2 - 9px);
  pointer-events: none;
  background:
    linear-gradient(var(--white), var(--white)) 0 9px / 19px 1px no-repeat,
    linear-gradient(var(--white), var(--white)) 9px 0 / 1px 19px no-repeat,
    linear-gradient(var(--white), var(--white)) 100% 9px / 19px 1px no-repeat,
    linear-gradient(var(--white), var(--white)) calc(100% - 9px) 0 / 1px 19px no-repeat,
    linear-gradient(var(--white), var(--white)) 0 calc(100% - 9px) / 19px 1px no-repeat,
    linear-gradient(var(--white), var(--white)) 9px 100% / 1px 19px no-repeat,
    linear-gradient(var(--white), var(--white)) 100% calc(100% - 9px) / 19px 1px no-repeat,
    linear-gradient(var(--white), var(--white)) calc(100% - 9px) 100% / 1px 19px no-repeat,
    repeating-linear-gradient(to right, rgba(255, 255, 255, .6) 0 1px, transparent 1px var(--pitch)) 0 9px / 100% 7px no-repeat;
}
h1 { margin: 0; font-weight: 400; }
.hello {
  display: block;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  color: var(--white);
  margin-bottom: 12px;
}
.logo { display: block; width: clamp(260px, 74vw, 640px); height: auto; }
.soon {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  max-width: 28ch;
  text-wrap: balance;
}

/* Countdown aus gezeichneten Blockziffern */
.timer { display: grid; gap: 22px; }
.digits { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: clamp(10px, 2vw, 32px); align-items: flex-end; }
.unit { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.glyphs { display: flex; gap: clamp(4px, .9vw, 10px); }
.glyphs svg { display: block; height: clamp(60px, min(15.5vw, 14vh), 224px); width: auto; }
.seg-on { fill: var(--white); }
.seg-off { fill: var(--grey-deep); opacity: .22; }
.unit-label { font-size: .9rem; color: var(--grey); letter-spacing: .04em; }
.pass-marks { display: flex; justify-content: space-between; gap: 16px; margin: -6px 0 0; font-size: .9rem; color: var(--grey); }

/* Filamentbahn: dreibahnige Fuellung, waechst mit dem Fortschritt */
.pass { width: 100%; height: auto; display: block; overflow: visible; }
.pass-ghost { stroke: var(--grey-deep); stroke-width: 3; opacity: .6; }
.pass-tick { stroke: var(--grey-deep); stroke-width: 1; opacity: .8; }
.pass-line { stroke: var(--white); stroke-width: 6; stroke-linecap: butt; }
.pass-nozzle { fill: var(--white); }

/* Eine Bewegung: die geaenderte Ziffer leuchtet kurz auf */
.glyphs svg.flash .seg-on { animation: segflash .6s cubic-bezier(.16, 1, .3, 1); }
@keyframes segflash { from { fill: var(--grey); opacity: .55; } to { fill: var(--white); opacity: 1; } }

/* Teststeine: randlose Zeile, 1px-Konturen, feste Teilung */
.tiles {
  margin-top: auto;
  padding-top: var(--pitch);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pitch);
  align-items: end;
}
.tile-group {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--white);
}
/* Tools: eigene Gruppe, etwas leiser als Shop und E-Mail */
.tools { border-color: rgba(255, 255, 255, .6); }
.group-label {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  font-size: .9rem; letter-spacing: .04em; color: var(--grey);
}
.tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  padding: calc(var(--pitch) * .6) calc(var(--pitch) * .6) calc(var(--pitch) * .7);
  min-height: calc(var(--pitch) * 4);
  color: var(--white);
  text-decoration: none;
  border-left: 1px solid var(--white);
  transition: background-color .2s ease, color .2s ease;
}
.tile:first-of-type { border-left: 0; }
.tools .group-label + .tile { border-left: 0; }
.tile-name { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.1; font-weight: 600; }
.tile-note { font-size: 1rem; color: var(--grey); overflow-wrap: anywhere; align-self: end; }
.arrow {
  position: absolute; top: calc(var(--pitch) * .6); right: calc(var(--pitch) * .6);
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: square; transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.tile:hover, .tile:focus-visible { background: var(--white); color: var(--green); outline-offset: -4px; }
.tile:hover .tile-note, .tile:focus-visible .tile-note { color: var(--green); }
.tile:hover .arrow, .tile:focus-visible .arrow { transform: translate(3px, -3px); }
.tools .tile-name { font-size: clamp(1.25rem, 2.4vw, 1.8rem); }
.tools .tile-note { color: var(--grey); }
/* Hilfe-Links: je einer unter seiner Kachel, Tap-Ziel 44 px */
.tile-help { display: flex; align-items: center; min-height: 44px; padding: 0 calc(var(--pitch) * .6); color: var(--grey); text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .6); transition: background-color .2s ease, color .2s ease; }
.tile-help + .tile-help { border-left: 1px solid rgba(255, 255, 255, .6); }
.tile-help:hover, .tile-help:focus-visible { background: var(--white); color: var(--green); outline-offset: -4px; }

/* Rechtliches: kaum sichtbar, rechts unten im Raster */
.legal { display: flex; justify-content: flex-end; gap: calc(var(--pitch) * .75); margin-top: -8px; }
.legal a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; color: var(--grey); text-decoration: none; opacity: .75; }
.legal a:hover, .legal a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; row-gap: calc(var(--pitch) + 12px); }
}
/* Handy: 2x2-Ziffern, damit die Einheiten nicht zu "54004612" verschmelzen */
@media (max-width: 600px) {
  .digits { display: grid; grid-template-columns: 1fr 1fr; row-gap: 22px; column-gap: 28px; }
  .glyphs svg { height: clamp(56px, 20vw, 96px); }
  .pass-marks { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pass-line, .tile, .tile-help, .arrow { transition: none; }
}

/* Textseiten (Impressum, Datenschutz): gleiche Bettflaeche, ruhige Lesespalte */
.doc-bed { min-height: 100svh; padding: var(--gutter); position: relative; }
.doc-bed::before { content: ""; position: absolute; inset: calc(var(--gutter) / 2); border: 1px solid rgba(255, 255, 255, .38); pointer-events: none; }
.doc { max-width: 70ch; margin: 0 auto; padding: clamp(8px, 3vh, 32px) 0 calc(var(--pitch) * 2); }
.doc .back { display: inline-flex; align-items: center; min-height: 44px; color: var(--grey); text-decoration: none; margin-bottom: calc(var(--pitch) - 12px); }
.doc .back:hover, .doc .back:focus-visible { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 600; line-height: 1.15; margin: 0 0 var(--pitch); text-wrap: balance; }
.doc h2 { font-size: 1.25rem; font-weight: 600; margin: calc(var(--pitch) * 1.25) 0 8px; }
.doc p, .doc li { margin: 0 0 12px; }
.doc ul { padding-left: 1.2em; margin: 0 0 12px; }
.doc a { color: var(--white); text-underline-offset: 3px; }
.doc address { font-style: normal; margin: 0 0 12px; }
.doc .stand { color: var(--grey); font-size: .9rem; margin-top: calc(var(--pitch) * 1.5); }
mark.todo { background: rgba(255, 255, 255, .18); color: var(--white); outline: 1px dashed var(--white); padding: 0 4px; }

/* Hilfe-Uebersicht */
.doc .lead { color: var(--grey); margin: 0 0 var(--pitch); }
.doc .help-links { display: flex; flex-wrap: wrap; gap: 4px var(--pitch); margin: 0 0 12px; }
.doc .help-links a { display: inline-flex; align-items: center; min-height: 44px; }
