/* ==========================================================================
   HandicapLab — Website
   Design-System „Range x Fairway Gruen". Dark ist der Leitmodus, Light die
   Ableitung. Fairway Gruen ist der einzige Signalton: Marke, Aktiv-Zustand,
   Verbesserung. Kein Systemblau, keine zweite Aktionsfarbe.

   Radien-Regel (eine, ueberall): Karten und Bento-Zellen 22px, Flaechen
   innerhalb einer Karte 14px, alles Interaktive voll gerundet (Pill).
   Geraeterahmen 44px aussen / 36px innen (aussen minus Polsterung).
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  /* Graphit — Dark, Leitmodus */
  --base: #07090A;  --surf: #101416;  --surf2: #171D1F;  --line: #232B2E;
  --ink:  #F3F6F5;  --ink2: #9BA6A8;  --ink3: #626D70;

  /* Fairway Gruen */
  --acc: #4FCB6A;        /* Flaeche, in beiden Modi identisch */
  --acc-ink: #06170C;    /* einzige Schriftfarbe auf der Flaeche */
  --acc-text: #4FCB6A;   /* Fairway als Schrift/Linie — Dark */
  --acc-07: rgba(79, 203, 106, .07);
  --acc-14: rgba(79, 203, 106, .14);
  --acc-28: rgba(79, 203, 106, .28);

  --hair: inset 0 0 0 1px rgba(255, 255, 255, .055);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .04);
  --wash: rgba(255, 255, 255, .06);

  --r-card: 22px;
  --r-in: 14px;
  --r-pill: 999px;

  --shell: 1180px;
  --gap: clamp(1rem, 2.2vw, 1.5rem);
  --sec: clamp(4.5rem, 9vw, 8rem);

  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --base: #EFF2F1;  --surf: #FFFFFF;  --surf2: #F7F9F8;  --line: #DFE4E3;
    --ink:  #0A0F10;  --ink2: #57625F;  --ink3: #8B9694;
    --acc-text: #1F7A3D;   /* R4: Fairway als Schrift nur so im Hellmodus */
    --hair: inset 0 0 0 1px #DFE4E3;
    --lift: inset 0 1px 0 #fff, inset 0 0 0 1px #DFE4E3;
    --wash: rgba(10, 15, 16, .055);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

a { color: var(--acc-text); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--acc-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.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;
}

/* ---------- Navigation: eine Zeile, 64px ---------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  height: 64px;
  background: color-mix(in srgb, var(--base) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .shell { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: .625rem; color: var(--ink); text-decoration: none; font-weight: 660; letter-spacing: -.015em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.75rem); }
.nav-links a { color: var(--ink2); text-decoration: none; font-size: .95rem; font-weight: 560; white-space: nowrap; transition: color .2s ease; }
.nav-links a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .nav-links a[data-secondary] { display: none; }
  /* Auf schmalen Screens quetscht space-between die Brand in die Links:
     der Name fliegt raus, das Icon bleibt als Marke. */
  .brand { flex-shrink: 0; }
  .brand span { display: none; }
}

/* ---------- Bausteine ----------------------------------------------------- */

.eyebrow {
  display: block;
  font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--acc-text); margin: 0 0 .875rem;
}

h1, h2, h3 { margin: 0; font-weight: 720; letter-spacing: -.035em; line-height: 1.06; }
/* Hero-Headline ist fuenf Woerter lang und bricht auf zwei Zeilen. Die
   Obergrenze der Skala ist danach bemessen, nicht umgekehrt. */
h1 { font-size: clamp(2.15rem, 4.3vw, 3.4rem); letter-spacing: -.042em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.1875rem; letter-spacing: -.02em; line-height: 1.3; }

.lede { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--ink2); max-width: 54ch; margin: 1.25rem 0 0; }
.muted { color: var(--ink2); }
.tiny { font-size: .8125rem; color: var(--ink3); }

section { padding: var(--sec) 0; }
section + section { border-top: 1px solid var(--line); }

/* Buttons — alles Interaktive ist voll gerundet */
.btn {
  display: inline-flex; align-items: center; gap: .625rem;
  padding: .8125rem 1.375rem;
  border-radius: var(--r-pill);
  font-size: 1rem; font-weight: 660; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: transform .18s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--acc); color: var(--acc-ink); }
.btn-primary:hover { background: #3FBC5B; color: var(--acc-ink); }
.btn-ghost { background: var(--wash); color: var(--ink); box-shadow: var(--hair); }
.btn-ghost:hover { background: var(--surf2); color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Statusmarke statt Store-Badge, solange die App nicht freigegeben ist */
.status {
  display: inline-flex; align-items: center; gap: .625rem;
  padding: .8125rem 1.375rem;
  border-radius: var(--r-pill);
  background: var(--acc-14);
  box-shadow: inset 0 0 0 1px var(--acc-28);
  color: var(--acc-text);
  font-size: 1rem; font-weight: 660; letter-spacing: -.01em; white-space: nowrap;
}
.status svg { width: 17px; height: 17px; flex: none; }

.card { background: var(--surf); border-radius: var(--r-card); box-shadow: var(--lift); padding: clamp(1.375rem, 2.4vw, 1.875rem); }

/* Geraeterahmen — konzentrisch: 44px aussen, 8px Polsterung, 36px innen.
   Das Geraet bleibt in beiden Modi dunkel: es ist eine Produktabbildung,
   kein Seitenhintergrund. */
.device { border-radius: 44px; padding: 8px; background: linear-gradient(150deg, #3B4447, #12181A 55%, #2B3336); box-shadow: 0 44px 90px -42px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .05); }
.device img { border-radius: 36px; }
.device-wide { border-radius: 26px; padding: 7px; }
.device-wide img { border-radius: 19px; }

/* ---------- Hero: asymmetrischer Split ------------------------------------ */

.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 var(--sec); border-top: 0; }
.hero .shell {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-copy { max-width: 37rem; }
.hero h1 span { color: var(--acc-text); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.25rem; }
.store-badge img { display: block; height: 54px; width: auto; }
.store-badge:hover { opacity: .85; }
.hero-art { justify-self: end; width: 100%; max-width: 310px; }

@media (max-width: 900px) {
  .hero .shell { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 290px; }
}

/* ---------- Schrittfolge -------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.step { padding: 1.75rem clamp(1.25rem, 2.5vw, 2rem) 0; border-top: 1px solid var(--line); }
.step + .step { border-left: 1px solid var(--line); }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step .n { font-family: var(--mono); font-size: .8125rem; font-weight: 700; color: var(--acc-text); letter-spacing: .1em; }
.step h3 { margin: .875rem 0 .5rem; }
.step p { margin: 0; color: var(--ink2); font-size: .9375rem; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding: 1.5rem 0 0; }
  .step + .step { border-left: 0; }
}

/* ---------- Bento --------------------------------------------------------- */

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.cell { background: var(--surf); border-radius: var(--r-card); box-shadow: var(--lift); padding: clamp(1.375rem, 2.2vw, 1.75rem); display: flex; flex-direction: column; gap: 1.125rem; }
.cell h3 { letter-spacing: -.022em; }
.cell p { margin: 0; color: var(--ink2); font-size: .9375rem; }
.cell figure { margin: auto 0 0; }
.cell figure img { border-radius: var(--r-in); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .9); }

.cell-lead { grid-column: span 7; }
.cell-b { grid-column: span 5; }
.cell-c { grid-column: span 5; }
.cell-d { grid-column: span 7; background: linear-gradient(150deg, var(--acc-14), transparent 62%), var(--surf); }
.cell-d .big { font-family: var(--mono); font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--acc-text); }

@media (max-width: 860px) {
  .cell-lead, .cell-b, .cell-c, .cell-d { grid-column: span 12; }
}

/* ---------- Historie: Aussage ueber zwei Spalten -------------------------- */

.claim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.claim p { color: var(--ink2); margin: 0 0 1rem; }
.claim p:last-child { margin-bottom: 0; }
.claim-col { padding-top: .5rem; }

@media (max-width: 800px) { .claim { grid-template-columns: 1fr; } }

/* ---------- Premium: Vergleich zweier Spalten ----------------------------- */

.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--gap); margin-top: clamp(2.5rem, 5vw, 3.5rem); align-items: start; }
.plan { background: var(--surf); border-radius: var(--r-card); box-shadow: var(--lift); padding: clamp(1.5rem, 2.6vw, 2rem); }
.plan-premium { box-shadow: var(--lift), inset 0 0 0 1.5px var(--acc-28); }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-price { font-size: 1.0625rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .875rem; }
.plan li { display: flex; gap: .75rem; align-items: flex-start; font-size: .9375rem; color: var(--ink2); }
.plan li b { color: var(--ink); font-weight: 620; display: block; }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: .2em; color: var(--acc-text); }
.plan-note { margin: 1.5rem 0 0; font-size: .8125rem; color: var(--ink3); }

@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }

/* ---------- iPad ---------------------------------------------------------- */

.wide-head { max-width: 46rem; }
.wide-art { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Datenschutz-Aussage ------------------------------------------- */

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.fact { border-top: 1px solid var(--line); padding: 1.5rem clamp(1rem, 2vw, 1.75rem) 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; }
.fact:last-child { padding-right: 0; }
.fact b { display: block; font-size: 1.0625rem; font-weight: 660; letter-spacing: -.02em; }
.fact span { display: block; margin-top: .375rem; font-size: .875rem; color: var(--ink2); }

@media (max-width: 780px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 460px) {
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 1.25rem 0 0; border-left: 0 !important; }
}

/* ---------- Abschluss ----------------------------------------------------- */

.close { text-align: center; }
.close h2 { max-width: 20ch; margin: 0 auto; }
.close .lede { margin-left: auto; margin-right: auto; }
.close .hero-actions { justify-content: center; }

/* ---------- Fliesstext (Rechts- und Hilfeseiten) -------------------------- */

.page { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem); }
.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.prose h2 { font-size: 1.25rem; letter-spacing: -.02em; margin: 2.75rem 0 .75rem; }
.prose p, .prose li { color: var(--ink2); }
.prose p { margin: 0 0 1rem; }
.prose ol, .prose ul { padding-left: 1.25rem; margin: 0 0 1rem; display: grid; gap: .625rem; }
.prose strong, .prose b { color: var(--ink); font-weight: 620; }
.prose .stamp { font-size: .9375rem; color: var(--ink3); margin: .75rem 0 2.5rem; }
.prose .callout { background: var(--surf); border-radius: var(--r-card); box-shadow: var(--lift); padding: 1.25rem 1.5rem; margin: 1.75rem 0; }
.prose .callout p:last-child { margin-bottom: 0; }

/* ---------- Fusszeile ----------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; }
.foot .shell { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot a { color: var(--ink2); text-decoration: none; font-size: .9375rem; }
.foot a:hover { color: var(--ink); }
.foot small { color: var(--ink3); font-size: .875rem; }

/* ---------- Einblenden beim Scrollen -------------------------------------- */

.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* Screenshots in der Support-Anleitung */
.prose figure.shot { margin: 1.25rem 0 1.75rem; }
.prose figure.shot img { display: block; width: 100%; max-width: 24rem; height: auto; border-radius: 12px; box-shadow: var(--hair); }
