/* Dictate landing. Apple-style product page (white, heavy Persian headlines, dark showcase),
   in Dictate's own identity: graphite + one mint accent. Fonts are self-hosted. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn.woff2") format("woff2-variations"), url("/fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --tint: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --dark: #111113;
  --dark-2: #1c1c1f;
  --dark-3: #2a2a2e;
  --on-dark: #f5f5f7;
  --on-dark-muted: #a1a1a6;
  --accent: #2f9a72;
  --accent-on-dark: #7fd6b0;
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.8 Vazirmatn, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 28px; font-size: 14px; font-weight: 600; }
.links a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .15s var(--ease), background .2s, opacity .2s; cursor: pointer; border: 0; }
.btn:active { transform: scale(.98); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(47, 154, 114, .35); outline-offset: 3px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333336; }
.btn-light { background: #ebebef; color: var(--ink); }
.btn-light:hover { background: #e1e1e6; }
.btn-sm { min-height: 36px; padding: 0 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(64px, 11vw, 132px) 0 clamp(40px, 6vw, 64px); }
.kicker { margin: 0 0 18px; color: var(--muted); font-size: 15px; font-weight: 600; }
.headline { margin: 0; font-size: clamp(38px, 7.2vw, 78px); line-height: 1.22; font-weight: 900; letter-spacing: -0.012em; }
.headline span { display: block; }
.headline span + span { color: var(--ink); }
.app-icon { margin: 40px auto 34px; border-radius: 24%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .18)); }
.cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fine { margin: 22px 0 0; color: var(--muted); font-size: 14px; line-height: 2; }
.muted-link { font-size: 13px; }
.muted-link a { color: var(--ink-2); }

/* ---------- showcase (live demo) ---------- */
.showcase { padding-bottom: clamp(72px, 10vw, 120px); }
.screen {
  position: relative; border-radius: var(--radius); background: var(--dark); overflow: hidden;
  padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 64px);
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .45);
}
.screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 40%, transparent, rgba(17,17,19,.85)); pointer-events: none; }
.window { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; background: var(--dark-2); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; padding: 0 0 18px; color: var(--on-dark); font-size: 15px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); }
.win-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.06); direction: ltr; }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3f; }
.win-bar span { margin-inline: auto; color: var(--on-dark-muted); font-size: 13px; transform: translateX(-20px); }
.chat { min-height: 150px; padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 75%; padding: 9px 14px; border-radius: 18px; line-height: 1.7; }
.msg.them { align-self: flex-end; background: var(--dark-3); border-end-end-radius: 6px; }
.msg.me { align-self: flex-start; background: #e6e3dd; color: #18181a; border-end-start-radius: 6px; animation: pop .35s var(--ease); }
.composer-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.composer { flex: 1; min-height: 46px; display: flex; align-items: center; padding: 0 16px; border-radius: 23px; background: var(--dark-3); color: var(--on-dark); position: relative; }
.composer .ph { color: #75757b; }
.caret { width: 2px; height: 20px; background: var(--accent-on-dark); margin-inline-start: 2px; animation: blink 1s steps(1) infinite; }
.composer.typed .ph { display: none; }

.bubble { position: relative; width: 44px; height: 44px; flex: none; }
/* RTL: the bubble sits at the composer's left end, so the pill and preview open rightwards over it. */
.orb, .pill, .spin { position: absolute; top: 0; left: 0; }
.orb { width: 44px; height: 44px; border-radius: 50%; background: #2a2a2e; border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; color: var(--on-dark); transition: transform .25s var(--ease), opacity .25s; }
.orb svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill { height: 44px; width: 200px; border-radius: 22px; background: #2a2a2e; border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 6px; padding: 0 6px; opacity: 0; transform: scaleX(.3); transform-origin: left center; transition: transform .3s var(--ease), opacity .2s; pointer-events: none; }
.pill canvas { flex: 1; width: 120px; height: 24px; }
.pill b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.pill .x { color: var(--on-dark-muted); }
.pill .ok { background: #e6e3dd; color: #18181a; }
.spin { width: 44px; height: 44px; border-radius: 50%; background: #2a2a2e; opacity: 0; display: grid; place-items: center; }
.spin::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent-on-dark); animation: spin .7s linear infinite; }
.preview { position: absolute; bottom: 54px; left: 0; width: max-content; max-width: min(360px, 70vw); padding: 10px 16px; border-radius: 18px; background: #2a2a2e; border: 1px solid rgba(255,255,255,.08); color: var(--on-dark); line-height: 1.7; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease); white-space: nowrap; }
.preview .w { display: inline; animation: word .25s var(--ease) both; }
.preview .dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-inline-start: 6px; }
.preview .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--on-dark-muted); animation: dot 1s infinite; }
.preview .dots i:nth-child(2) { animation-delay: .15s; }
.preview .dots i:nth-child(3) { animation-delay: .3s; }

.bubble.rec .orb { opacity: 0; transform: scale(.6); }
.bubble.rec .pill { opacity: 1; transform: none; }
.bubble.rec .preview, .bubble.busy .preview { opacity: 1; transform: none; }
.bubble.busy .orb { opacity: 0; }
.bubble.busy .spin { opacity: 1; }
.bubble.gone { opacity: 0; transition: opacity .3s; }
.key { position: absolute; left: 50%; bottom: -14px; transform: translate(-50%, 8px); padding: 4px 14px; border-radius: 8px; background: #e6e3dd; color: #18181a; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s, transform .2s var(--ease); direction: ltr; box-shadow: 0 4px 0 #b9b6b0; }
.key.on { opacity: 1; transform: translate(-50%, 0); }

.caption { text-align: center; margin: 28px auto 0; color: var(--muted); font-size: 16px; }
.caption b { color: var(--ink); font-size: clamp(20px, 2.6vw, 26px); font-weight: 850; }

/* ---------- sections ---------- */
.h2 { margin: 0 0 clamp(32px, 5vw, 56px); font-size: clamp(30px, 4.4vw, 46px); line-height: 1.3; font-weight: 900; letter-spacing: -0.01em; text-align: center; }
.how { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 128px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 32px 28px; border-radius: 24px; background: var(--tint); }
.steps .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; }
.steps h3 { margin: 20px 0 6px; font-size: 22px; font-weight: 850; line-height: 1.45; }
.steps p { margin: 0; color: var(--muted); }

.tint { background: var(--tint); padding: clamp(80px, 10vw, 128px) 0; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: #fff; border-radius: 24px; padding: 36px 32px; }
.card h3 { margin: 0 0 10px; font-size: 24px; font-weight: 850; line-height: 1.45; }
.card p { margin: 0; color: var(--muted); }

.dark { background: var(--dark); color: var(--on-dark); }
.statement { padding: clamp(96px, 14vw, 180px) 20px; text-align: center; }
.statement .big { margin: 0; font-size: clamp(48px, 11vw, 132px); line-height: 1.15; font-weight: 900; letter-spacing: -0.015em; }
.statement .dim { color: #4a4a50; }

.pricing { padding: clamp(80px, 10vw, 128px) 0 clamp(40px, 6vw, 64px); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 20px; }
.plan { padding: 36px 32px; border-radius: 28px; background: var(--tint); display: flex; flex-direction: column; }
.plan h3 { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.plan .tag { font-size: 12px; font-weight: 700; color: var(--accent); background: rgba(47,154,114,.1); padding: 2px 10px; border-radius: 999px; }
.price { margin: 18px 0 6px; font-size: 44px; font-weight: 900; line-height: 1.2; letter-spacing: -0.01em; }
.price small { font-size: 18px; font-weight: 700; color: var(--muted); }
.plan-desc { margin: 0 0 24px; color: var(--muted); flex: 1; }
.plan-pro { background: var(--dark); color: var(--on-dark); }
.plan-pro .price small, .plan-pro .plan-desc { color: var(--on-dark-muted); }
.plan-pro .tag { color: var(--accent-on-dark); background: rgba(127,214,176,.12); }
.plan-pro .btn-dark { background: #e6e3dd; color: #18181a; }
.plan-pro .btn-dark:hover { background: #f1eee9; }
.footnote { text-align: center; color: var(--muted); font-size: 13px; margin: 24px auto 0; max-width: 560px; }

.faq { padding: clamp(64px, 8vw, 104px) 0; }
.qs { max-width: 760px; margin: 0 auto; }
.qs details { border-bottom: 1px solid var(--line); }
.qs summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 19px; font-weight: 750; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after { content: "+"; font-size: 26px; font-weight: 300; color: var(--muted); transition: transform .25s var(--ease); line-height: 1; }
.qs details[open] summary::after { transform: rotate(45deg); }
.qs p { margin: -6px 0 24px; color: var(--ink-2); max-width: 65ch; }

.final { text-align: center; padding: clamp(48px, 8vw, 96px) 0 clamp(80px, 10vw, 120px); }
.final .app-icon { margin: 0 auto 24px; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes word { from { opacity: 0; filter: blur(4px); } }
@keyframes dot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .links { display: none; }
  .steps, .grid, .plans { grid-template-columns: 1fr; }
  .card, .plan, .steps li { padding: 28px 24px; }
  .headline { font-size: clamp(34px, 10vw, 46px); }
  .composer-row { padding: 0 12px; }
  .preview { white-space: normal; }
  .foot { flex-direction: column; text-align: center; }
}
