/* SayEasy — landing page */

:root {
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef0ff;
  --accent-ink: #3730a3;
  --band: #fdf3c4;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --ink: #15142b;
  --ink-2: #4a4a63;
  --ink-3: #74748c;
  --line: #e4e4ef;
  --ipa: #5b55e6;
  --word-on: #4f46e5;
  --shadow: 0 1px 2px rgba(20, 20, 60, .04), 0 12px 40px -12px rgba(40, 36, 120, .18);
  --phone-edge: #17171c;
  --radius: 22px;
  --maxw: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #818cf8;
    --accent-strong: #a5b4fc;
    --accent-soft: #1f1f3d;
    --accent-ink: #c7d2fe;
    --band: #3b3416;
    --bg: #0e0e16;
    --surface: #171722;
    --ink: #f1f1f8;
    --ink-2: #b8b8cc;
    --ink-3: #8a8aa2;
    --line: #262636;
    --ipa: #a5b4fc;
    --word-on: #5a52ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 50px -16px rgba(0, 0, 0, .7);
    --phone-edge: #2a2a33;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Language hint ---------- */

.lang-hint { background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.lang-hint[hidden] { display: none; }
.lang-hint .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding-top: 6px; padding-bottom: 6px; padding-right: 52px; position: relative; }
.lang-hint a { font-weight: 600; text-decoration: none; }
.lang-hint a:hover { text-decoration: underline; }
.lang-hint button {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
}
.lang-hint button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.lang-hint button svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav .btn-store, .nav .btn-store:hover { color: #fff; background: #000; }
.nav .lang { font-weight: 600; font-size: 13px; letter-spacing: .04em; border: 1px solid var(--line); }
@media (max-width: 720px) { .nav .nav-link { display: none; } }

/* ---------- Buttons ---------- */

.btn-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  line-height: 1.1; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-store:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); }
.btn-store svg { width: 26px; height: 26px; flex: none; }
.btn-store small { display: block; font-size: 11px; opacity: .85; letter-spacing: .02em; }
.btn-store strong { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.btn-store.is-sm { padding: 6px 14px 6px 11px; border-radius: 10px; gap: 7px; }
.btn-store.is-sm svg { width: 18px; height: 18px; }
.btn-store.is-sm strong { font-size: 14px; }
@media (max-width: 420px) { .site-header .btn-store { display: none; } }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 12px; border-radius: 99px; margin: 0 0 20px; }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 68px); font-weight: 800; }
h1 .mark { background: linear-gradient(transparent 58%, var(--band) 58%); padding: 0 .06em; }
h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }

.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); margin: 22px 0 32px; max-width: 34em; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-3); font-size: 14px; }
.hero-meta li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }

.hero-visual { position: relative; display: flex; justify-content: center; }

/* ---------- Phone frame ---------- */

.phone {
  position: relative; width: 100%; max-width: 320px; margin: 0;
  padding: 10px; border-radius: 52px; background: var(--phone-edge);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone img { border-radius: 42px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; background: #fff; }
.phone.is-tilt { transform: rotate(2.5deg); }
@media (max-width: 860px) { .phone.is-tilt { transform: none; } }

.tablet {
  position: relative; margin: 0 auto; max-width: 700px;
  padding: 14px; border-radius: 38px; background: var(--phone-edge); box-shadow: var(--shadow);
}
.tablet img { border-radius: 26px; width: 100%; aspect-ratio: 2064 / 2752; object-fit: cover; }

/* ---------- Sections ---------- */

section { scroll-margin-top: 72px; }
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 19px; margin: 16px 0 0; }

/* ---------- Demo ---------- */

.demo {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow); padding: 28px clamp(18px, 4vw, 44px) 24px; max-width: 900px; margin: 0 auto;
}
.demo-text { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 4px; margin: 0; min-height: 132px; }
.demo-play {
  flex: none; width: 40px; height: 40px; margin-right: 6px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; transition: background .15s, color .15s;
}
.demo-play svg { width: 20px; height: 20px; }
.demo-play:hover, .demo-play[aria-pressed="true"] { background: var(--accent); color: #fff; }

.w {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
  padding: 4px 6px 5px; border-radius: 9px; transition: background-color .12s, color .12s;
}
.w b { font-weight: 500; font-size: clamp(19px, 2.6vw, 25px); line-height: 1.2; }
.w i { font-style: normal; font-size: clamp(12px, 1.4vw, 14px); color: var(--ipa); font-family: "Charis SIL", "Doulos SIL", "Gentium Plus", -apple-system, "Segoe UI", "Lucida Grande", "Arial Unicode MS", sans-serif; white-space: nowrap; }
.w:hover { background: var(--accent-soft); }
.demo-text.is-reading .w { background: var(--band); }
.w.is-on, .demo-text.is-reading .w.is-on { background: var(--word-on); color: #fff; }
.w.is-on i { color: rgba(255, 255, 255, .85); }
.demo.no-ipa .w i { visibility: hidden; }

.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-hint { margin: 0; color: var(--ink-3); font-size: 14px; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600;
  padding: 6px 16px; border-radius: 9px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #2a2a3d; } }

/* ---------- Feature rows ---------- */

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .phone { justify-self: center; max-width: 290px; }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-copy h2 { font-size: clamp(28px, 3.6vw, 40px); }
.feature-copy p { color: var(--ink-2); font-size: 18px; margin: 16px 0 0; max-width: 30em; }
.feature-copy ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-copy li { position: relative; padding-left: 30px; color: var(--ink-2); }
.feature-copy li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* ---------- Cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.card .ico svg { width: 24px; height: 24px; }
.card p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; }
.card .ipa { color: var(--ipa); white-space: nowrap; }

/* ---------- Privacy band ---------- */

.privacy-band {
  background: linear-gradient(160deg, #6366f1 0%, #4f46e5 45%, #3730a3 100%);
  color: #fff; border-radius: 32px; padding: clamp(36px, 6vw, 64px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.privacy-band h2 { color: #fff; }
.privacy-band p { color: rgba(255, 255, 255, .86); font-size: 18px; margin: 16px 0 0; }
.privacy-band a { color: #fff; font-weight: 600; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-list li { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 14px 16px; font-weight: 600; }
.privacy-list svg { width: 22px; height: 22px; flex: none; }

/* ---------- iPad ---------- */

.ipad-note { text-align: center; color: var(--ink-3); font-size: 15px; margin-top: 22px; }

/* ---------- Final CTA ---------- */

.cta { text-align: center; padding: 96px 0 104px; }
.cta img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 26px; box-shadow: 0 16px 40px -14px rgba(79, 70, 229, .55); }
.cta p { color: var(--ink-2); font-size: 19px; margin: 16px auto 32px; max-width: 30em; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- Legal page ---------- */

.legal { padding: 56px 0 88px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal .updated { color: var(--ink-3); margin: 14px 0 36px; font-size: 15px; }
.legal .summary { background: var(--accent-soft); border-radius: 18px; padding: 22px 24px; font-size: 19px; color: var(--ink); margin-bottom: 40px; }
.legal h2 { font-size: 24px; letter-spacing: -.015em; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .privacy-band { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero { padding: 32px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual .phone { max-width: 270px; }
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .feature:nth-child(even) .feature-copy { order: 0; }
  .feature .phone { max-width: 260px; }
  .section { padding: 64px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .demo-text { gap: 10px 2px; }
  .tablet { padding: 8px; border-radius: 24px; }
  .tablet img { border-radius: 17px; }
}
