/* Yoxlai site. Same tokens as the app (src/ui/theme.ts): pastel wash, white cards, navy pills, Onest. */
:root {
  --paper: #f8f8fd;
  --surface: #ffffff;
  --surface-alt: #f0f0f7;
  --text: #14142b;
  --graphite: #62627a;
  --primary: #14142b;
  --on-primary: #ffffff;
  --ink: #1e3fae;
  --mark: #cdbfff;
  --mark-alt: #fbe08a;
  --lavender: #cfc2ff;
  --pink: #edc4ee;
  --butter: #fbe08a;
  --mint: #bfebd9;
  --teal: #0b7f74;
  --amber: #a86a0c;
  --border: rgba(20, 20, 43, 0.06);
  --shadow: 0 1px 2px rgba(20, 20, 43, 0.03), 0 8px 24px rgba(20, 20, 43, 0.06);
  --shadow-raised: 0 16px 40px rgba(20, 20, 43, 0.12);
  --wash: radial-gradient(circle at 0% 0%, rgba(206, 190, 255, 0.75) 0%, rgba(206, 190, 255, 0) 55%), radial-gradient(circle at 100% 20%, rgba(246, 204, 238, 0.7) 0%, rgba(246, 204, 238, 0) 55%), radial-gradient(circle at 50% 100%, rgba(255, 236, 184, 0.65) 0%, rgba(255, 236, 184, 0) 60%);
  --radius: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  background-image: var(--wash);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.lead a, .doc a { font-weight: 600; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--surface); padding: 8px 14px; border-radius: 999px; z-index: 10; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(44px, 6vw, 86px); }
h2 { font-size: clamp(34px, 4.8vw, 64px); }
h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
.lead { font-size: clamp(19px, 1.6vw, 22px); max-width: 34em; }
.muted { color: var(--graphite); }
/* The app's word marker: one word on a tilted pastel pill. */
.mark { display: inline-block; padding: 0 0.2em; border-radius: 0.3em; background: var(--mark); transform: rotate(-2deg); }
.mark.alt { background: var(--mark-alt); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 600 17px/1 'Onest', sans-serif; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.store { padding: 0 22px 0 18px; text-align: left; }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; letter-spacing: 0.01em; margin-bottom: 3px; }
.store b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 100; isolation: isolate; background: color-mix(in srgb, var(--paper) 96%, transparent); }
/* The page body is its own layer under the header: Safari otherwise paints animated (transformed) mockups over a sticky bar. */
main { position: relative; z-index: 0; isolation: isolate; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.brand svg { width: 38px; height: 38px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; color: var(--graphite); }
.nav a:hover { color: var(--text); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-alt); }
.langs button { border: 0; background: none; font: 600 13px 'Onest', sans-serif; color: var(--graphite); padding: 8px 11px; border-radius: 999px; cursor: pointer; min-width: 40px; min-height: 36px; }
.langs button[aria-pressed='true'] { background: var(--primary); color: var(--on-primary); }
.top .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(80px, 10vw, 140px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 28px; }
.hero-art { position: relative; min-height: 660px; }
.hero-art .tulki { position: absolute; width: 46%; left: 0; bottom: -8px; z-index: 2; }
.hero-art .phone { position: absolute; right: 0; top: 0; width: min(310px, 62%); }
.note { font-size: 15px; color: var(--graphite); }

/* ---------- phone mockups (real app screens, drawn in HTML) ---------- */
.phone {
  aspect-ratio: 9 / 19; border-radius: 44px; padding: 10px; background: var(--primary);
  box-shadow: var(--shadow-raised);
}
.screen {
  height: 100%; border-radius: 36px; overflow: hidden; padding: 46px 16px 16px;
  background: var(--paper); background-image: var(--wash); display: flex; flex-direction: column; gap: 10px;
  font-size: 13px; line-height: 1.35; color: var(--text);
}
.screen > .grow { flex: 1; }
.screen .t { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; line-height: 1.1; }
.card { background: var(--surface); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; background: var(--surface-alt); }
.pill-btn { display: block; text-align: center; padding: 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 600; }
.score { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bubble { background: var(--surface); border-radius: 18px 18px 18px 6px; padding: 10px 12px; box-shadow: var(--shadow); font-weight: 500; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.tint-lav { background: var(--lavender); }
.tint-pink { background: var(--pink); }
.tint-butter { background: var(--butter); }
.tint-mint { background: var(--mint); }
.ok { color: var(--teal); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }
.dots { display: flex; gap: 6px; align-items: flex-end; height: 90px; }
.dots span { display: block; flex: 1; border-radius: 10px 10px 4px 4px; background: var(--lavender); }
.dots span.top { background: var(--pink); }

/* ---------- sections ---------- */
section { scroll-margin-top: 80px; }
.sec { padding: clamp(80px, 10vw, 150px) 0; }
.sec-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }

/* Day in Yoxlai: three screens on coloured fields */
.day { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 32px); }
.day figure { margin: 0; display: grid; gap: 18px; }
.day .field { border-radius: var(--radius); padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 0; overflow: hidden; height: 520px; }
.day .field .phone { width: 100%; max-width: 280px; margin: 0 auto; border-radius: 40px 40px 0 0; padding-bottom: 0; }
.day .field .screen { border-radius: 32px 32px 0 0; }
.day figcaption { font-size: 17px; }
.day figcaption b { display: block; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }

/* Live thing: time back */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.calc-panel { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); display: grid; gap: 22px; }
.calc label { font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 12px; }
.calc output { font-variant-numeric: tabular-nums; }
.calc input[type='range'] { width: 100%; accent-color: var(--primary); height: 32px; }
.big { font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; font-size: clamp(64px, 9vw, 128px); font-variant-numeric: tabular-nums; }
.calc-result { display: grid; gap: 8px; }
.calc-say { display: flex; align-items: flex-end; gap: 14px; }
.calc-say svg { width: 120px; flex: none; }

/* How it works: one strip, numbered by position */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 32px); counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; }
.steps li .q { font-weight: 800; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.08; }

/* Privacy: big statement on a field */
.privacy-field { border-radius: calc(var(--radius) + 8px); background: var(--primary); color: var(--on-primary); padding: clamp(32px, 6vw, 80px); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.privacy-field h2 { color: var(--on-primary); font-size: clamp(32px, 3.8vw, 52px); }
.privacy-field ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; font-size: 18px; }
.privacy-field li b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.privacy-field li span { opacity: 0.78; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: clamp(16px, 2.4vw, 28px); align-items: stretch; }
.plan { border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; }
.plan.pro { background: var(--lavender); box-shadow: var(--shadow-raised); }
.plan .price { font-weight: 800; font-size: 44px; letter-spacing: -0.04em; line-height: 1; }
.plan .price small { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--graphite); }
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.plan .btn { margin-top: 8px; align-self: end; }

/* FAQ */
.faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 64px); }
.faq-list { display: grid; gap: 12px; }
details { background: var(--surface); border-radius: 24px; padding: 4px 24px; box-shadow: var(--shadow); }
summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; padding: 18px 32px 18px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 26px; font-weight: 500; transition: transform 200ms; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 20px; }

/* Closing */
.close { padding: clamp(80px, 10vw, 140px) 0 clamp(48px, 6vw, 80px); }
.close-field { border-radius: calc(var(--radius) + 8px); background: var(--butter); padding: clamp(32px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.close-field .tulki { width: clamp(160px, 20vw, 260px); }

/* Footer */
footer { padding: 32px 0 48px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--graphite); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--text); }
footer .copy { margin-left: auto; color: var(--graphite); font-size: 15px; }
.wordmark { font-weight: 800; font-size: clamp(64px, 16vw, 220px); letter-spacing: -0.06em; line-height: 0.85; margin: 24px 0 8px; color: var(--text); opacity: 0.92; }

/* Legal / support pages */
.doc { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 120px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 16px; }
.doc h2 { font-size: clamp(24px, 3vw, 32px); margin: 48px 0 12px; letter-spacing: -0.025em; }
.doc p, .doc li { margin: 0 0 14px; }
.doc ul { padding-left: 22px; }
.doc .card { padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); margin: 24px 0; }

/* ---------- Tulki ---------- */
.tulki .bob { animation: bob 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.tulki .tail { animation: wag 1.4s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 64% 82%; }
.tulki .ear { animation: twitch 4.3s infinite; transform-box: view-box; transform-origin: 32% 32%; }
.tulki .eyes { animation: blink 3.4s infinite; transform-box: fill-box; transform-origin: center; }
.tulki .spark { animation: twinkle 1.8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.tulki.happy .tail { animation-duration: 0.32s; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes wag { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes twitch { 0%, 92%, 100% { transform: rotate(0); } 94% { transform: rotate(-14deg); } 96% { transform: rotate(4deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes twinkle { from { transform: rotate(-15deg) scale(0.92); } to { transform: rotate(15deg) scale(1.08); } }

/* Entrances: content is visible without script; script only adds the rise. */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 600ms cubic-bezier(0.23, 1, 0.32, 1), transform 600ms cubic-bezier(0.23, 1, 0.32, 1); transition-delay: var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tulki *, .btn { animation: none !important; transition: none !important; }
  .js .rise { opacity: 1; transform: none; transition: none; }
}

/* ---------- tablet / phone ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .hero .wrap, .calc, .privacy-field, .faq { grid-template-columns: 1fr; }
  .hero-art { min-height: 620px; max-width: 560px; }
  .day, .steps, .plans { grid-template-columns: 1fr; }
  .day .field { height: 480px; }
  .plans { max-width: 520px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top .btn { display: none; }
  .langs { margin-left: auto; }
  .hero-art { min-height: 480px; }
  .hero-art .phone { width: 58%; }
  .hero-art .tulki { width: 46%; left: 0; }
  .close-field { grid-template-columns: 1fr; }
  .close-field .tulki { justify-self: start; }
  .stores .btn { flex: 1 1 100%; }
  footer .copy { margin-left: 0; }
}

.plan.pro .price small, .plan.pro p { color: var(--text); }

/* Azerbaijani words run longer: keep the big headlines to two lines. */
:lang(az) h1, :lang(ru) h1 { font-size: clamp(38px, 5vw, 72px); }

/* A store not live yet: visible, but clearly not a link. */
.btn.soon { opacity: 0.55; cursor: default; }
.btn.soon:hover, .btn.soon:active { transform: none; }

/* More than grading */
.more-phone { width: min(340px, 100%); justify-self: center; }
.bubble.me { align-self: flex-end; max-width: 85%; background: var(--primary); color: var(--on-primary); border-radius: 18px 18px 6px 18px; }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.more-list li { display: grid; gap: 4px; }
.more-list b { font-size: 22px; letter-spacing: -0.02em; }

/* App mockups: Home and the Ask Tulki chat as they look in the app now */
.ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e6ecfb; color: var(--ink); font-weight: 700; }
.askcard { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 20px; background: #14142b; color: #fff; }
.ask-h { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.ask-h span[aria-hidden] { color: #c6b5ff; }
.ask-pill { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); font-size: 11px; }
.go { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #c6b5ff; color: #14142b; font-size: 12px; flex: none; }
.go.dark { width: 30px; height: 30px; background: var(--primary); color: var(--on-primary); }
.hero-card { background: linear-gradient(120deg, #f3c9ef 0%, #e3cfff 60%, #cdbfff 100%); display: flex; align-items: center; gap: 8px; }
.tabbar { display: flex; justify-content: space-around; align-items: center; padding: 6px; border-radius: 999px; background: #14142b; color: rgba(255, 255, 255, 0.72); }
.tabbar span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.tabbar span.on { background: #c6b5ff; color: #14142b; }
.answer ul { margin: 6px 0; padding-left: 16px; }
.answer li { margin: 2px 0; }
.answer li::marker { color: #6d3fd1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }
.chips span { padding: 6px 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 11px; font-weight: 600; }
.ask-input { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-raised); }
.orb { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #c6b5ff; color: #14142b; font-size: 18px; box-shadow: 0 0 18px rgba(198, 181, 255, 0.55); }

/* Mockup details that match the app (class-based, not inline) */
.ask-input .grow, .hero-card .grow { flex: 1; min-width: 0; }
.go.idle { width: 30px; height: 30px; background: var(--surface-alt); color: var(--graphite); }
.navbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 4px; }
.navbar b { font-size: 15px; }
.navbtn, .roundbtn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
.roundbtn { background: var(--surface); box-shadow: var(--shadow); color: var(--amber); margin-right: 4px; }
.hero-t { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 8px; }
.pill-btn.small { display: inline-block; padding: 8px 13px; font-size: 12px; }
.papers { width: 56px; height: 52px; flex: none; }
.chips .share { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-alt); box-shadow: none; color: var(--graphite); }

/* Main heading: the search phrase as a small first line, the promise big below it (one h1). */
.h1-kicker { display: block; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.01em; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.h1-main { display: block; }
