/* generated by server/site/build.mjs from server/site/ — edit the sources, then rebuild */
/* Deti Chat website. Tokens follow the app mockup: paper / ink / terracotta in light, iOS true dark in dark mode. */

/* ---------- fonts (self-hosted subsets: Latin + Vietnamese; SIL OFL, see /fonts/OFL.txt) ---------- */
@font-face { font-family: "Archivo"; src: url(/fonts/archivo-700.woff2?v=5beaf408a4) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/fonts/archivo-800.woff2?v=3d391f3f6b) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/be-vietnam-pro-400.woff2?v=9d251d4890) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/be-vietnam-pro-600.woff2?v=da40c06e74) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
/* Metric-matched fallbacks (widths measured against Arial) so the swap to the web fonts does not move the layout. */
@font-face { font-family: "Archivo fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial"); font-weight: 700 800; size-adjust: 97.2%; ascent-override: 90.3%; descent-override: 21.6%; line-gap-override: 0%; }
@font-face { font-family: "Be Vietnam Pro fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400; size-adjust: 110%; ascent-override: 90.9%; descent-override: 24.1%; line-gap-override: 0%; }
@font-face { font-family: "Be Vietnam Pro fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600; size-adjust: 104.8%; ascent-override: 95.4%; descent-override: 25.3%; line-gap-override: 0%; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --paper: #faf7f0; --raised: #ffffff; --sunken: #f0e9dd; --fill: rgba(107, 91, 78, .10);
  --ink: #30251e; --ink2: #6b5b4e; --ink3: #786b5c;
  --line: #e0d6c7; --line-strong: #cbbba7;
  --accent: #a14629; --accent-deep: #7d321e; --accent-text: #a14629; --wash: #f4e6d8; --on-accent: #fffaf3;
  --wm-sq: var(--accent);
  --shot-shadow: 0 30px 60px -30px rgba(48, 37, 30, .45), 0 2px 8px -2px rgba(48, 37, 30, .12);
  --head: "Archivo", "Archivo fallback", system-ui, sans-serif;
  --body: "Be Vietnam Pro", "Be Vietnam Pro fallback", -apple-system, system-ui, sans-serif;
  --max: 1120px;
  --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000; --raised: #1c1c1e; --sunken: #111112; --fill: rgba(118, 118, 128, .24);
    --ink: #f5f5f7; --ink2: rgba(235, 235, 245, .68); --ink3: rgba(235, 235, 245, .58);
    --line: rgba(255, 255, 255, .13); --line-strong: rgba(255, 255, 255, .22);
    --accent: #b9512f; --accent-deep: #8f3f22; --accent-text: #f08a66; --wash: rgba(194, 87, 58, .20); --on-accent: #ffffff;
    --wm-sq: #c2573a;
    --shot-shadow: 0 30px 60px -28px rgba(194, 87, 58, .30), 0 0 0 1px rgba(255, 255, 255, .10);
  }
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
strong { font-weight: 600; color: var(--ink); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- wordmark: "Deti" closed by a terracotta square, as in the app and the Deti admin ---------- */
.wm { font-family: var(--head); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); white-space: nowrap; }
.wm::after { content: ""; display: inline-block; width: .25em; height: .25em; margin-left: .07em; background: var(--wm-sq); }

/* ---------- header ---------- */
.top { padding-top: max(14px, env(safe-area-inset-top)); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand .wm { font-size: 28px; }
.brand span:last-child { font-family: var(--head); font-weight: 700; font-size: 17px; color: var(--ink2); letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 10px; border-radius: 10px; }
.nav a:hover { background: var(--fill); }
.nav a[aria-current="page"] { color: var(--accent-text); }
.nav .lang { margin-left: 4px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; letter-spacing: .04em; }
@media (max-width: 419px) { .nav .opt { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; font: 600 17px/1.2 var(--body); text-decoration: none; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 24px -14px var(--accent); }
.btn-primary:hover { background: var(--accent-deep); text-decoration: none; }
.btn-soon { background: var(--fill); color: var(--ink2); cursor: default; }
.btn-quiet { color: var(--ink); border: 1px solid var(--line-strong); }
.btn-quiet:hover { background: var(--fill); }
/* Install link and its "coming soon" stand-in share one grid cell, so swapping them never moves the layout. */
.slot { display: inline-grid; }
.slot > * { grid-area: 1 / 1; }
[data-when="ready"] { visibility: hidden; }
.install-ready [data-when="ready"] { visibility: visible; }
.install-ready [data-when="soon"] { visibility: hidden; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 7vw, 80px); overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink2); }
.eyebrow picture, .eyebrow img { width: 32px; height: 32px; border-radius: 8px; }
.eyebrow img { box-shadow: 0 0 0 1px var(--line); }
.hero h1 { margin-top: 20px; font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.4rem); line-height: 1.07; letter-spacing: -.035em; max-width: 13ch; }
.hero .lead { margin-top: 20px; font-size: clamp(1.06rem, 1rem + .4vw, 1.25rem); line-height: 1.6; color: var(--ink2); max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
@media (max-width: 479px) { .cta > *, .cta .slot > * { width: 100%; } }
.note { margin-top: 16px; font-size: 14.5px; color: var(--ink3); max-width: 40em; }
.stage { position: relative; justify-self: center; width: min(300px, 74vw); }
.stage::before {
  content: ""; position: absolute; inset: -12% -30% -8%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 45%, var(--wash), transparent 70%);
}
.shot { width: 100%; border-radius: 13.7% / 6.3%; box-shadow: var(--shot-shadow); background: var(--raised); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.label { font-size: 15px; font-weight: 600; color: var(--accent-text); }
.section h2 { margin-top: 10px; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.85rem); line-height: 1.1; max-width: 22ch; }
.section .lead { margin-top: 18px; font-size: clamp(1.03rem, 1rem + .25vw, 1.15rem); color: var(--ink2); max-width: 44em; }

.points { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0 48px; counter-reset: pt; }
@media (min-width: 720px) { .points { grid-template-columns: 1fr 1fr; } }
.points li { counter-increment: pt; padding: 22px 0 26px; border-top: 1px solid var(--line); }
.points li::before { content: counter(pt, decimal-leading-zero); display: block; font: 700 14px/1 var(--head); color: var(--accent-text); letter-spacing: .02em; }
.points h3 { margin-top: 12px; font-size: 1.25rem; line-height: 1.25; }
.points p { margin-top: 8px; color: var(--ink2); }

/* ---------- features ---------- */
.features { display: grid; gap: clamp(64px, 10vw, 112px); max-width: 980px; margin: clamp(40px, 7vw, 72px) auto 0; }
.feature { display: grid; gap: 28px; align-items: center; }
.feature figure { margin: 0; justify-self: center; width: min(250px, 66vw); }
.feature h3 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; max-width: 20ch; }
.feature p { margin-top: 14px; color: var(--ink2); max-width: 30em; }
@media (min-width: 760px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature figure { width: min(280px, 100%); }
  .feature:nth-child(even) figure { order: 2; }
}
.callout {
  display: grid; gap: 12px; align-items: start; max-width: 980px; margin: clamp(64px, 10vw, 112px) auto 0;
  padding: 24px; border-radius: 20px; background: var(--raised); box-shadow: 0 0 0 1px var(--line);
}
.callout svg { width: 28px; height: 28px; color: var(--accent-text); margin-top: 2px; }
@media (min-width: 560px) { .callout { grid-template-columns: auto 1fr; gap: 16px; padding: 28px; } }
.callout h3 { font-size: 1.25rem; line-height: 1.3; }
.callout p { margin-top: 6px; color: var(--ink2); }

/* ---------- privacy band ---------- */
.band { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band + .section { border-top: 0; }
.checks { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; max-width: 46em; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; font-size: 1.06rem; }
.checks svg { width: 22px; height: 22px; margin-top: 3px; color: var(--accent-text); }
.more { display: inline-block; margin-top: 28px; font-weight: 600; }

/* ---------- install ---------- */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: st; padding: 22px; border-radius: 20px; background: var(--raised); box-shadow: 0 0 0 1px var(--line); }
.steps li::before {
  content: counter(st); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--wash); color: var(--accent-text); font: 700 15px/1 var(--head);
}
.steps h3 { margin-top: 14px; font-size: 1.15rem; line-height: 1.3; }
.steps p { margin-top: 6px; color: var(--ink2); font-size: 16px; }
.steps a { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 16px; }
.install-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.install-cta .icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line); }
.install-cta .note { margin-top: 0; }

/* ---------- long-form pages ---------- */
.doc { padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 9vw, 96px); }
.doc .wrap { max-width: calc(720px + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.2rem); line-height: 1.08; letter-spacing: -.03em; }
.doc .meta { margin-top: 12px; font-size: 14.5px; color: var(--ink3); }
.doc .intro { margin-top: 20px; font-size: 1.12rem; color: var(--ink2); }
.doc h2 { margin-top: 48px; font-size: 1.45rem; line-height: 1.25; }
.doc h2 + p, .doc h2 + ul, .doc h2 + ol { margin-top: 12px; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 0; padding-left: 1.3em; }
.doc li + li { margin-top: 10px; }
.doc li::marker { color: var(--accent-text); }
.doc ol li { padding-left: .3em; }
.doc .aside { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--sunken); color: var(--ink2); font-size: 16px; }
.faq { margin-top: 12px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none;
  font-weight: 600; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 24px/1 var(--head); color: var(--accent-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--ink2); }
.center { text-align: center; }
.center .btn { margin-top: 28px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 max(40px, env(safe-area-inset-bottom)); font-size: 14.5px; color: var(--ink3); }
.foot .wrap { display: grid; gap: 18px; }
@media (min-width: 720px) { .foot .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.foot .wm { font-size: 22px; }
.foot p { margin-top: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { color: var(--ink2); text-decoration: none; font-weight: 600; padding: 6px 0; }
.foot nav a:hover { color: var(--accent-text); }
