/* Aeli — лендинг, V3, палитра «Голубой» */

:root {
  --accent: #2774B8;
  --accent-soft: #E5F1FB;
  --accent-ink: #1D5A91;
  --blob1: #BFDDF5;
  --blob2: #D4ECF7;
  --blob3: #DCE3FA;

  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #F8F6F2;
  --surface-3: #FAF9F7;
  --ink: #1A1A17;
  --ink-2: #55544E;
  --ink-3: #6B6A63;
  --ink-4: #8A8982;
  --line: #E7E5DF;
  --line-2: #E0DED8;

  --font-body: 'Onest', system-ui, sans-serif;
  --font-head: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-logo: 'Cormorant Garamond', 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
button { font-family: inherit; }
h1, h2, h3, p { margin: 0; }

.container { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.h-display { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.012em; }
.h-display em, .h1 em, .h2 em { font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: -0.005em; }
.h1 { font-size: clamp(48px, 7.4vw, 100px); line-height: 0.98; letter-spacing: -0.018em; max-width: 1000px; }
.h2 { font-size: clamp(40px, 4.7vw, 62px); line-height: 1.04; }
.h2-lg { font-size: clamp(42px, 5vw, 66px); line-height: 1.02; }
.lead { font-size: 19px; color: var(--ink-2); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.muted { color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 32px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); }
.btn-white { background: #fff; color: var(--ink); padding: 0 30px; }

.card { background: var(--surface); border: 1px solid var(--line); }

.icon-tile {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Animations ===== */
@keyframes drift1 { 0%{transform:translate(0,0) scale(1)} 50%{transform:translate(120px,60px) scale(1.12)} 100%{transform:translate(-40px,120px) scale(.95)} }
@keyframes drift2 { 0%{transform:translate(0,0) scale(1)} 50%{transform:translate(-140px,80px) scale(.9)} 100%{transform:translate(60px,-40px) scale(1.1)} }
@keyframes drift3 { 0%{transform:translate(0,0) scale(1)} 50%{transform:translate(80px,-70px) scale(1.15)} 100%{transform:translate(-100px,30px) scale(1)} }
@keyframes flow { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes ring { 0%{transform:scale(1);opacity:.45} 100%{transform:scale(2.4);opacity:0} }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes reveal { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .75; }
.blob.b1 { width: 560px; height: 560px; left: -120px; top: -160px; background: var(--blob1); animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 620px; height: 620px; right: -160px; top: -80px; background: var(--blob2); animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { width: 480px; height: 480px; left: 38%; top: 260px; background: var(--blob3); animation: drift3 38s ease-in-out infinite alternate; }

.flow-wrap { position: absolute; left: 0; right: 0; bottom: 40px; height: 220px; overflow: hidden; }
.flow { position: absolute; left: 0; top: 0; width: 200%; height: 100%; animation: flow 22s linear infinite; }
.flow.slow { animation-duration: 34s; }
.flow.fast { animation-duration: 16s; }


.ring { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ring 2.2s ease-out infinite; }
.ring.d { animation-delay: 1.1s; }

.fade-up { animation: fadeUp .4s ease-out both; }

.grid-bg {
  background-image: linear-gradient(#ECEAE4 1px, transparent 1px), linear-gradient(90deg, #ECEAE4 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000 0, transparent 70%);
  mask-image: radial-gradient(circle at 100% 0, #000 0, transparent 70%);
}
.stripes { background-image: repeating-linear-gradient(135deg, #E9E7E1 0 1px, transparent 1px 14px); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .flow, .ring, .fade-up, .sig-line, .sig-line svg, .soap-row, .fmt-chip { animation: none; }
  .ring { display: none; }
}

/* ===== Signal wave (recording) ===== */
.sig-wave { position: relative; height: 40px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.sig-line { position: absolute; inset: 0; transform-origin: center; animation: sigAmp 2.6s ease-in-out infinite; }
.sig-line svg { display: block; width: 200%; height: 100%; animation: flow 6s linear infinite; }
.sig-line path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sig-line.l1 path { stroke-opacity: .9; }
.sig-line.l2 { animation-duration: 1.9s; animation-delay: -.6s; }
.sig-line.l2 svg { animation-duration: 3.8s; animation-direction: reverse; }
.sig-line.l2 path { stroke-opacity: .5; stroke-width: 2; }
.sig-line.l3 { animation-duration: 3.4s; animation-delay: -1.4s; }
.sig-line.l3 svg { animation-duration: 9s; }
.sig-line.l3 path { stroke-opacity: .28; stroke-width: 2; }
@keyframes sigAmp { 0%, 100% { transform: scaleY(.5); } 30% { transform: scaleY(1); } 55% { transform: scaleY(.6); } 75% { transform: scaleY(.9); } }
.how-wave { height: 60px; margin: 14px 0 12px; }
.how-grid:not(.is-play) [data-panel="live"] .sig-line,
.how-grid:not(.is-play) [data-panel="live"] .sig-line svg { animation-play-state: paused; }
.ph-wave { align-self: stretch; height: 44px; }

/* ===== Header / Hero ===== */
.hero-wrap { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(180deg, rgba(245,243,239,0), var(--bg)); }

.site-header { position: relative; }
.site-header .container { padding-top: 22px; padding-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.header-left { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.logo { font-family: var(--font-logo); font-weight: 600; font-size: 32px; letter-spacing: 0; text-decoration: none; color: var(--ink); }
.nav { display: flex; gap: 32px; flex-wrap: wrap; font-size: 16px; font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--accent-ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); }
.btn-download {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid rgba(26,26,23,0.12); background: rgba(255,255,255,0.65);
  font-size: 16px; font-weight: 500; text-decoration: none; transition: background .2s ease;
}
.btn-download:hover { background: #fff; }

.hero { position: relative; padding-top: 128px; padding-bottom: 200px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.hero-sub { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 640px; }
.hero-sub .hl { color: var(--accent); font-weight: 500; }
.hl { color: var(--accent); }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.cta-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-4); }

/* ===== Before / After ===== */
.section-stats { padding-bottom: 96px; }
.stats {
  border-radius: 36px; padding: clamp(32px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
}
.stats h2 { flex: 1 1 340px; font-size: clamp(38px, 4.3vw, 58px); line-height: 1.08; }
.stats-grid { flex: 1.4 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { padding: 32px; border-radius: 24px; background: var(--bg); }
.stat-label, .stat-note { font-size: 15px; color: var(--ink-3); }
.stat-label { font-weight: 500; }
.stat-note { margin-top: 8px; }
.stat-value { font-family: var(--font-head); font-weight: 600; font-size: clamp(56px, 5.4vw, 76px); line-height: 1; white-space: nowrap; letter-spacing: -0.02em; margin-top: 8px; color: var(--ink-4); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.stat.is-accent { background: var(--accent); color: #fff; }
.stat.is-accent .stat-label, .stat.is-accent .stat-note { color: rgba(255,255,255,0.85); }
.stat.is-accent .stat-value { color: #fff; }

/* ===== How it works / Templates ===== */
.section-how { padding-top: 40px; padding-bottom: 112px; display: flex; flex-direction: column; align-items: center; }
.how-head { text-align: center; display: flex; flex-direction: column; gap: 16px; margin-bottom: 44px; }
.how-title { font-size: clamp(48px, 6vw, 80px); line-height: 1; }

.how-sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); }

/* mode tabs */
.how-modes { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(26,26,23,0.25); max-width: 100%; overflow-x: auto; }
.how-mode {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-4); font-size: 17px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}
.how-mode:hover { color: var(--ink); }
.how-mode svg { flex: none; }
.how-mode[aria-selected="true"] {
  background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px -6px rgba(39,116,184,0.6), 0 1px 4px rgba(39,116,184,0.25);
  animation: chipActivate .32s cubic-bezier(.34,1.56,.64,1) both;
}
.how-mode::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 5px; height: 2px; border-radius: 2px;
  background: rgba(255,255,255,0.85); transform: scaleX(0); transform-origin: left; opacity: 0;
}
.how-mode.is-progressing::after { opacity: .7; animation: howProgress var(--prog-ms, 9s) linear forwards; }

/* template chips */
.how-tpls { margin-top: 24px; display: flex; align-items: center; gap: 10px; max-width: 100%; }
.how-tpl-label { flex: none; font-family: var(--font-logo); font-style: italic; font-weight: 500; color: var(--ink-3); font-size: 20px; }
.how-tpl-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tpl-chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.tpl-chip:hover { border-color: #CFCDC6; color: var(--ink); }
.tpl-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(39,116,184,0.45); color: var(--accent-ink); animation: chipActivate .32s cubic-bezier(.34,1.56,.64,1) both; }
.how-caption { margin: 18px auto 40px; max-width: 680px; text-align: center; font-family: var(--font-logo); font-style: italic; font-weight: 500; font-size: 19px; line-height: 1.45; color: var(--ink-3); min-height: 3em; transition: opacity .22s ease; }
.how-caption.is-swap { opacity: 0; }

/* grid */
.how-grid { align-self: stretch; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 24px; align-items: stretch; }
.how-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.how-label { font-family: var(--font-logo); font-style: italic; font-weight: 500; font-size: 19px; color: var(--ink-4); padding-left: 4px; }
.how-label.is-accent { color: var(--accent); }
.how-card { flex: 1; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; min-height: 756px; }
.how-out { box-shadow: 0 24px 48px -30px rgba(26,26,23,0.3); overflow: hidden; }
.how-out::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(39,116,184,0.08) 50%, transparent 70%); transform: translateX(-100%); }

.how-arrow {
  position: relative; align-self: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(26,26,23,0.05);
}
.how-arrow::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgba(39,116,184,0.18), transparent 70%); opacity: 0; }

/* input: live */
.rec-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #E2574C; animation: recFade 1.8s ease-in-out infinite; }
.rec-time { font-variant-numeric: tabular-nums; }
.how-grid.is-play [data-panel="live"] .tlines { display: flex; flex-direction: column; gap: 14px; }
.tline { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: 16px; line-height: 1.5; }
.tline .who { padding-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.tline.is-client .who { color: var(--accent); }
.how-grid.is-play .tline { animation: lineIn .46s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(.4s + var(--i) * .45s); }

/* input: dictate */
.dict-mic { position: relative; width: 76px; height: 76px; margin: 40px auto 36px; }
.dict-core { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px -10px var(--accent); }
.dict-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; }
.how-grid.is-play [data-panel="dictate"] .dict-core { animation: micBreath 3.6s ease-in-out infinite; }
.how-grid.is-play [data-panel="dictate"] .dict-ring { animation: micRing 3.6s cubic-bezier(.16,1,.3,1) infinite; }
.how-grid.is-play [data-panel="dictate"] .dict-ring.r2 { animation-delay: 1.2s; }
.how-grid.is-play [data-panel="dictate"] .dict-ring.r3 { animation-delay: 2.4s; }
.dict-text { font-size: 17px; line-height: 1.6; min-height: 8em; }
.dict-cursor { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; background: var(--ink); transform: translateY(3px); animation: cursorBlink 1s steps(2) infinite; }

/* output */
.out-head { display: flex; align-items: center; gap: 14px; }
.out-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-ink); color: #fff; font-family: var(--font-logo); font-weight: 600; font-size: 21px; display: inline-flex; align-items: center; justify-content: center; }
.out-who { flex: 1; min-width: 0; }
.out-name { font-family: var(--font-logo); font-weight: 600; font-size: 23px; line-height: 1.2; }
.out-meta { font-size: 14px; color: var(--ink-3); }
.out-date { text-align: right; font-size: 14px; color: var(--ink-3); line-height: 1.4; }
.out-date span { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-4); }
.out-divider { height: 1px; margin: 18px 0 20px; background: transparent; }
.out-divider span { display: block; height: 100%; background: var(--line); transform-origin: left; }
.out-body { position: relative; }
.out-skeleton { position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; }
.out-skeleton span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EEECE7 0%, #F6F5F1 50%, #EEECE7 100%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.out-skeleton span:nth-child(3n+1) { height: 10px; margin-top: 8px; background: var(--accent-soft); animation: none; }
.out-sections { display: flex; flex-direction: column; gap: 16px; }
.out-sec .k { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }
.out-sec .v { font-size: 16px; line-height: 1.5; }
.out-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.out-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.out-tag.is-ok { border-color: rgba(63,154,106,0.35); background: #EEF7F1; color: #2C6E4B; }
.out-list { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.out-list li { position: relative; padding-left: 18px; font-size: 16px; line-height: 1.45; }
.out-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .55; }
/* custom template: user-defined section name + description */
.out-sections.is-custom { gap: 12px; }
.out-sections.is-custom .out-sec:not(.custom-bar) { padding-bottom: 12px; border-bottom: 1px solid #EFEDE8; }
.out-sections.is-custom .out-sec:last-child { border-bottom: 0; padding-bottom: 0; }
.sec-desc { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; line-height: 1.4; color: var(--ink-3); }
.sec-desc-label { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.custom-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.custom-bar > svg { flex: none; }
.custom-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.custom-bar-text strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.custom-bar-text span { font-size: 13px; }

/* play sequence (output) — --base = when the note starts writing */
.how-grid.is-play .how-in .how-panel:not([hidden]) { animation: hpFade .48s cubic-bezier(.16,1,.3,1) both; }
.how-grid.is-out .out-head { animation: lineIn .42s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--base) * .15); }
.how-grid.is-out .out-divider span { animation: lineDraw .6s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--base) * .15 + .2s); }
.how-grid.is-out .out-skeleton { animation: skelLife var(--base) linear both; }
.how-grid.is-out .out-sec { animation: lineIn .48s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--base) + .25s + var(--i) * .22s); }
.how-grid.is-out.has-base .how-arrow { animation: arrowHandoff 1.1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--base); }
.how-grid.is-out.has-base .how-arrow::before { animation: arrowHalo 1.1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--base); }
.how-grid.is-out.has-base .how-arrow svg { animation: arrowNudge 1.1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--base); }
.how-grid.is-out.has-base .how-out::before { animation: sheen 1.4s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--base); }

@keyframes chipActivate { 0% { transform: scale(.96); } 55% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes howProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hpFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes lineIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes lineDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes recFade { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes micBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes micRing { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.3); opacity: 0; } }
@keyframes cursorBlink { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes skelLife { 0% { opacity: 0; } 12% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes arrowHandoff { 0% { transform: scale(1); box-shadow: 0 1px 2px rgba(26,26,23,.05); } 35% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(39,116,184,.16), 0 6px 18px -6px rgba(39,116,184,.5); } 100% { transform: scale(1); box-shadow: 0 1px 2px rgba(26,26,23,.05); } }
@keyframes arrowHalo { 0% { opacity: 0; transform: scale(.85); } 35% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes arrowNudge { 0% { transform: translateX(0); } 40% { transform: translateX(3px); } 100% { transform: translateX(0); } }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .how-grid *, .how-grid *::before, .how-mode, .tpl-chip { animation: none !important; }
  .out-skeleton { display: none; }
  .dict-cursor { display: none; }
}

@media (max-width: 900px) {
  .how-grid { grid-template-columns: minmax(0,1fr); }
  .how-arrow svg { transform: rotate(90deg); }
  .how-grid.is-out.has-base .how-arrow svg { animation: none; }
  .how-arrow { justify-self: center; }
  .how-card { min-height: 0; }
  .how-out { min-height: 0; }
}
@media (max-width: 640px) {
  .how-tpls { flex-direction: column; align-items: stretch; width: 100%; }
  .how-tpl-label { text-align: center; }
  .how-tpl-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
  .how-tpl-row::-webkit-scrollbar { display: none; }
  .how-mode { padding: 0 13px; font-size: 15px; gap: 6px; }
  .how-card { padding: 20px; }
  .tline { grid-template-columns: 1fr; gap: 2px; }
  .out-date { display: none; }
}

/* ===== Features ===== */
.section-features { padding-top: 24px; padding-bottom: 96px; }
.features { position: relative; border-radius: 36px; padding: clamp(32px, 5vw, 72px); overflow: hidden; }
.features .grid-bg { position: absolute; top: 0; right: 0; width: 420px; height: 320px; pointer-events: none; }
.features-inner { position: relative; display: flex; flex-wrap: wrap; gap: 56px; }
.features-intro { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.features-intro .lead { max-width: 440px; }
.features-grid { flex: 1.4 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 48px 40px; }
.feature { display: flex; flex-direction: column; gap: 12px; }
.feature-title { font-family: var(--font-head); font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -0.005em; }

/* ===== Steps ===== */
.section-steps { padding-top: 64px; padding-bottom: 112px; display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.steps-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.steps-text .lead { max-width: 520px; }
.steps { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; align-items: center; gap: 18px; font-size: 18px; font-weight: 500; }

.phone-stage { flex: 1 1 420px; min-width: 0; position: relative; overflow: clip; overflow-clip-margin: 40px; height: 520px; display: flex; align-items: center; justify-content: center; }
.phone-stage .stripes { position: absolute; width: 400px; max-width: 80%; aspect-ratio: 1; border-radius: 64px; transform: rotate(45deg); border: 1px solid var(--line); }
.phone {
  position: relative; width: 250px; height: 440px; background: #fff; border: 6px solid #ECEAE4; border-radius: 40px;
  box-shadow: 0 24px 48px -20px rgba(26,26,23,0.25); padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.ph-line { height: 10px; border-radius: 5px; background: #ECEAE4; }
.ph-line.sm { height: 8px; border-radius: 4px; background: #F2F1EC; }
.ph-mic-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.ph-mic { position: relative; width: 96px; height: 96px; }
.ph-mic .core { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; }

/* ===== Privacy (cards with mini-illustrations) ===== */
.section-privacy { padding-top: 16px; padding-bottom: 112px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.privacy-title { text-align: center; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.06; max-width: 980px; }
.privacy-grid { align-self: stretch; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.pcard { border-radius: 24px; padding: 24px 24px 32px; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 24px 48px -32px rgba(26,26,23,0.25); }
.pcard-art { position: relative; height: 210px; margin-bottom: 28px; display: flex; align-items: center; justify-content: center; }
.pcard-art--left { justify-content: flex-start; }
.pcard-art--right { justify-content: flex-end; }
.pcard-title { font-family: var(--font-head); font-weight: 600; font-size: 32px; line-height: 1.05; letter-spacing: -0.005em; margin-bottom: 10px; }
.pcard-text { color: var(--ink-3); font-size: 16px; }
.pcard-text a { color: var(--accent-ink); }

/* 1 — redacted transcript */
.mini-doc .mini-line { padding-left: 2px; }
.mini-doc { align-self: stretch; width: 100%; background: var(--surface-2); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--ink-3); }
.mini-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 4px; }
.mini-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.redact { position: relative; color: transparent; border-radius: 4px; background: var(--accent-ink); opacity: .85; padding: 0 2px; }
.mini-chip { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

/* 1 — SOAP note */
.soap-card { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 14px 30px -20px rgba(26,26,23,0.3); }
.soap-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; margin-bottom: 2px; border-bottom: 1px solid #EFEDE8; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.soap-ready { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; letter-spacing: 0; text-transform: none; }
.soap-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; animation: soapGlow 6s ease-in-out infinite; animation-delay: calc(var(--r) * 1.5s); }
.soap-letter { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.soap-text { min-width: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes soapGlow { 0%, 22%, 100% { background: transparent; } 8%, 14% { background: rgba(39,116,184,0.08); } }

/* 3 — formats */
.fmt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 250px; }
.fmt-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; font-weight: 500; color: var(--ink-2); animation: fmtPick 8s ease-in-out infinite; animation-delay: calc(var(--r) * 1s); }
.fmt-chip.is-own { animation: none; border-style: dashed; border-color: rgba(39,116,184,0.45); background: #fff; color: var(--accent-ink); }
@keyframes fmtPick { 0%, 9%, 100% { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); } 3%, 6% { background: var(--accent-soft); border-color: rgba(39,116,184,0.45); color: var(--accent-ink); } }

/* 2 — lock orb */
.lock-orb { position: relative; width: 64px; height: 64px; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid var(--accent); opacity: .18; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.orb-ring.r1 { width: 104px; height: 104px; background: rgba(39,116,184,0.05); }
.orb-ring.r2 { width: 156px; height: 156px; opacity: .1; }
.orb-core { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px var(--accent); }
.owner-chip { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); box-shadow: 0 8px 20px -12px rgba(26,26,23,0.3); }
.owner-chip .avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

/* 3 — policy chips */
.doc-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.doc-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.doc-chip svg { color: var(--accent); }

/* 4 — demo chat */
.demo-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; width: 100%; }
.bubble { font-size: 13px; padding: 8px 12px; border-radius: 10px; }
.bubble-q { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.bubble-a { align-self: stretch; display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.bubble-a .play { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.demo-meta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-4); }
.green-dot { width: 7px; height: 7px; border-radius: 50%; background: #3F9A6A; }

/* 4 — security */
.sec-stack { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sec-line { align-self: stretch; font-size: 13px; color: var(--ink-3); padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.sec-shield { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px var(--accent); }
.sec-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sec-check { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

.privacy-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.btn-lg { min-height: 60px; padding: 0 44px; font-size: 18px; }

/* ===== Pricing ===== */
.section-pricing { padding-bottom: 112px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.pricing-intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pricing-intro .lead { max-width: 440px; }
.price-card { flex: 1 1 440px; min-width: 0; border-radius: 32px; padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 24px; box-shadow: 0 24px 48px -32px rgba(26,26,23,0.25); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-head); font-weight: 600; font-size: 68px; letter-spacing: -0.02em; line-height: 1; }
.price-sep { height: 1px; background: #ECEAE4; }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.price-list li { display: flex; gap: 12px; align-items: flex-start; }
.price-list li svg { flex: none; margin-top: 3px; }
.price-list li.is-muted { color: var(--ink-4); }

/* ===== CTA ===== */
.section-cta { padding-bottom: 96px; }
.cta {
  position: relative; overflow: hidden; background: var(--accent); color: #fff; border-radius: 36px;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 80px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
}
.cta h2 { font-size: clamp(42px, 5.4vw, 72px); line-height: 1.04; max-width: 760px; }
.cta p { font-size: 19px; color: rgba(255,255,255,0.85); }

/* ===== Footer ===== */
.site-footer .container { padding-top: 48px; padding-bottom: 48px; border-top: 1px solid #E4E2DC; display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .logo { font-size: 28px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact .label { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.footer-contact a { font-family: var(--font-head); font-size: 28px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--ink-3); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-3); }

/* ===== Focus ===== */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ===== Phone width ===== */
@media (max-width: 640px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .header-left { gap: 20px; }
  .nav { gap: 20px; }
  .hero { padding-top: 64px; padding-bottom: 140px; }
  .stat-value { font-size: 60px; }
  .picker-card { padding: 16px; }
  .phone-stage { height: 480px; }
  .pcard-art { height: 170px; margin-bottom: 20px; }
}

/* ===== Subpages: pricing / contact ===== */
.page-hero { padding-top: 88px; padding-bottom: 150px; gap: 22px; }
.subpage .section-features { padding-top: 0; }

.section-plan { padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: -40px; position: relative; }
.billing { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(26,26,23,0.25); }
.billing-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); font-size: 16px; font-weight: 500; cursor: pointer; transition: background .2s ease, color .2s ease; }
.billing-opt:hover { color: var(--ink); }
.billing-opt[aria-checked="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.billing-save { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.plan-card { width: 100%; max-width: 560px; flex: none; }
.plan-note { margin-top: -10px; font-size: 15px; }
.price.is-swap { animation: fadeUp .35s ease-out both; }

.contact-cta { align-self: flex-start; margin-top: 8px; }
.contact-link { margin-top: 2px; font-weight: 600; color: var(--accent-ink); text-decoration: none; word-break: break-word; }
.contact-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .page-hero { padding-top: 48px; padding-bottom: 110px; }
  .billing-opt { padding: 0 14px; font-size: 15px; }
}

/* ===== Client dynamics: charts ===== */
.section-charts { padding-top: 24px; padding-bottom: 96px; }
.charts { border-radius: 36px; padding: clamp(28px, 4.5vw, 64px); display: flex; flex-direction: column; gap: 40px; }
.charts-head { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .charts-grid { grid-template-columns: minmax(0, 1fr); } }
.chart-tile { margin: 0; padding: 20px 20px 18px; border-radius: 22px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-title { font-family: var(--font-head); font-weight: 600; font-size: 24px; line-height: 1.1; }
.ct-chip { flex: none; padding: 3px 9px; border-radius: 999px; background: #ECEAE5; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.chart-tile.is-custom .ct-chip { background: #fff; border: 1px dashed rgba(39,116,184,0.45); color: var(--accent-ink); }
.ct-sub { font-size: 13px; color: var(--ink-3); }
.ct-foot { font-size: 14px; color: var(--ink-2); }
.c-svg { display: block; width: 100%; height: auto; margin: 6px 0 4px; overflow: visible; }
.c-grid { stroke: #E2E0DA; stroke-width: 1; }
.c-ax { font-size: 9px; fill: var(--ink-4); font-family: var(--font-body); }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.c-area { fill: var(--accent); opacity: .08; }
.c-dot { fill: var(--accent); stroke: var(--surface-2); stroke-width: 2; transition: r .15s ease; }
.c-hit { fill: transparent; }
.c-tip { font-size: 12px; font-weight: 600; fill: var(--ink); font-family: var(--font-body); opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.c-val { font-size: 13px; font-weight: 600; fill: var(--ink); font-family: var(--font-body); }
.c-pt:hover .c-dot { r: 6; }
.c-pt:hover .c-tip { opacity: 1; }
.chart-tile:has(.c-pt:hover) .c-val { opacity: 0; }

/* draw-in animation, played once when the block scrolls into view */
.charts.will-animate .c-line { stroke-dashoffset: 1; }
.charts.will-animate .c-area, .charts.will-animate .c-val { opacity: 0; }
.charts.will-animate .c-dot { transform: scale(0); transform-box: fill-box; transform-origin: center; }
.charts.is-in .c-line { animation: cDraw 1.4s cubic-bezier(.4,0,.2,1) forwards; }
.charts.is-in .c-area { animation: cFadeArea .8s ease forwards 1s; }
.charts.is-in .c-dot { animation: cPop .35s cubic-bezier(.34,1.56,.64,1) forwards; animation-delay: calc(.15s + var(--i) * .17s); }
.charts.is-in .c-val { animation: cFade .4s ease forwards 1.5s; }
.charts.is-in .chart-tile:nth-child(2) .c-line { animation-delay: .12s; }
.charts.is-in .chart-tile:nth-child(3) .c-line { animation-delay: .24s; }
.charts.is-in .chart-tile:nth-child(4) .c-line { animation-delay: .36s; }
@keyframes cDraw { to { stroke-dashoffset: 0; } }
@keyframes cPop { to { transform: scale(1); } }
@keyframes cFade { to { opacity: 1; } }
@keyframes cFadeArea { to { opacity: .08; } }
@media (prefers-reduced-motion: reduce) {
  .charts.will-animate .c-line { stroke-dashoffset: 0; }
  .charts.will-animate .c-val, .charts.will-animate .c-dot { opacity: 1; transform: none; }
  .charts.will-animate .c-area { opacity: .08; }
}

/* contact: single email card */
.section-contact { padding-bottom: 96px; margin-top: -40px; position: relative; }
.contact-card { position: relative; overflow: hidden; border-radius: 36px; padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 64px); max-width: 860px; margin: 0 auto; }
.contact-card .grid-bg { position: absolute; top: 0; right: 0; width: 420px; height: 320px; pointer-events: none; }
.contact-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.contact-icon { width: 60px; height: 60px; border-radius: 18px; }
.contact-email { font-family: var(--font-head); font-weight: 600; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; color: var(--accent-ink); text-decoration: none; word-break: break-word; }
.contact-email:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.contact-inner .lead { max-width: 560px; }
.contact-inner .btn { margin-top: 8px; }

/* language switcher */
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid rgba(26,26,23,0.12); background: rgba(255,255,255,0.65); }
.lang-switch a { min-width: 40px; min-height: 36px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--ink-3); text-decoration: none; transition: background .2s ease, color .2s ease; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: #fff; }
@media (max-width: 640px) {
  .header-right { gap: 8px; }
  .btn-download { padding: 0 14px; }
}

/* ===== Fixed header ===== */
:root { --header-h: 88px; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
.hero-wrap { padding-top: var(--header-h); }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease; }
.site-header.is-scrolled { background: rgba(245,243,239,0.82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(26,26,23,0.08); }
.site-header.is-scrolled .container { padding-top: 14px; padding-bottom: 14px; }
.site-header .container { transition: padding .25s ease; }

/* ===== Language menu ===== */
.lang-menu { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid rgba(26,26,23,0.12); background: rgba(255,255,255,0.65); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s ease; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: #fff; }
.lang-chev { color: var(--ink-3); transition: transform .2s ease; }
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }
.flag { flex: none; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(26,26,23,0.12); display: block; }
.lang-pop { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 44px -16px rgba(26,26,23,0.28); transform-origin: top right; animation: popIn .18s cubic-bezier(.16,1,.3,1); z-index: 70; }
.lang-pop[hidden] { display: none; }
.lang-head { padding: 6px 10px 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.lang-pop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lang-pop a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.lang-pop a span { flex: 1; }
.lang-pop a:hover, .lang-pop a:focus-visible { background: var(--surface-2); outline: none; }
.lang-pop a[aria-current="true"] { color: var(--accent-ink); font-weight: 600; }
.lang-check { color: var(--accent); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }

/* ===== Charts without grey tiles ===== */
.chart-tile { background: transparent; border: 1px solid var(--line); }
.c-dot { stroke: #fff; }

/* compact fixed header on phones */
@media (max-width: 640px) {
  .site-header .container, .site-header.is-scrolled .container { flex-wrap: wrap; row-gap: 4px; column-gap: 8px; padding-top: 10px; padding-bottom: 8px; }
  .header-left { display: contents; }
  .site-header .logo { order: 1; font-size: 28px; }
  .header-right { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; flex-basis: 100%; gap: 22px; font-size: 15px; flex-wrap: nowrap; overflow-x: auto; }
  .btn-download { font-size: 0; gap: 0; width: 44px; padding: 0; justify-content: center; }
  .btn-download svg { width: 18px; height: 18px; }
}

/* ===== Free tier ===== */
.free-card { margin-top: 12px; padding: 24px 26px; border-radius: 24px; background: var(--accent-soft); border: 1px solid rgba(39,116,184,0.18); display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.free-top { display: flex; align-items: center; gap: 10px; }
.free-badge { padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.free-label { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.free-amount { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.free-num { font-family: var(--font-head); font-weight: 600; font-size: 64px; line-height: 1; color: var(--accent-ink); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.free-unit { font-family: var(--font-head); font-weight: 600; font-size: 30px; color: var(--accent-ink); }
.free-text { font-size: 15px; color: var(--ink-2); }
.plan-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; justify-content: center; width: 100%; }
.free-card.is-side { margin-top: 0; flex: 1 1 300px; max-width: 360px; justify-content: center; }
.plan-row .plan-card { flex: 1 1 440px; }
.free-card.is-side { align-self: center; }
.price { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .lang-btn { padding: 0 8px; gap: 6px; }
  .lang-code { display: none; }
}

/* ===== Plans: free + paid ===== */
.section-plans { padding-bottom: 112px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.plans-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 640px; }
.plan-row { align-items: stretch; }
.plan { flex: 1 1 340px; max-width: 520px; display: flex; flex-direction: column; gap: 18px; }
.plan .price-list { flex: 1; }
.plan .btn { margin-top: 4px; }
.plan-name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.plan-badge { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
.plan-desc { margin-top: -8px; font-size: 15px; color: var(--ink-3); }
.plan-paid { border-color: rgba(39,116,184,0.45); box-shadow: 0 24px 48px -28px rgba(39,116,184,0.35); }
.plan-free { box-shadow: none; }
.btn-outline { border: 1.5px solid var(--accent); color: var(--accent-ink); background: #fff; }
.btn-outline:hover { background: var(--accent-soft); }
.plan-row .plan-card { flex: 1 1 340px; }
.price { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ===== Plans v2: Twofold-like list and price ===== */
.plan .price-row { align-items: flex-start; gap: 4px; }
.plan .cur { font-family: var(--font-head); font-size: 26px; font-weight: 600; color: var(--ink-3); margin-top: 8px; }
.plan .price { font-size: 72px; }
.plan .per { align-self: flex-end; margin: 0 0 10px 4px; font-family: var(--font-head); font-style: italic; font-weight: 500; font-size: 20px; color: var(--ink-3); }
.plan-desc { margin-top: -6px; font-size: 14px; color: var(--ink-4); }
.plan .price-list { gap: 14px; }
.plan .price-list li { align-items: center; gap: 14px; font-size: 16px; }
.pl-check { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #ECEAE5; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(26,26,23,0.08); }
.plan-paid .pl-check { background: var(--accent-ink); color: #fff; box-shadow: none; }
.plan .price-list li.is-key { font-weight: 600; }
.plan .btn { gap: 10px; }
.plan .btn svg { transition: transform .2s ease; }
.plan .btn:hover svg { transform: translateX(3px); }
.plan-note { margin-top: -6px; text-align: center; font-size: 13px; color: var(--ink-4); }
.plan .per { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ===== Single plan with trial strip ===== */
.plan-single { width: 100%; max-width: 920px; flex: none; padding: 0; overflow: hidden; gap: 0; border-color: rgba(39,116,184,0.45); box-shadow: 0 28px 56px -32px rgba(39,116,184,0.4); }
.trial-strip { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; background: var(--accent); color: #fff; font-size: 15px; text-align: center; }
.trial-strip svg { flex: none; }
.trial-strip strong { font-weight: 600; }
.plan-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: clamp(28px, 4vw, 44px); }
.plan-main { display: flex; flex-direction: column; gap: 16px; }
.plan-main .btn { margin-top: 8px; }
.plan-single .price-list { align-self: center; padding-left: 40px; border-left: 1px solid var(--line); }
.plan-single .pl-check { background: var(--accent-ink); color: #fff; box-shadow: none; }
@media (max-width: 820px) {
  .plan-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .plan-single .price-list { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
}

/* ===== Headline animation ===== */
.js:not(.js-ready) .hero h1 { opacity: 0; }
.split .w { display: inline-block; opacity: 0; transform: translateY(.38em); filter: blur(8px); will-change: transform, opacity, filter; }
.split.is-in .w { animation: wordIn .95s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(var(--i) * 75ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }
.js .hero > :not(h1) { opacity: 0; }
.js .hero.hero-in > :not(h1) { animation: fadeUp .8s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(var(--n, 6) * 75ms + .25s); }
.js .hero.hero-in > :not(h1) ~ :not(h1) { animation-delay: calc(var(--n, 6) * 75ms + .4s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .split .w, .js .hero > * { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
}

/* ===== Legal pages: terms / privacy / refund ===== */
.section-legal { padding-top: 40px; padding-bottom: 96px; position: relative; }
.legal-meta { font-size: 15px; color: var(--ink-4); margin-bottom: 20px; }
.legal-card { max-width: 860px; margin: 0 auto; border-radius: 36px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); font-size: 15px; font-weight: 500; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.legal-nav a:hover { color: var(--ink); border-color: var(--line-2); }
.legal-nav a[aria-current="page"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.legal { max-width: 68ch; overflow-wrap: anywhere; }
.legal h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.008em; margin: 44px 0 14px; }
.legal > h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p, .legal ul + p, .legal ol + p, .legal p + ul, .legal p + ol { margin-top: 12px; }
.legal ul, .legal ol { margin: 0; padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--accent); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent-ink); text-underline-offset: 3px; }
.legal .note { margin-top: 16px; padding: 18px 22px; border-radius: 18px; background: var(--accent-soft); color: var(--ink); }
@media (max-width: 640px) {
  .section-legal { padding-top: 24px; }
  .legal-card { border-radius: 24px; }
  .legal-nav { margin-bottom: 28px; padding-bottom: 24px; }
}
