/* ─────────────────────────────────────────────────────────────────────────────
   tokens.css, magic places
   Shared design tokens: @font-face, :root variables, reset/base styles
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── @FONT-FACE: Cormorant Garamond (self-hosted) ─── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-300.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-300-italic.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-300-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-italic.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-500.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─── @FONT-FACE: Space Grotesk (self-hosted) ─── */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  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;
}

/* ─── :ROOT, Design Tokens ─── */
:root {
  /* -- Colors: Base Palette -- */
  --c-dark: #060D08;
  --c-dark-elevated: #0B1A0F;
  --c-gold: #B8944F;
  --c-gold-light: #D4C48A;
  --c-green: #6B8F72;
  --c-green-muted: #4A6B50;
  --c-green-pale: #A8C4AD;
  --c-canopy: #36463A;
  --c-marigold: #FD9623;
  --c-amber: #C8963C;
  --c-white: #FFFFFF;
  --c-cream: #F1EDE3;
  --c-text-dark: #111A14;

  /* -- Colors: Functional Tokens --
     --c-accent bewusst auf gold-light gesetzt, damit akzentuierte
     Texte/Labels site-weit konsistent hell erscheinen.
     --c-gold bleibt als Basis-Token erhalten (fuer Borders/Focus). */
  --c-accent: var(--c-gold-light);
  --c-accent-light: var(--c-gold-light);
  --c-accent-on-light: #6B5630;
  --c-text-primary: var(--c-white);
  --c-text-muted: rgba(168, 196, 173, 0.78);
  --c-text-muted-low: rgba(168, 196, 173, 0.85);
  --c-text-sub-light: rgba(17, 26, 20, 0.75);
  --c-border: rgba(156, 126, 81, 0.12);
  --c-border-subtle: rgba(156, 126, 81, 0.06);
  --c-surface: rgba(156, 126, 81, 0.06);
  --c-surface-hover: rgba(156, 126, 81, 0.12);

  /* -- Typography: Font Families -- */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* -- Typography: Fluid Scale (t-shirt). v4 — kleine Tokens leserlicher,
        Maxima auf grossen Bildschirmen leicht zurueckgenommen. -- */
  --text-xxs: clamp(0.62rem, 0.52rem + 0.32vw, 0.78rem);  /* 9.9  -> 12.5 px (Mikro-Labels) */
  --text-xs:  clamp(0.72rem, 0.60rem + 0.42vw, 0.88rem);  /* 11.5 -> 14.1 px */
  --text-sm:  clamp(0.88rem, 0.74rem + 0.50vw, 1.02rem);  /* 14.1 -> 16.3 px */
  --text-md:  clamp(1.05rem, 0.94rem + 0.40vw, 1.22rem);  /* 16.8 -> 19.5 px */
  --text-lg:  clamp(1.40rem, 1.20rem + 0.70vw, 1.65rem);  /* 22.4 -> 26.4 px */
  --text-xl:  clamp(2.00rem, 1.60rem + 1.50vw, 2.65rem);  /* 32.0 -> 42.4 px */
  --text-2xl: clamp(1.85rem, 1.45rem + 1.55vw, 2.85rem);  /* 29.6 -> 45.6 px (Section-/CTA-Headlines) */
  --text-3xl: clamp(2.65rem, 1.85rem + 3.20vw, 4.50rem);  /* 42.4 -> 72.0 px (Hero/Display H1) */

  /* -- Spacing: Fluid Scale (t-shirt). Hochskaliert v2 fuer mehr Atemraum. -- */
  --space-xs: clamp(0.375rem, 0.30rem + 0.30vw, 0.60rem); /* 6  -> 9.6 px */
  --space-sm: clamp(0.625rem, 0.50rem + 0.50vw, 1.00rem); /* 10 -> 16  px */
  --space-md: clamp(1.125rem, 0.95rem + 0.70vw, 1.625rem);/* 18 -> 26  px */
  --space-lg: clamp(1.625rem, 1.32rem + 1.20vw, 2.50rem); /* 26 -> 40  px */
  --space-xl: clamp(2.25rem, 1.80rem + 1.80vw, 3.50rem);  /* 36 -> 56  px */

  /* -- Header-Clearance: Abstand vom oberen Phone-Frame-Rand bis Hero-Content.
        Baseline orientiert sich am /christian-Template (Status-Bar + Hero-Atemraum).
        Wird konsistent auf .home und .phone-scroll padding-top angewendet.
        iOS safe-area-inset wird via max() in den Konsumenten kombiniert. -- */
  --header-clearance: clamp(6rem, 4.5rem + 3vw, 8rem); /* 96 -> 128 px */

  /* -- Phone-Frame Breite — Quelle der Wahrheit fuer Overlays/Sheets.
        Default = mobile (volle Viewport-Breite). Wird in Media-Queries unten
        ueberschrieben, um die Phone-Frame-Logik zu spiegeln. -- */
  --phone-current-width: 100vw;
}

/* Desktop ab 500px: Phone-Frame skaliert ratio-treu (440/932), max 519px breit
   (= 1100/932 * 440), Höhe gedeckelt auf 100dvh - 40px Padding. */
@media (min-width: 500px) {
  :root {
    --phone-current-width: min(519px, calc((100dvh - 40px) * 440 / 932));
  }
}

/* Easing + Legacy Aliases — gehoeren wieder ins globale :root,
   waren versehentlich in eine Media-Query gerutscht. */
:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cine: cubic-bezier(0.16, 1, 0.3, 1);

  --d: var(--c-dark);
  --d2: var(--c-dark-elevated);
  --gold: var(--c-gold);
  --gold-l: var(--c-gold-light);
  --moss: var(--c-green-muted);
  --sage: var(--c-green);
  --mist: var(--c-green-pale);
  --canopy: var(--c-canopy);
  --marigold: var(--c-marigold);
  --w: var(--c-white);
  --l: var(--c-cream);
  --l-text: var(--c-text-dark);
  --l-sub: var(--c-text-sub-light);
  --e: var(--ease);
  --e-cine: var(--ease-cine);
}

/* ─── Reset / Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--gold); color: var(--w); }

/* ─── Fokus-Indikator (WCAG 2.4.7) ─── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: #020504;
  color: var(--w);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

/* ─── LANGUAGE SWITCH ─── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(6, 13, 8, 0.6);
  z-index: 100;
}
.lang-switch__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 2px 8px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  line-height: 1;
}
.lang-switch__item.is-active {
  color: var(--c-gold-light);
  background: var(--c-surface);
  cursor: default;
}
.lang-switch__item:not(.is-active):hover {
  color: var(--c-white);
}
/* Position inside phone frame (subpages) */
.phone .lang-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 150;
}
/* Position for non-phone pages (book, confirm) */
body > .lang-switch,
main > .lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 300;
}

/* ═══════════════════════════════════════════════════════
   GLOBAL prefers-reduced-motion, site-weit aktiv (WCAG 2.3.3)
   Greift auf Pages, die nur pages.css/christian.css/leistungen.css laden
   (z.B. /book, /confirm), wo kein eigener RM-Block existiert.
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
