/* Klatea marketing site — "the case file that comes alive"
   Warm Editorial Minimalism per the brand brief: paper ground, ink-teal Fraunces
   display, sage support, coral reserved for LIVE and the primary action.
   The dossier margin rail runs the whole page and names where you are in the
   product's arc (briefing → live → the method → … → q&a). */

@font-face {
  font-family: "Fraunces";
  src: url("assets/Fraunces-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F1EA;
  --card: #FFFDF8;
  --muted: #ECE7DC;
  --border: #DDD8CB;
  --fg: #20272A;
  --muted-fg: #646C6A;
  --subtle: #98A09B;
  --ink: #114353;          /* logomark teal: display + primary surfaces */
  --sage: #6B8A67;         /* logomark leaf */
  --sage-wash: #E8EDE2;
  --live: #D64550;         /* coral: the live dot + primary CTA only */
  --display: "Fraunces", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
  --rail-w: 72px;
  --content: 1020px;
  --r: 12px;
  --shadow: 0 14px 40px -18px rgba(17, 43, 53, .28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10181B;
    --card: #16211F;
    --muted: #1C2826;
    --border: #2A3835;
    --fg: #E7E3D8;
    --muted-fg: #9FAAA5;
    --subtle: #6E7A76;
    --ink: #A9C6D2;
    --sage: #8FAF8B;
    --sage-wash: #1E2B22;
    --live: #FB8A93;
    --shadow: 0 14px 40px -18px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
::selection { background: var(--sage); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 560; letter-spacing: -.015em; }
h1 em, h2 em { font-style: italic; color: var(--sage); margin-right: .12em; }

/* ---------- dossier margin rail ---------- */
.margin-rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w);
  border-right: 1px solid var(--border);
  z-index: 5; pointer-events: none;
}
.margin-rail span {
  position: absolute; top: 96px; left: 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 10.5px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase;
  color: var(--subtle); background: var(--bg); padding: 12px 0;
  transition: opacity .3s;
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 16px 40px 16px calc(var(--rail-w) + 40px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand-lockup { height: 26px; width: auto; }
@media (prefers-color-scheme: dark) { .brand-lockup { filter: brightness(0) invert(.92); } }
.top-nav { display: flex; gap: 22px; margin-left: auto; }
.top-nav a { font-size: 13.5px; font-weight: 500; color: var(--muted-fg); text-decoration: none; }
.top-nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--live); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-quiet:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); padding: 9px 18px; font-size: 13.5px; }
.btn-ghost:hover { background: var(--muted); }

/* ---------- layout ---------- */
main { padding-left: var(--rail-w); }
section { max-width: var(--content); margin: 0 auto; padding: 110px 40px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; margin-bottom: 14px; }
.section-head p { color: var(--muted-fg); font-size: 17px; }

/* ---------- hero ---------- */
.hero { padding-top: 96px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-fg); margin-bottom: 26px;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 45%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.hero h1 { font-size: clamp(44px, 7.2vw, 84px); line-height: 1.04; max-width: 15ch; margin-bottom: 26px; }
.hero-sub { max-width: 58ch; color: var(--muted-fg); font-size: 18px; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-fine { font-size: 13px; color: var(--subtle); }

/* ---------- demo (the signature) ---------- */
.demo-frame {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
  font-size: 14px;
}
.demo-topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.d-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink);
  background: var(--muted); padding: 4px 10px; border-radius: 6px; }
.d-title { font-size: 13px; color: var(--muted-fg); }
.d-spacer { flex: 1; }
.d-mic { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--subtle);
  background: var(--muted); padding: 3px 9px; border-radius: 6px; transition: color .15s; }
.d-mic.on { color: var(--sage); }
.d-meter { width: 30px; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; display: inline-block; }
.d-meter span { display: block; height: 100%; width: 0; background: var(--sage); border-radius: 999px; transition: width .18s linear; }
.d-badge { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted-fg); background: var(--muted);
  padding: 3px 9px; border-radius: 6px; }
.d-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--live); }
.d-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.8s infinite; }
.demo-talkbar { position: relative; height: 22px; background: var(--muted); overflow: hidden; font-size: 11px;
  border-bottom: 1px solid var(--border); }
.demo-talkbar div { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sage-wash); transition: width .6s ease; }
.demo-talkbar span { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 14px;
  color: var(--muted-fg); font-weight: 600; }
.demo-stage { display: grid; grid-template-columns: 1fr 300px; min-height: 380px; }
.demo-stream { padding: 20px 20px 26px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); overflow: hidden; }
.d-utt { max-width: 85%; opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.d-utt.in { opacity: 1; transform: none; }
.d-utt .d-who { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--subtle); margin-bottom: 4px; }
.d-utt.me { align-self: flex-end; text-align: right; }
.d-utt.me .d-who { color: var(--sage); }
.d-bubble { padding: 10px 14px; border-radius: 12px; line-height: 1.5; text-align: left; }
.d-utt.them .d-bubble { background: var(--card); border: 1px solid var(--border); border-top-left-radius: 4px; }
.d-utt.me .d-bubble { background: var(--sage-wash); border: 1px solid color-mix(in srgb, var(--sage) 35%, transparent); border-top-right-radius: 4px; }
.d-tr { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border); color: var(--sage); font-weight: 500; }
.d-utt.helped .d-bubble { border-left: 3px solid var(--sage); }
.d-utt.helped .d-who::after { content: " · helped"; color: var(--sage); text-transform: none; letter-spacing: 0; }
.d-note { align-self: center; font-size: 12px; color: var(--muted-fg); background: var(--muted); border-radius: 999px; padding: 5px 14px;
  opacity: 0; transition: opacity .3s; }
.d-note.in { opacity: 1; }
.demo-rail { border-left: 1px solid var(--border); background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.d-help-btn { background: var(--ink); color: var(--bg); text-align: center; font-weight: 600; font-size: 13px;
  padding: 10px; border-radius: 8px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.d-chips span { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted-fg); }
.demo-rail-body { display: flex; flex-direction: column; gap: 10px; }
.d-sug { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--sage); border-radius: 8px;
  padding: 12px; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.d-sug.in { opacity: 1; transform: none; }
.d-sug .d-sug-trigger { font-size: 11px; color: var(--subtle); border-left: 2px solid var(--border); padding-left: 8px; margin-bottom: 8px; }
.d-sug .d-sug-head { font-weight: 600; font-size: 13px; color: var(--fg); margin-bottom: 6px; }
.d-sug ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted-fg); }
.d-sug ul li + li { margin-top: 3px; }
.demo-replay { position: absolute; right: 14px; bottom: 12px; font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.demo-replay:hover { background: var(--muted); }
.demo-caption { font-size: 12.5px; color: var(--subtle); margin-top: 14px; }

/* ---------- method ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 44px; margin-bottom: 72px; }
.steps h3 { font-size: 21px; margin: 10px 0 8px; }
.steps p { color: var(--muted-fg); font-size: 15px; }
.step-n { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--sage-wash); color: var(--sage); font-weight: 700; font-size: 14px; }
.evidence { margin: 0 0 56px; }
.evidence img { border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.evidence figcaption { font-size: 13px; color: var(--subtle); margin-top: 12px; }

/* ---------- translation ---------- */
.translate-visual { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 36px; text-align: center; margin-bottom: 26px; box-shadow: var(--shadow); }
.tr-line { font-size: clamp(20px, 3vw, 30px); font-family: var(--display); color: var(--fg); }
.tr-arrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); margin: 16px 0; }
.tr-en { color: var(--sage); }
.facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.facts li { font-size: 14px; color: var(--muted-fg); border-top: 2px solid var(--sage); padding-top: 12px; }
.facts strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 3px; }

/* ---------- privacy ---------- */
.privacy-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.privacy-list h3 { font-size: 19px; margin-bottom: 8px; }
.privacy-list p { color: var(--muted-fg); font-size: 14.5px; }

/* ---------- film ---------- */
.film video { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow); }
.film-tour { margin-top: 56px; }
.film-tour h3 { font-size: 24px; margin-bottom: 8px; }
.film-tour p { color: var(--muted-fg); font-size: 15px; margin-bottom: 20px; max-width: 60ch; }
.film-tuts { margin-top: 56px; }
.film-tuts h3 { font-size: 24px; margin-bottom: 8px; }
.film-tuts p { color: var(--muted-fg); font-size: 15px; margin-bottom: 20px; max-width: 60ch; }
.film-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.film-grid figure { margin: 0; }
.film-grid figcaption { margin-top: 10px; font-size: 15px; color: var(--muted-fg); }
@media (max-width: 720px) { .film-grid { grid-template-columns: 1fr; } }

/* ---------- get / plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px; }
.plan-featured { border-color: var(--ink); box-shadow: var(--shadow); }
.plan h3 { font-size: 22px; }
.plan-price { font-family: var(--display); font-size: 17px; color: var(--sage); font-weight: 600; }
.plan-desc { font-size: 14.5px; color: var(--muted-fg); }
.plan ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted-fg); flex: 1; }
.plan ul li + li { margin-top: 6px; }
.plan .btn { width: 100%; }
.plan-link { font-size: 13px; text-align: center; color: var(--muted-fg); }
.plan-soon { opacity: .82; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; max-width: 720px; }
.faq summary { font-weight: 600; font-size: 16px; color: var(--ink); cursor: pointer; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 0; font-family: var(--display); font-size: 20px; color: var(--sage); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted-fg); font-size: 15px; max-width: 62ch; }

/* ---------- footer ---------- */
.foot { max-width: var(--content); margin: 0 auto; padding: 110px 40px 70px calc(var(--rail-w) + 40px); text-align: left; }
.foot-mark { height: 34px; width: auto; margin-bottom: 16px; opacity: .9; }
.foot p { font-size: 14px; color: var(--muted-fg); }
.foot a { color: var(--ink); }
.foot-fine { margin-top: 6px; font-size: 12.5px; color: var(--subtle); }

/* ---------- scroll reveals ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .d-utt, .d-sug, .d-note { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --rail-w: 0px; }
  .margin-rail { display: none; }
  .top { padding: 14px 20px; }
  .top-nav { display: none; }
  section { padding: 80px 20px 0; }
  .demo-stage { grid-template-columns: 1fr; }
  .demo-rail { border-left: none; border-top: 1px solid var(--border); }
  .steps, .facts, .privacy-list, .plans { grid-template-columns: 1fr; }
  .foot { padding: 90px 20px 60px; }
}
