/*
 * Design-Tokens der Oberfläche (Welt „Salbei & Terrakotta“).
 * Erzeugt von docs/design/farbwelten/erzeugen.mjs — nicht von Hand ändern.
 *
 * Farben nach Rolle. Außerhalb dieser Datei steht kein Farbwert. Alle
 * Textpaare erreichen WCAG 2.1 AA (Details und Messwerte in der
 * Vergleichsseite docs/design/farbwelten/index.html). Die Rollen
 * on-ink-accent (Aktion in der Kurzmeldung) und switch-knob (Knopf des
 * eingeschalteten Schalters) stammen aus dem UX-Audit der App (Spec 001).
 * Standard ist die
 * Systemeinstellung (prefers-color-scheme); ein Umschalter in den Einstellungen
 * kann sie überschreiben, indem er data-theme="light" oder "dark" am
 * Wurzelelement setzt. Ohne data-theme gilt das System.
 */

:root {
  color-scheme: light dark;

  --color-canvas: #f5f3ea;
  --color-surface: #fbfaf4;
  --color-surface-muted: #ebe9de;
  --color-field: #fdfcf9;
  --color-line: #dcd9cf;
  --color-field-border: #8d897c;
  --color-primary: #205339;
  --color-primary-hover: #0f462c;
  --color-on-primary: #f5f3ea;
  --color-accent: #ffa67e;
  --color-accent-strong: #a94a14;
  --color-accent-button: #b2511e;
  --color-on-accent: #fbfaf4;
  --color-ink: #17291e;
  --color-ink-muted: #556159;
  --color-ink-subtle: #606a64;
  --color-nav-bg: #205339;
  --color-nav-active: #0f462c;
  --color-nav-strong: #f5f3ea;
  --color-nav-text: #d6e1da;
  --color-nav-muted: #b1bfb6;
  --color-card-strong: #205339;
  --color-on-card-strong: #f5f3ea;
  --color-card-strong-muted: #b1bfb6;
  --color-focus: #a94a14;
  --color-focus-on-dark: #ffa67e;
  --color-info-fill: #d7f1e1;
  --color-info-text: #336449;
  --color-success-fill: #d8f1df;
  --color-success-text: #2e6544;
  --color-warning-fill: #f5e8d0;
  --color-warning-text: #71520c;
  --color-danger-fill: #fee2de;
  --color-danger-text: #8f3831;
  --color-danger-solid: #af3d36;
  --color-chip-accent-fill: #fedfd1;
  --color-chip-accent-text: #883500;
  --color-avatar-sage: #bfd9c3;
  --color-avatar-accent: #ff9a6b;
  --color-on-ink-accent: #ffa67e;
  --color-switch-knob: #ffa67e;

  /* Schriften (lokal, siehe fonts.css) */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  /* Schriftgrößen */
  --text-display: 48px;
  --text-h1: 32px;
  --text-h2: 24px;
  --text-body: 15px;
  --text-label: 13px;
  --text-small: 12px;
  --text-overline: 11px;

  /* Abstände */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Radien */
  --radius-checkbox: 6px;
  --radius-field: 12px;
  --radius-card: 18px;
  --radius-dialog: 22px;
  --radius-full: 999px;

  /* Schatten nur für schwebende Elemente (Dialog, Kurzmeldung) */
  --shadow-floating: 0 24px 60px rgb(0 0 0 / 0.3);

  /* Mindestgröße für Tippflächen */
  --target-min: 44px;
}

/* Dunkel nach Systemeinstellung, solange niemand „Hell“ gewählt hat. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-canvas: #09120d;
    --color-surface: #111b15;
    --color-surface-muted: #1c2720;
    --color-field: #060c08;
    --color-line: #2a362f;
    --color-field-border: #5b6b61;
    --color-primary: #4a996e;
    --color-primary-hover: #5aa97d;
    --color-on-primary: #09120d;
    --color-accent: #dd865f;
    --color-accent-strong: #dd865f;
    --color-accent-button: #d17c54;
    --color-on-accent: #09120d;
    --color-ink: #edebe2;
    --color-ink-muted: #9ba9a0;
    --color-ink-subtle: #849088;
    --color-nav-bg: #072416;
    --color-nav-active: #113623;
    --color-nav-strong: #edebe2;
    --color-nav-text: #b6c1ba;
    --color-nav-muted: #89968e;
    --color-card-strong: #0a3a23;
    --color-on-card-strong: #edebe2;
    --color-card-strong-muted: #929f97;
    --color-focus: #dd865f;
    --color-focus-on-dark: #dd865f;
    --color-info-fill: #172c20;
    --color-info-text: #85b99a;
    --color-success-fill: #182c1f;
    --color-success-text: #82ba95;
    --color-warning-fill: #2f2512;
    --color-warning-text: #c7a667;
    --color-danger-fill: #36201d;
    --color-danger-text: #ed8c81;
    --color-danger-solid: #da7369;
    --color-chip-accent-fill: #472718;
    --color-chip-accent-text: #e99169;
    --color-avatar-sage: #3f6246;
    --color-avatar-accent: #a3522a;
    --color-on-ink-accent: #a94a14;
    --color-switch-knob: #111b15;
    --shadow-floating: 0 24px 60px rgb(0 0 0 / 0.55);
  }
}

/* Dunkel nach ausdrücklicher Wahl (data-theme am Wurzelelement). */
:root[data-theme='dark'] {
  --color-canvas: #09120d;
  --color-surface: #111b15;
  --color-surface-muted: #1c2720;
  --color-field: #060c08;
  --color-line: #2a362f;
  --color-field-border: #5b6b61;
  --color-primary: #4a996e;
  --color-primary-hover: #5aa97d;
  --color-on-primary: #09120d;
  --color-accent: #dd865f;
  --color-accent-strong: #dd865f;
  --color-accent-button: #d17c54;
  --color-on-accent: #09120d;
  --color-ink: #edebe2;
  --color-ink-muted: #9ba9a0;
  --color-ink-subtle: #849088;
  --color-nav-bg: #072416;
  --color-nav-active: #113623;
  --color-nav-strong: #edebe2;
  --color-nav-text: #b6c1ba;
  --color-nav-muted: #89968e;
  --color-card-strong: #0a3a23;
  --color-on-card-strong: #edebe2;
  --color-card-strong-muted: #929f97;
  --color-focus: #dd865f;
  --color-focus-on-dark: #dd865f;
  --color-info-fill: #172c20;
  --color-info-text: #85b99a;
  --color-success-fill: #182c1f;
  --color-success-text: #82ba95;
  --color-warning-fill: #2f2512;
  --color-warning-text: #c7a667;
  --color-danger-fill: #36201d;
  --color-danger-text: #ed8c81;
  --color-danger-solid: #da7369;
  --color-chip-accent-fill: #472718;
  --color-chip-accent-text: #e99169;
  --color-avatar-sage: #3f6246;
  --color-avatar-accent: #a3522a;
  --color-on-ink-accent: #a94a14;
  --color-switch-knob: #111b15;
  --shadow-floating: 0 24px 60px rgb(0 0 0 / 0.55);
}

:root[data-theme='light'] {
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./outfit-latin-500-normal-fc9bff941d.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./manrope-latin-400-normal-849290ef12.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./manrope-latin-600-normal-f7ac6258da.woff2') format('woff2');
}
/*
 * Öffentliche Seiten im Design (Spec M4.6, Entwürfe docs/design/m4/). Farben
 * nur über die Rollen aus `@hausctrl/design-tokens` (W43); hell und dunkel
 * nur über `prefers-color-scheme` (in tokens.css). Handy zuerst ab 320 px,
 * Tablet ab 640 px, Desktop ab 1024 px. Bewegung: nur der weiche Sprung zur
 * Warteliste, bei `prefers-reduced-motion` aus.
 */

/* --- Grundlagen ------------------------------------------------------------ */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

p {
  margin: 0;
}

a {
  color: var(--color-primary);
  font-weight: 600;
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex='-1']:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stack--tight {
  gap: var(--space-3);
}

.muted {
  color: var(--color-ink-muted);
}

/* --- Kopf und Fuß (B1, B2) ------------------------------------------------- */

.site-header__inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-header__home,
.site-header__sign-in,
.site-footer__nav a {
  display: inline-flex;
  min-height: var(--target-min);
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
}

.site-header__home {
  color: var(--color-ink);
}

.site-header__sign-in {
  padding: 0 10px;
  font-size: 14px;
}

.site-main {
  flex: 1 0 auto;
}

.site-footer {
  border-top: 1px solid var(--color-line);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  padding-top: 20px;
  padding-bottom: 28px;
}

.site-footer__nav a {
  padding: 0 10px;
  color: var(--color-ink-muted);
  font-size: 14px;
  font-weight: 400;
}

.site-footer__nav a:hover {
  color: var(--color-ink);
}

/* Wortmarke wie in der App, ein Schnitt (Outfit 500), Akzent nur über Farbe. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wordmark__signet {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 2px;
}

.wordmark__signet i {
  display: block;
  height: 8px;
  border-radius: 1px;
  background: var(--color-ink);
}

.wordmark__signet i:first-child {
  border-top-left-radius: 4px;
  background: var(--color-accent-strong);
}

.wordmark__signet i:nth-child(2) {
  border-top-right-radius: 4px;
}

.wordmark__signet i:nth-child(3) {
  border-bottom-left-radius: 4px;
}

.wordmark__signet i:nth-child(4) {
  border-bottom-right-radius: 4px;
}

.wordmark__text {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.wordmark__text b {
  color: var(--color-accent-strong);
  font-weight: 500;
}

/* --- Knopf, Feld, Hinweis (B6, B7) ----------------------------------------- */

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--color-primary-hover);
  color: var(--color-on-primary);
}

.button:disabled,
[aria-busy='true'] .button {
  cursor: progress;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.3;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--color-field-border);
  border-radius: var(--radius-field);
  background: var(--color-field);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.notice {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.notice .icon {
  flex: none;
  width: 22px;
  height: 22px;
}

.notice--info {
  background: var(--color-info-fill);
  color: var(--color-info-text);
}

.notice--alert {
  background: var(--color-danger-fill);
  color: var(--color-danger-text);
}

.notice--success {
  background: var(--color-success-fill);
  color: var(--color-success-text);
}

.icon__dot {
  fill: currentcolor;
}

/* --- Startseite: Held mit Beispielansicht (M4 35) -------------------------- */

.home-hero {
  padding: 36px 0 48px;
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 36px;
}

.home-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.home-hero__sub {
  max-width: 30em;
  color: var(--color-ink-muted);
  font-size: 17px;
}

.sample {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.sample__image {
  display: block;
  width: 100%;
  height: auto;
}

.sample__caption {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink-muted);
  font-size: var(--text-label);
  font-weight: 600;
}

.sample__caption::before {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: currentcolor;
  content: '';
}

.sample__frame {
  fill: var(--color-surface);
  stroke: var(--color-line);
}

.sample__panel {
  fill: none;
  stroke: var(--color-line);
}

.sample__panel--filled,
.sample__bar {
  fill: var(--color-surface-muted);
}

.sample__bar--strong {
  fill: var(--color-line);
}

.sample__line {
  stroke: var(--color-line);
}

.sample__signet {
  fill: var(--color-ink);
}

.sample__signet--accent,
.sample__sun {
  fill: var(--color-accent-strong);
}

.sample__cloud {
  fill: var(--color-surface);
}

.sample__check {
  fill: none;
  stroke: var(--color-ink-muted);
  stroke-width: 1.5;
}

.sample__check--done {
  fill: var(--color-primary);
  stroke: var(--color-primary);
}

.sample__tick {
  fill: none;
  stroke: var(--color-surface);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sample__heading,
.sample__label,
.sample__time {
  fill: var(--color-ink-muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.sample__heading {
  fill: var(--color-ink);
  font-size: 15px;
}

.sample__label {
  font-size: 12px;
}

.sample__time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.sample__temperature {
  fill: var(--color-ink);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
}

/* --- Module (B3) ----------------------------------------------------------- */

.home-modules,
.home-faq,
.home-waitlist,
.home-principles {
  padding: 48px 0;
}

.module-list,
.principle-list,
.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.module-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

.module-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.module-card p {
  color: var(--color-ink-muted);
  font-size: 15px;
}

.module-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-success-fill);
  color: var(--color-success-text);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.4;
}

.module-card__status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentcolor;
  content: '';
}

/* „geplant“: gestrichelt und ohne Fläche, Stand trotzdem als Wort. */
.module-card--planned {
  border-style: dashed;
  border-color: var(--color-field-border);
  background: transparent;
}

.module-card--planned .module-card__status {
  padding: 2.5px 9px;
  border: 1.5px dashed var(--color-field-border);
  background: transparent;
  color: var(--color-ink-muted);
}

.module-card--planned .module-card__status::before {
  border: 1.5px solid currentcolor;
  background: transparent;
}

/* --- Grundsätze (B4) ------------------------------------------------------- */

.home-principles {
  background: var(--color-surface);
}

.principle-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.principle {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.principle__icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--color-surface-muted);
  color: var(--color-primary);
}

.principle__icon .icon {
  width: 28px;
  height: 28px;
}

.principle__text {
  font-weight: 600;
  line-height: 1.4;
}

/* --- Fragen (B5) ----------------------------------------------------------- */

.home-faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--space-5);
}

.faq__item {
  border-bottom: 1px solid var(--color-line);
}

.faq__item summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 0;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__toggle {
  display: flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface-muted);
  color: var(--color-primary);
}

.faq__toggle .icon {
  width: 20px;
  height: 20px;
}

.faq__item[open] .faq__toggle {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.faq__item[open] .icon__closed-only {
  display: none;
}

.faq__answer {
  padding: 0 52px 20px 0;
  color: var(--color-ink-muted);
}

/* --- Warteliste (B6, M4 35) ------------------------------------------------ */

.home-waitlist {
  scroll-margin-top: var(--space-4);
}

.waitlist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--space-5);
  padding: 28px 20px;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: var(--color-surface);
}

.waitlist-form {
  display: flex;
  max-width: 520px;
  flex-direction: column;
  gap: var(--space-4);
}

/* Honigtopf (H-17): nie sichtbar, nie fokussierbar, nie per Autofill gefüllt. */
.waitlist-form__trap {
  display: none;
}

.waitlist-form__consent {
  color: var(--color-ink-muted);
  font-size: 14px;
  line-height: 1.55;
}

.waitlist-joined {
  display: flex;
  max-width: 520px;
  flex-direction: column;
  gap: var(--space-2);
  padding: 20px;
  border-radius: 14px;
  background: var(--color-success-fill);
  color: var(--color-success-text);
}

/* --- Seiten mit einer Nachricht (M4 36, M4 39) ----------------------------- */

.message-page {
  padding: 48px 0;
}

.message-page__body {
  display: flex;
  max-width: 520px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.link-list li {
  display: flex;
  min-height: var(--target-min);
  align-items: center;
}

/* --- Rechtstexte (B9) ------------------------------------------------------ */

.legal {
  max-width: 68ch;
  padding: 48px 0;
  overflow-wrap: anywhere;
}

.legal h1 {
  margin-bottom: var(--space-4);
}

.legal h2 {
  margin: var(--space-6) 0 var(--space-3);
  scroll-margin-top: var(--space-6);
}

.legal h3 {
  margin: var(--space-5) 0 var(--space-2);
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 var(--space-3);
}

/* --- Breiten --------------------------------------------------------------- */

@media (min-width: 640px) {
  .container {
    padding: 0 40px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  .home-hero {
    padding: 56px 0 72px;
  }

  .home-hero h1 {
    font-size: 52px;
  }

  .home-modules,
  .home-faq,
  .home-waitlist,
  .home-principles {
    padding: 80px 0;
  }

  .module-list,
  .principle-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-list {
    gap: 28px;
  }

  .waitlist-card {
    padding: 40px;
  }

  .message-page {
    padding: 72px 0;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 48px;
  }

  .home-hero {
    padding: 72px 0;
  }

  .home-hero h1 {
    font-size: 60px;
  }

  .home-hero__sub {
    font-size: 19px;
  }

  .home-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 56px;
  }

  .module-list,
  .principle-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-faq__inner {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 56px;
  }

  .waitlist-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    padding: 48px 56px;
  }
}

/* --- Bewegung -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
