/* Smilendo v1 — styles.css
   Brand tokens per smirkstudio-ai/Brand/BRAND_DIRECTION_2026-07-28.md
   Two accessibility-driven derivatives added (see DESIGN_NOTES.md §Accessibility):
   --sage-text (5.7:1 on Paper) and --sage-text-dark (8.76:1 on Ink) for
   informational secondary-state text in light/dark mode respectively.
   True --gold and --sage stay reserved for backgrounds/borders/decoration only,
   never as body/label text color (both fail 3:1 as literal hex values against
   either scheme's page background).

   Apple-polish pass (2026-08-01, Sable): components reference semantic tokens
   --bg/--fg/--muted/--hairline/--card-fill/--card-border/--header-bg/
   --shadow-card, never --ink/--paper directly (two intentional literal
   exceptions: the ink-on-gold status pill and the gold text-selection color,
   which don't change with scheme). These flip inside the
   `@media (prefers-color-scheme: dark)` block below — see
   Team_Inbox/POLISH_smilendo_apple_pass_sable_2026-08-01.md for the full
   before/after and the Apple principle each change serves.
*/

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-semibold-display.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-regular-heading.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('../fonts/karla-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('../fonts/karla-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand tokens */
  --ink: #171310;
  --gold: #E3A63F;
  --paper: #F8F3E8;
  --sage: #90987C;
  --sage-text: #5D6250; /* accessible derivative of sage, text use only */
  --sage-text-dark: #AEB69A; /* dark-scheme derivative of sage, text use only — 8.76:1 on Ink */

  /* Semantic tokens (flip between light/dark below; components reference
     these, never --ink/--paper directly, except where a fixed literal
     combination is intentional — e.g. the gold status pill, which keeps
     ink-on-gold in both schemes). */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--sage-text);
  --hairline: rgba(23, 19, 16, 0.08);
  --hairline-strong: rgba(23, 19, 16, 0.14);
  --card-fill: rgba(23, 19, 16, 0.02);
  --card-border: rgba(23, 19, 16, 0.1);
  --header-bg: rgba(248, 243, 232, 0.72);
  --shadow-card: 0 1px 2px rgba(23, 19, 16, 0.04), 0 20px 40px -20px rgba(23, 19, 16, 0.16);

  /* Motion */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1); /* physics-feeling settle, used for every interactive transition */

  /* Fonts */
  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Fluid type scale */
  --text-sm: clamp(0.875rem, 0.84rem + 0.18vw, 0.95rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem);
  --text-2xl: clamp(1.6rem, 1.3rem + 1.6vw, 2.25rem);
  --text-hero: clamp(2.25rem, 1.5rem + 4vw, 4.25rem);
  --text-wordmark: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);

  /* Fluid spacing scale */
  --space-2xs: clamp(0.375rem, 0.32rem + 0.2vw, 0.5rem);
  --space-xs: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-sm: clamp(0.875rem, 0.7rem + 0.6vw, 1.125rem);
  --space-md: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --space-lg: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --space-xl: clamp(3.5rem, 2.2rem + 5vw, 6.5rem);

  --measure: 38rem; /* ~65-75ch reading measure for body paragraphs */
  --container: 68rem;

  color-scheme: light dark;
}

/* Dark-mode parity — follows the visitor's OS/browser preference automatically,
   no toggle UI (a toggle would be a fourth decision before the visitor reaches
   the content; "seamless" means it just works). Same four brand tokens
   (Ink/Gold/Paper/Sage) — only their ROLE flips, no new hues introduced,
   except one contrast-driven derivative of Sage (--sage-text-dark) mirroring
   the existing --sage-text pattern already established for light mode. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --fg: var(--paper);
    --muted: var(--sage-text-dark);
    --hairline: rgba(248, 243, 232, 0.12);
    --hairline-strong: rgba(248, 243, 232, 0.18);
    --card-fill: rgba(248, 243, 232, 0.04);
    --card-border: rgba(248, 243, 232, 0.14);
    --header-bg: rgba(23, 19, 16, 0.72);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 20px 40px -20px rgba(0, 0, 0, 0.55);
  }
}

/* Buttery cross-document transitions between same-origin pages (home <-> the
   two legal pages). Pure CSS, zero JS, zero dependency — browsers without
   support simply navigate as before, nothing breaks or degrades. */
@view-transition {
  navigation: auto;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  /* Universal selector above doesn't reach the browser-generated
     view-transition pseudo-elements — silence those explicitly. */
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; }

::selection { background: var(--gold); color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -3rem;
  background: var(--fg);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: top 0.3s var(--ease-expo);
  z-index: 100;
}
.skip-link:focus { top: var(--space-sm); }

/* Layout helpers */
.section-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 3rem);
}

section { padding-block: var(--space-xl); scroll-margin-top: 5rem; } /* clears the sticky header on #shelf/#about anchor jumps */

/* Below-the-fold render cost control */
.shelf, .about, .how {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

/* Header — sticky + frosted-glass condense on scroll, the same restrained
   "content slides under a calm anchor" pattern used across premium product
   sites. Solid --bg fill is the default/fallback; the @supports block below
   swaps in translucency + blur only where the browser can render it well. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-block: var(--space-sm);
  border-bottom: 1px solid transparent;
  transition: padding-block 0.35s var(--ease-expo), border-color 0.35s var(--ease-expo);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}
.site-header.is-scrolled {
  padding-block: calc(var(--space-sm) * 0.6);
  border-bottom-color: var(--hairline);
}
.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-wordmark);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
}
.wordmark .breath-mark {
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-0.35em);
  flex: none;
}
.site-nav {
  display: flex;
  gap: clamp(1rem, 0.8rem + 1vw, 2rem);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
}
.site-nav a {
  text-decoration: none;
  padding-bottom: 0.2em;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s var(--ease-expo);
}
.site-nav a:hover, .site-nav a:focus-visible { border-bottom-color: var(--gold); }

/* Hero */
.hero { padding-block: var(--space-xl) var(--space-lg); }
.hero-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 3rem);
  max-width: 46rem;
}
.hero-headline {
  font-weight: 600;
  font-size: var(--text-hero);
  letter-spacing: -0.015em; /* tight tracking at display size — type that breathes at body, sits close at scale */
  color: var(--fg);
  margin-bottom: var(--space-md);
}
.hero-promise {
  font-size: var(--text-lg);
  max-width: var(--measure);
  color: var(--fg);
  margin-bottom: var(--space-lg);
}
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--fg);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.15em;
}
.scroll-cue .arrow {
  transition: transform 0.3s var(--ease-expo);
}
.scroll-cue:hover .arrow, .scroll-cue:focus-visible .arrow {
  transform: translateY(0.15em);
}

/* Section headings + kicker */
.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-2xs);
}
h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

/* Product shelf */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  justify-content: center;
  gap: var(--space-md);
}
.product-card {
  display: block;
  max-width: 26rem;
  width: 100%;
  background: var(--card-fill);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform 0.35s var(--ease-expo), box-shadow 0.35s var(--ease-expo), border-left-color 0.35s var(--ease-expo);
}
.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(23, 19, 16, 0.05), 0 28px 48px -22px rgba(23, 19, 16, 0.24);
}
.product-card:active {
  transform: translateY(-1px);
}
.status-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.2em 0.7em;
  border-radius: 999px;
  margin-bottom: var(--space-sm);
}
.product-name {
  font-weight: 400;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}
.product-pain {
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
}
.product-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg);
}
.product-note .arrow {
  transition: transform 0.3s var(--ease-expo);
}
.product-card:hover .product-note .arrow,
.product-card:focus-visible .product-note .arrow {
  transform: translate(0.15em, -0.15em);
}

/* About + How-we-build: single reading column */
.about .section-inner, .how .section-inner {
  max-width: var(--measure);
}
.about p, .how p { margin-bottom: var(--space-sm); font-size: var(--text-lg); }
.about p:last-child, .how p:last-child { margin-bottom: 0; }
.signature {
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--text-lg);
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--space-lg);
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.footer-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-wordmark);
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
}
.footer-tagline { font-size: var(--text-sm); color: var(--muted); }
.footer-links {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 600;
}
.footer-links a { text-decoration: none; border-bottom: 2px solid transparent; transition: border-color 0.3s var(--ease-expo); }
.footer-links a:hover, .footer-links a:focus-visible { border-bottom-color: var(--gold); }
.footer-contact a { font-size: var(--text-sm); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; transition: text-decoration-color 0.3s var(--ease-expo); }
.footer-copy { font-size: var(--text-sm); color: var(--muted); }

/* Simple legal-page chrome (Impressum / Datenschutz) */
.legal-page main {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 3rem);
  padding-block: var(--space-xl);
}
.legal-page h1 { font-weight: 600; font-size: var(--text-2xl); margin-bottom: var(--space-md); }
.legal-page p { margin-bottom: var(--space-sm); font-size: var(--text-base); }
.placeholder-notice {
  background: rgba(227, 166, 63, 0.15);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: var(--space-sm);
  font-size: var(--text-sm);
}
.back-link { display: inline-block; margin-top: var(--space-md); font-weight: 600; border-bottom: 2px solid var(--gold); text-decoration: none; padding-bottom: 0.15em; transition: opacity 0.3s var(--ease-expo); }
.back-link:hover, .back-link:focus-visible { opacity: 0.72; }

/* Legal page content (Impressum / Datenschutz) */
.legal-notice {
  font-style: italic;
  color: var(--muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}
.legal-page h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.legal-page ul { margin: 0 0 var(--space-sm); padding-left: 1.25em; }
.legal-page li { margin-bottom: 0.4em; }
.legal-fields { margin: 0 0 var(--space-md); }
.legal-fields dt {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: var(--space-sm);
}
.legal-fields dd { margin: 0.3em 0 0; }
/* Visibly-marked pending placeholder — never hide these, they resolve at go-live */
.legal-placeholder {
  display: inline-block;
  background: rgba(227, 166, 63, 0.22);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.15em 0.5em;
  font-size: var(--text-sm);
  font-style: italic;
}

@media (max-width: 480px) {
  .header-inner { flex-wrap: wrap; }
  .site-nav { gap: var(--space-sm); }
}

/* Print / PDF-export safety net. content-visibility:auto is already spec'd
   to render fully when printing (Chromium honours this), but the JS-driven
   .reveal opacity/transform (assets/js/reveal.js) is a separate layer that
   spec doesn't touch and print never fires a scroll event for — without
   this, a Print-to-PDF of the page would show the hero and nothing below
   it. Overriding a same-origin inline style set by first-party JS for a
   different media context is the one legitimate use of !important here;
   it is not a specificity fix. */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .site-header { position: static; }
}
