/* Talveno landing — production static styles.
   Design tokens (docs/design/output/tokens.json) → CSS custom properties.
   No hard-coded values in component rules; everything references a token var. */

:root {
  /* color — light */
  --bg-primary: #F5F8F7;
  --bg-surface: #FFFFFF;
  --text-primary: #131E1D;
  --text-secondary: #3C4C4A;
  --text-muted: #87938F;
  --brand-primary: #0E7C74;
  --brand-pressed: #0A5F58;
  --brand-subtle: #E1EFED;
  --brand-subtle-border: #CFE4E0;
  --accent-warning: #C2872A;
  --border-default: #E2E9E7;
  --border-strong: #C6D0CE;
  --neutral-50: #F1F4F3;
  --neutral-100: #EDF1F0;
  --neutral-300: #D6DEDC;
  --neutral-500: #A9B4B1;
  --text-on-dark: #FFFFFF;
  --store-bg: #131E1D;
  --store-bg-hover: #0A100F;

  /* type — self-contained system stack (no external font CDN; F5-06 self-contained).
     Inter kept as first pref for devices that ship it; graceful native fallback otherwise. */
  --font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  /* space (base 4) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(15,30,28,0.06), 0 1px 3px rgba(15,30,28,0.08);
  --shadow-md: 0 4px 12px rgba(15,30,28,0.10), 0 2px 4px rgba(15,30,28,0.06);

  /* motion */
  --dur-fast: 140ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  /* layout */
  --maxw: 1120px;
  --maxw-doc: 800px;
}

/* dark mode — token color/dark set. Opt-in via prefers-color-scheme. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0B1413;
    --bg-surface: #121D1B;
    --text-primary: #EAF1EF;
    --text-secondary: #B5C4C1;
    --text-muted: #6C7B78;
    --brand-primary: #3BA79D;
    --brand-pressed: #2E8880;
    --brand-subtle: #16302D;
    --brand-subtle-border: #24433F;
    --accent-warning: #D6A150;
    --border-default: #243230;
    --border-strong: #3A4A47;
    --neutral-50: #182524;
    --neutral-100: #182524;
    --neutral-300: #2A3937;
    --neutral-500: #4A5A57;
    --store-bg: #182524;
    --store-bg-hover: #0F1A18;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(14,124,116,0.18); }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-pressed); }

img, svg { max-width: 100%; }
img { display: block; }

/* ---- focus (K4 — WCAG 2.1 AA keyboard visibility) ---- */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* remove the UA focus ring only where :focus-visible is supported (keyboard users still get the token ring) */
:focus:not(:focus-visible) { outline: none; }
/* store badges are dark-on-light; keep the ring readable against the dark chip */
.store:focus-visible { outline-color: var(--text-on-dark); outline-offset: 3px; }

/* ---- utilities ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--space-6); padding-right: var(--space-6); width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-default);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; min-height: 64px;
  padding: var(--space-2) var(--space-6);
  display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; color: var(--text-primary); }
.brand:hover { color: var(--text-primary); }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-mark i {
  width: 14px; height: 14px; border: 2.25px solid var(--text-on-dark); border-radius: 50%;
  border-right-color: transparent; transform: rotate(-45deg);
}
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: var(--space-6); margin-left: var(--space-3); flex-wrap: wrap; }
.nav a { font-size: 15px; font-weight: 500; color: var(--text-secondary); transition: color var(--dur-fast); }
.nav a:hover { color: var(--text-primary); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }

/* language switcher — native <details>/<summary>; works with zero JS, app.js only
   adds outside-click/Escape close. Items are real <a> links to the per-lang URLs. */
.lang { position: relative; }
.lang > summary { list-style: none; }               /* hide default disclosure marker */
.lang > summary::-webkit-details-marker { display: none; }
.lang-btn {
  display: flex; align-items: center; gap: var(--space-2); height: 38px; padding: 0 var(--space-3);
  border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--bg-surface);
  cursor: pointer; font-family: inherit; color: var(--text-primary); transition: border-color var(--dur-fast);
  user-select: none;
}
.lang-btn:hover { border-color: var(--border-strong); }
.lang-btn .globe { width: 15px; height: 15px; border: 1.75px solid var(--text-secondary); border-radius: 50%; }
.lang-btn .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--text-muted); transition: transform var(--dur-fast); }
.lang[open] > .lang-btn .caret { transform: rotate(180deg); }
.lang-btn .cur { font-size: 14px; font-weight: 600; }

.lang-menu {
  position: absolute; top: 46px; right: 0; min-width: 170px;
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px; z-index: 50;
}
.lang-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 38px;
  padding: 0 var(--space-3); border: none; background: transparent; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.lang-item:hover { background: var(--neutral-50); color: var(--text-secondary); }
.lang-item[aria-current="true"] { background: var(--brand-subtle); color: var(--brand-pressed); font-weight: 600; }
.lang-item .code { font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; }

/* footer language switcher opens upward (it sits at the bottom of the page) */
.footer-bottom .lang-menu { top: auto; bottom: 46px; }

.cta {
  height: 38px; padding: 0 var(--space-5); border-radius: var(--radius-pill);
  background: var(--brand-primary); color: var(--text-on-dark); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; transition: background var(--dur-fast); border: none; cursor: pointer;
}
.cta:hover { background: var(--brand-pressed); color: var(--text-on-dark); }

/* ============ HERO ============ */
main { flex: 1; }
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 72px var(--space-6) var(--space-8);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); background: var(--brand-subtle); margin-bottom: var(--space-6);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-primary); }
.chip span { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--brand-pressed); }

.hero h1 {
  font-size: 44px; line-height: 50px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 var(--space-5); text-wrap: balance;
}
.hero .sub { font-size: 18px; line-height: 27px; color: var(--text-secondary); margin: 0 0 var(--space-7); max-width: 520px; }

.badges { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
/* Store badges — real inline SVG logotypes (K3). The whole badge is one self-contained
   SVG (Apple/Google mark + wordmark). Sized by height so both align on the baseline. */
.store {
  display: inline-flex; align-items: center; height: 54px;
  border-radius: var(--radius-md); background: var(--store-bg); transition: background var(--dur-fast), transform var(--dur-fast);
  padding: 0 var(--space-5);
}
.store:hover { background: var(--store-bg-hover); }
.store:active { transform: translateY(1px); }
.store svg { height: 26px; width: auto; display: block; }
.cta-note { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: var(--space-2); }
.cta-note .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-warning); }

/* hero product-shot placeholder */
.shot-col { display: flex; justify-content: center; }
.phone {
  width: 300px; height: 604px; border-radius: 40px; background: var(--bg-surface);
  border: 1px solid var(--border-default); box-shadow: var(--shadow-md); padding: var(--space-3);
}
.phone-inner {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden; position: relative;
  background: repeating-linear-gradient(135deg, var(--neutral-100) 0, var(--neutral-100) 11px, var(--bg-primary) 11px, var(--bg-primary) 22px);
  display: flex; align-items: center; justify-content: center;
}
.phone-notch { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: center; }
.phone-notch i { width: 96px; height: 6px; border-radius: var(--radius-pill); background: var(--neutral-300); }
.phone-center { text-align: center; padding: 0 var(--space-6); }
.shot-label {
  font-size: 12px; font-family: var(--font-mono); color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-pill);
  padding: 6px var(--space-3); display: inline-block;
}
@keyframes tvring { from { stroke-dashoffset: 327; } to { stroke-dashoffset: 120; } }
.ring-anim { animation: tvring 3.6s var(--ease-standard) infinite alternate; }

/* ============ FEATURES ============ */
.section { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--space-6) var(--space-6); }
.section-head { max-width: 600px; margin-bottom: var(--space-8); }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--brand-primary); letter-spacing: 0.08em; text-transform: uppercase; }
.section-head h2 { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; margin: var(--space-2) 0 var(--space-3); }
.section-head p { font-size: 17px; line-height: 26px; color: var(--text-secondary); margin: 0; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.feature {
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 52px; height: 52px; border-radius: 14px; background: var(--brand-subtle);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4);
}
.feature h3 { font-size: 21px; line-height: 28px; font-weight: 600; margin: 0 0 var(--space-2); }
.feature p { font-size: 15px; line-height: 23px; color: var(--text-secondary); margin: 0; }

/* ============ TRUST / MEDICAL ============ */
.trust-wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--space-8) var(--space-6) 72px; }
.trust {
  background: var(--brand-subtle); border: 1px solid var(--brand-subtle-border); border-radius: var(--radius-lg);
  padding: var(--space-7); display: flex; gap: var(--space-5); align-items: flex-start;
}
.trust .ibadge {
  width: 40px; height: 40px; border-radius: var(--radius-md); border: 2px solid var(--brand-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 20px; font-weight: 700; color: var(--brand-primary); font-family: Georgia, serif;
}
.trust h3 { font-size: 21px; line-height: 28px; font-weight: 600; margin: 0 0 var(--space-2); color: var(--brand-pressed); }
.trust p { font-size: 15px; line-height: 23px; color: var(--text-primary); margin: 0; max-width: 820px; }

/* ============ LEGAL (privacy / terms) ============ */
.legal { max-width: var(--maxw-doc); margin: 0 auto; padding: 56px var(--space-6) 80px; }
.back-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 600; color: var(--brand-primary); margin-bottom: 28px; }
.legal h1 { font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--space-3); }
.legal .updated { font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: var(--space-6); }
.legal-summary {
  background: var(--brand-subtle); border: 1px solid var(--brand-subtle-border); border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6); margin-bottom: var(--space-8);
}
.legal-summary p { font-size: 15px; line-height: 24px; color: var(--text-primary); margin: 0; }
.legal section { margin-bottom: 28px; }
.legal section h3 { font-size: 19px; line-height: 26px; font-weight: 600; margin: 0 0 var(--space-3); color: var(--text-primary); }
.legal section p { font-size: 15px; line-height: 24px; color: var(--text-secondary); margin: 0 0 var(--space-3); }
.legal section ul { margin: 0 0 var(--space-3); padding-left: 22px; }
.legal section li { font-size: 15px; line-height: 24px; color: var(--text-secondary); margin-bottom: 6px; }

.deletion { border-top: 1px solid var(--border-default); margin-top: var(--space-4); padding-top: var(--space-8); }
.deletion h2 { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
.deletion .intro { font-size: 15px; line-height: 24px; color: var(--text-secondary); margin: 0 0 var(--space-5); }
.steps { display: flex; flex-direction: column; gap: var(--space-4); }
.step {
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: var(--space-5) 22px; display: flex; gap: var(--space-4); align-items: flex-start; box-shadow: var(--shadow-sm);
}
.step .n {
  width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--brand-subtle);
  color: var(--brand-primary); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step .t { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.step .b { font-size: 14px; line-height: 22px; color: var(--text-secondary); }

/* ============ FOOTER ============ */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border-default); margin-top: auto; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--space-6) var(--space-8); }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--space-7); margin-bottom: 44px; }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand .brand-mark { width: 32px; height: 32px; }
.footer-brand .brand-mark i { width: 13px; height: 13px; }
.footer-brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.footer-tag { font-size: 14px; line-height: 21px; color: var(--text-muted); margin: 0; max-width: 260px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--space-4); }
.footer-col .links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col .links a { font-size: 14px; color: var(--text-secondary); transition: color var(--dur-fast); }
.footer-col .links a:hover { color: var(--text-primary); }
.footer-addr { font-size: 13px; line-height: 20px; color: var(--text-muted); margin-top: 2px; }
.footer-bottom { border-top: 1px solid var(--neutral-100); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.footer-bottom .copy { font-size: 13px; color: var(--text-muted); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: var(--space-8); padding-top: var(--space-9); }
  .shot-col { order: -1; }
  .phone { width: 260px; height: 524px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .hero h1 { font-size: 36px; line-height: 42px; }
}
@media (max-width: 560px) {
  .nav { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; line-height: 36px; }
  .legal h1 { font-size: 28px; line-height: 34px; }
  .lang-btn .cur { display: none; }
}
