/* Natsuku Landing Page. Farben aus Shared/DesignTokens.xcassets (04-design.md), Kontraste nach WCAG 2 geprüft:
   Text mindestens 4.5:1, Ränder von Feldern und Fokus mindestens 3:1. Nur Systemschriften. */

:root {
  color-scheme: light dark;
  --bg: #FBF7F1;
  --flaeche: #FFFFFF;
  --text: #2A211B;
  --text-2: #6E6259;
  --akzent: #A8501C;
  --auf-akzent: #FFFFFF;
  --akzent-zart: #F6E3D3;
  --rand: #8C7F75;
  --linie: #EADFD3;
  --fehler: #B3261E;
  --icon-grund: #E89A63;
  --icon-kopf: #FBF7F1;
  --icon-rand: transparent;
  --schatten: 0 1px 2px rgb(42 33 27 / 6%), 0 10px 30px rgb(42 33 27 / 7%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120E;
    --flaeche: #231C17;
    --text: #F5EDE4;
    --text-2: #B9AA9B;
    --akzent: #E89A63;
    --auf-akzent: #17120E;
    --akzent-zart: #3A2A1F;
    --rand: #8F8276;
    --linie: #3A2F27;
    --fehler: #FF9A8B;
    --icon-grund: #231C17;
    --icon-kopf: #E89A63;
    --icon-rand: #3A2F27;
    --schatten: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text: #1A130E;
    --text-2: #4E443C;
    --akzent: #8A3E12;
    --akzent-zart: #F2D6BF;
    --rand: #4E443C;
    --linie: #4E443C;
    --fehler: #8C1D18;
  }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --bg: #0E0A07;
    --flaeche: #2A221C;
    --text: #FFFFFF;
    --text-2: #D2C6BA;
    --akzent: #F2B184;
    --auf-akzent: #0E0A07;
    --akzent-zart: #46332A;
    --rand: #D2C6BA;
    --linie: #D2C6BA;
    --fehler: #FFB4AB;
  }
}

/* Grundschrift 17 px wie Body auf dem iPhone; in Safari auf iOS folgt sie der eingestellten Textgrösse. */
html {
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html {
    font: -apple-system-body;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  /* Keine automatische Trennung; nur sehr lange Wörter brechen bei grosser Schrift um. */
  overflow-wrap: break-word;
}

h1,
h2,
h3,
.marke {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  /* Titel dürfen trennen, damit lange Wörter bei grosser Schrift nicht mitten im Wort umbrechen. */
  hyphens: auto;
}

/* Titel wachsen mit der Textgrösse, aber höchstens bis zu einem Anteil der Bildschirmbreite. */
h1 {
  font-size: min(clamp(1.9rem, 1.4rem + 3vw, 3.1rem), 11vw);
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

h2 {
  font-size: min(clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem), 8.5vw);
  margin: 0 0 0.75rem;
}

.text h1 {
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--akzent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* Rahmen der Seite: mindestens 16 px Rand, auch im Querformat mit Kamerabereich. */
.seite {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
  container: seite / inline-size;
}

/* Sehr grosse Schrift auf schmalem Bildschirm: dann auch im Fliesstext trennen statt mitten im Wort umbrechen. */
@container seite (max-width: 19em) {
  p,
  li,
  label,
  legend {
    hyphens: auto;
  }
}

.schmal {
  max-width: 40rem;
}

@media (min-width: 40em) {
  .seite {
    padding-inline: max(1.5rem, env(safe-area-inset-left)) max(1.5rem, env(safe-area-inset-right));
  }
}

.sprunglink {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.6rem 1rem;
  background: var(--flaeche);
  color: var(--text);
  border-radius: 12px;
  z-index: 10;
}

.sprunglink:focus {
  top: 1rem;
}

.kopf {
  padding-block: 1.25rem 0;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
}

.marke svg {
  width: 2rem;
  height: 2rem;
}

/* App-Icon: Kopf als Aussparung, Farben je nach Darstellung (vorschau-hell.svg, vorschau-dunkel.svg). */
.icon-grund {
  fill: var(--icon-grund);
  stroke: var(--icon-rand);
  stroke-width: 12;
}

.icon-kopf {
  fill: var(--icon-kopf);
}

.held {
  padding-block: 2.5rem 1.5rem;
}

.held .app-icon {
  width: min(6rem, 28vw);
  height: min(6rem, 28vw);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 6px 16px rgb(168 80 28 / 22%));
}

@media (prefers-color-scheme: dark) {
  .held .app-icon {
    filter: none;
  }
}

.vorzeile {
  color: var(--text-2);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.15rem;
  max-width: 36em;
}

.nebentext,
.hinweis,
.freiwillig {
  color: var(--text-2);
}

.hinweis {
  font-size: 0.94rem;
  margin: 0;
}

.freiwillig {
  font-weight: 400;
}

.abschnitt {
  padding-block: 1.75rem;
}

.karten {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

@media (min-width: 40em) {
  .karten {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Grosse Bildschirme (zum Beispiel Laptops mit 16 Zoll): breitere Abschnitte und drei Karten pro Zeile;
   Fliesstext und Formular bleiben schmal genug zum Lesen. Rechtstexte behalten ihre Breite (.schmal). */
@media (min-width: 64em) {
  .seite:not(.schmal) {
    max-width: 68rem;
  }

  .karten {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .abschnitt > p,
  .abschnitt > h2,
  .held > p,
  .held > h1 {
    max-width: 42rem;
  }

  .formular {
    max-width: 44rem;
  }
}

.karte {
  background: var(--flaeche);
  border-radius: 24px;
  padding: 1.1rem 1.15rem;
  box-shadow: var(--schatten);
}

.karte p:last-child {
  margin-bottom: 0;
}

.karte.betont {
  background: var(--akzent-zart);
  box-shadow: none;
}

/* Knopf in Akzentfarbe, Beschriftung in BrandOnAccent (nie Weiss auf Aprikose). */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--akzent);
  color: var(--auf-akzent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.knopf:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Formular */
.formular {
  display: grid;
  gap: 1.5rem;
}

.feld {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.feld > label:not(.wahl),
legend {
  font-weight: 600;
  padding: 0;
}

legend {
  margin-bottom: 0.4rem;
}

input[type="email"],
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rand);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  /* Ab 16 px zoomt Safari auf dem iPhone beim Antippen nicht. */
  font-size: max(1rem, 16px);
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

input[type="email"]:focus-visible,
textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--akzent);
}

[aria-invalid="true"] {
  border-color: var(--fehler);
  outline-color: var(--fehler);
}

/* Auswahlen: ganze Zeile tippbar, mindestens 44 pt hoch. */
.wahl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  margin-inline: -0.7rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 400;
}

.wahl:hover {
  background: var(--akzent-zart);
}

.wahl input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.1rem 0 0;
  accent-color: var(--akzent);
}

.zaehler {
  font-size: 0.94rem;
  color: var(--text-2);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.fehlertext {
  color: var(--fehler);
  font-weight: 600;
  margin: 0;
}

.status {
  margin: 0;
}

.status:not(:empty) {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--bg);
  border-left: 4px solid var(--akzent);
}

.status[data-art="fehler"]:not(:empty) {
  border-left-color: var(--fehler);
  color: var(--text);
  font-weight: 600;
}

.turnstile:empty {
  display: none;
}

/* Bestätigung nach dem Eintragen: in hell und dunkel klar von den übrigen Karten abgehoben. */
.danke {
  background: var(--akzent-zart);
  border: 2px solid var(--akzent);
}

.danke:focus {
  outline: none;
}

.danke:focus-visible {
  outline: 3px solid var(--akzent);
}

/* Rechtstexte und Hilfe */
.text h2 {
  margin-top: 2.25rem;
}

.text h3 {
  margin-top: 1.5rem;
}

.text ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.text li {
  margin-bottom: 0.4rem;
}

.stand {
  color: var(--text-2);
}

.fuss {
  padding-block: 2rem 3rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--linie);
  color: var(--text-2);
}

.fuss nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.fuss a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .knopf {
    transition: background-color 0.15s ease, transform 0.15s ease;
  }

  .knopf:active:not(:disabled) {
    transform: scale(0.98);
  }

  .wahl {
    transition: background-color 0.15s ease;
  }
}
