/* EchoNative website — dark-first, reading-app feel */
:root {
  --bg-0: #0E0E10;
  --bg-1: #16161A;
  --bg-2: #1E1E22;
  --bg-3: #2A2A2F;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);

  --text-1: #F2EEE6;
  --text-2: #C8C4BC;
  --text-3: #8A8883;
  --text-4: #5A5955;

  --accent: #E5915F;
  --accent-soft: rgba(229,145,95,0.14);
  --accent-strong: #F0A274;

  --primary: #2F4A3C;
  --primary-soft: rgba(47,74,60,0.35);
  --primary-strong: #3D5F4E;

  --warn: #D9A441;
  --error: #E5735A;
  --ok: #6FA880;

  --font-en: -apple-system, "SF Pro Text", BlinkMacSystemFont, Inter, system-ui, sans-serif;
  --font-cn: "PingFang SC", -apple-system, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, monospace;
  --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-cn), var(--font-en);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
section { position: relative; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(14,14,16,0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-2);
  display: grid; place-items: center;
  position: relative;
}
.logo-mark::before, .logo-mark::after {
  content: ""; position: absolute;
  border: 1.5px solid var(--text-2);
  border-radius: 50%;
}
.logo-mark::before { width: 14px; height: 14px; }
.logo-mark::after { width: 6px; height: 6px; background: var(--accent); border-color: var(--accent); }
.logo-name { font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--text-2); transition: color .15s; }
.nav-links a:hover { color: var(--text-1); }
.nav-cta {
  padding: 8px 14px; border-radius: 999px;
  background: var(--accent); color: #1a0f08; font-weight: 600;
  font-size: 13px; letter-spacing: 0.01em;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-strong); }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(229,145,95,0.10), transparent 60%),
    radial-gradient(700px 500px at 10% 30%, rgba(47,74,60,0.30), transparent 60%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 56px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(229,145,95,0.22);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

h1.hero-title {
  font-family: var(--font-cn), var(--font-en);
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 22px 0 0;
  text-wrap: balance;
}
h1.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
}
.hero-sub {
  margin: 24px 0 0;
  font-size: 19px; line-height: 1.65;
  color: var(--text-2);
  max-width: 540px;
  text-wrap: pretty;
}
.hero-cta-row { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #1a0f08;
  padding: 14px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-1);
  padding: 14px 22px; border-radius: 12px;
  font-weight: 500; font-size: 15px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-secondary:hover { background: var(--bg-3); border-color: rgba(255,255,255,0.18); }
.hero-meta {
  margin-top: 28px;
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .check { color: var(--ok); font-weight: 700; }

/* hero phone */
.hero-phone {
  position: relative;
  justify-self: center;
}
.phone-frame {
  width: 320px; height: 660px;
  background: #060607;
  border-radius: 44px;
  padding: 8px;
  box-shadow:
    0 50px 120px rgba(0,0,0,0.55),
    0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 0 0 2px rgba(255,255,255,0.03);
  position: relative;
}
.phone-frame::before {
  content: ""; position: absolute;
  top: 16px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 28px; background: #000;
  border-radius: 999px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--bg-0);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}

/* ---------- Section header ---------- */
.section-eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.section-title {
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.15; letter-spacing: -0.02em; font-weight: 700;
  margin: 14px 0 0; text-wrap: balance;
}
.section-title em { font-style: italic; font-family: var(--font-display); font-weight: 500; color: var(--accent); }
.section-lead {
  margin: 18px 0 0; font-size: 18px; color: var(--text-2);
  max-width: 680px; line-height: 1.65;
}

/* ---------- Problem section ---------- */
.problem {
  padding: 100px 0 80px;
  border-top: 1px solid var(--line);
}
.problem-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
@media (max-width: 720px) { .problem-grid { grid-template-columns: 1fr; } }
.problem-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 30px;
  position: relative;
}
.problem-card .tag {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.problem-card h3 {
  margin: 14px 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
}
.problem-card p { color: var(--text-2); font-size: 15px; line-height: 1.65; margin: 0; }
.problem-card.bad .tag { color: var(--error); }
.problem-card.good .tag { color: var(--accent); }
.problem-card.good { border-color: rgba(229,145,95,0.25); background: linear-gradient(180deg, rgba(229,145,95,0.04), var(--bg-1) 60%); }

/* ---------- Loop section ---------- */
.loop {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}
.loop-steps {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
}
@media (max-width: 900px) { .loop-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .loop-steps { grid-template-columns: 1fr; } }
.loop-step {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px 24px;
  position: relative;
}
.loop-step .num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--accent);
  font-weight: 600; letter-spacing: 0.06em;
}
.loop-step h4 {
  margin: 8px 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.loop-step p {
  margin: 0; font-size: 13px; color: var(--text-3); line-height: 1.55;
}
.loop-step .icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  margin-bottom: 14px;
  color: var(--text-1);
}

/* ---------- Features ---------- */
.features { padding: 100px 0; border-top: 1px solid var(--line); }
.feature-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  grid-column: span 2;
}
.feature.wide { grid-column: span 3; }
.feature.tall { grid-row: span 1; }
.feature .ftag {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; font-family: var(--font-mono);
}
.feature h3 {
  margin: 12px 0 10px;
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  text-wrap: balance;
}
.feature p {
  margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.65;
}
.feature .visual {
  margin-top: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

/* feature visuals */
.viz-subs { font-family: var(--font-en); }
.viz-subs .row { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; line-height: 1.45; align-items: flex-start; }
.viz-subs .ts { color: var(--text-4); font-family: var(--font-mono); font-size: 11px; min-width: 38px; padding-top: 2px; }
.viz-subs .txt { color: var(--text-3); }
.viz-subs .row.current { background: var(--accent-soft); margin: 0 -10px; padding: 8px 10px; border-radius: 8px; border-left: 2px solid var(--accent); }
.viz-subs .row.current .txt { color: var(--text-1); }
.viz-subs .row.done .txt { color: var(--text-4); }
.viz-subs .row.done .check { color: var(--primary-strong); margin-left: auto; }

.viz-blank { font-size: 18px; line-height: 1.7; color: var(--text-1); font-family: var(--font-en); }
.viz-blank .blank { display: inline-block; min-width: 70px; border-bottom: 2px solid var(--accent); margin: 0 3px; height: 1.1em; vertical-align: bottom; }
.viz-blank .reveal { color: var(--accent); border-bottom: 2px solid var(--accent); padding: 0 4px; }
.viz-blank .star { color: var(--accent); font-size: 13px; margin-left: 4px; }

.viz-wave { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.viz-wave .lab { font-size: 10px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.viz-wave .bars { display: flex; gap: 2px; align-items: center; height: 36px; }
.viz-wave .bars span { width: 3px; background: var(--text-3); border-radius: 2px; }
.viz-wave .bars.user span.diff { background: var(--error); }
.viz-wave .bars.original span { background: var(--text-2); }

.viz-ad { font-family: var(--font-en); font-size: 13px; }
.viz-ad .l { padding: 6px 0; color: var(--text-3); display: flex; gap: 10px; align-items: center; }
.viz-ad .l .ts { color: var(--text-4); font-family: var(--font-mono); font-size: 11px; min-width: 38px; }
.viz-ad .l.ad { color: var(--text-4); }
.viz-ad .l.ad .pill { background: rgba(217,164,65,0.16); color: var(--warn); padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; }

.viz-phrase { display: flex; flex-direction: column; gap: 8px; }
.viz-phrase .row { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.viz-phrase .row.sel { background: var(--accent-soft); border-color: rgba(229,145,95,0.3); }
.viz-phrase .check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--text-3); flex-shrink: 0; }
.viz-phrase .row.sel .check { background: var(--accent); border-color: var(--accent); }
.viz-phrase .ph { font-weight: 600; font-size: 13px; }
.viz-phrase .badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); }
.viz-phrase .badge.idiom { background: var(--accent-soft); color: var(--accent); }
.viz-phrase .badge.freq { background: rgba(111,168,128,0.16); color: var(--ok); }
.viz-phrase .freq-x { margin-left: auto; color: var(--accent); font-size: 11px; font-family: var(--font-mono); font-weight: 600; }

.viz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.viz-stats .cell { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.viz-stats .cell .v { font-size: 22px; font-weight: 700; font-family: var(--font-mono); }
.viz-stats .cell .l { font-size: 10px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }
.viz-stats .cell:nth-child(1) .v { color: var(--accent); }
.viz-stats .cell:nth-child(2) .v { color: var(--primary-strong); }
.viz-stats .chart { margin-top: 12px; grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.viz-stats .chart span { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; }
.viz-stats .chart span.today { background: var(--accent); }

/* ---------- Showcase strip (Phone screenshot row) ---------- */
.showcase {
  padding: 100px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent 0%, rgba(47,74,60,0.06) 50%, transparent 100%);
}
.showcase-rail {
  margin-top: 60px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 30px 32px 50px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}
.showcase-rail::-webkit-scrollbar { height: 6px; }
.showcase-rail::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
.showcase-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: start;
}
.showcase-card .mini-phone {
  width: 260px; height: 540px;
  background: #060607;
  border-radius: 36px;
  padding: 6px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
}
.showcase-card .mini-phone::before {
  content: ""; position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 22px; background: #000; border-radius: 999px; z-index: 3;
}
.showcase-card .mini-screen {
  width: 100%; height: 100%;
  background: var(--bg-0);
  border-radius: 30px; overflow: hidden;
  position: relative;
}
.showcase-card .label { margin-top: 18px; padding: 0 8px; }
.showcase-card .label .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; }
.showcase-card .label .name { font-size: 16px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; }
.showcase-card .label .desc { font-size: 13px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }

/* ---------- Pricing/Cost transparency ---------- */
.pricing {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}
.pricing-card {
  margin-top: 56px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 720px) { .pricing-card { grid-template-columns: 1fr; gap: 36px; padding: 32px; } }
.pricing-card .left h3 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px;
}
.pricing-card .left .free-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(111,168,128,0.14);
  color: var(--ok);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.pricing-card .left p {
  color: var(--text-2); line-height: 1.65; margin: 0 0 14px;
}
.pricing-card .breakdown {
  background: var(--bg-2); border-radius: 16px; padding: 22px;
  border: 1px solid var(--line);
}
.pricing-card .breakdown h4 {
  margin: 0 0 16px; font-size: 13px; color: var(--text-3);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  font-family: var(--font-mono);
}
.pricing-card .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.pricing-card .row:last-of-type { border-bottom: none; }
.pricing-card .row .l { color: var(--text-2); }
.pricing-card .row .v { color: var(--text-1); font-family: var(--font-mono); font-size: 13px; }
.pricing-card .total {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-strong);
  display: flex; justify-content: space-between; align-items: baseline;
}
.pricing-card .total .l { font-size: 14px; color: var(--text-2); }
.pricing-card .total .v {
  font-size: 28px; font-weight: 700; font-family: var(--font-mono);
  color: var(--accent);
}
.pricing-card .total .v small { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 4px; }

/* ---------- Plans (two-tier) ---------- */
.plans {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

.plan {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan-pro {
  border-color: rgba(229,145,95,0.3);
  background: linear-gradient(180deg, rgba(229,145,95,0.05), var(--bg-1) 50%);
}
.plan-flag {
  position: absolute;
  top: -11px; left: 32px;
  background: var(--accent);
  color: #1a0f08;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.plan-name {
  font-size: 14px; font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.plan-pro .plan-name { color: var(--accent); }
.plan-price {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 14px;
}
.plan-price .v {
  font-size: 52px; font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--font-en);
  line-height: 1;
}
.plan-pro .plan-price .v { color: var(--accent); }
.plan-price .per {
  font-size: 15px; color: var(--text-3);
}
.plan-tagline {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}

.plan-features {
  list-style: none;
  margin: 24px 0 32px;
  padding: 0;
  flex: 1;
}
.plan-features li {
  font-size: 14.5px;
  color: var(--text-2);
  padding: 9px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.plan-features li strong { color: var(--text-1); font-weight: 600; }
.li-check {
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 2px;
}
.plan-pro .li-check { color: var(--accent); }

.plan-cta {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s, transform .15s;
}
.plan-cta-ghost {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-1);
}
.plan-cta-ghost:hover { background: var(--bg-3); }
.plan-cta-primary {
  background: var(--accent);
  color: #1a0f08;
}
.plan-cta-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }

.pricing-foot {
  margin: 36px auto 0;
  max-width: 640px;
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- Author's note ---------- */
.author { padding: 100px 0 0; }
.author-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 44px 48px;
}
.author-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.author-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
}
.author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.author-name { font-size: 17px; font-weight: 600; color: var(--text-1); }
.author-meta { font-size: 13px; color: var(--text-3); margin-top: 2px; font-family: var(--font-mono); }
.author-quote {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-2);
  margin: 0 0 18px;
  font-family: var(--font-serif), Georgia, serif;
}
.author-quote:last-of-type { margin-bottom: 26px; }
.author-foot { display: flex; gap: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.author-link {
  font-size: 13.5px;
  color: var(--accent);
  font-family: var(--font-mono);
}
.author-link:hover { color: var(--accent-strong); }
@media (max-width: 720px) {
  .author-card { padding: 32px 24px; }
  .author-quote { font-size: 15px; }
  .author-foot { flex-direction: column; gap: 10px; }
}

/* ---------- Open source ---------- */
.oss {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.oss-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}
@media (max-width: 720px) { .oss-row { grid-template-columns: 1fr; } }
.oss-tile {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
}
.oss-tile h4 { margin: 0 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.oss-tile p { margin: 0; font-size: 14px; color: var(--text-3); line-height: 1.6; }
.oss-tile .icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  margin-bottom: 16px; color: var(--accent);
}

/* ---------- FAQ ---------- */
.faq { padding: 100px 0; border-top: 1px solid var(--line); }
.faq-list { margin-top: 48px; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-1);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-2); display: grid; place-items: center;
  color: var(--text-2); font-size: 16px; font-weight: 400;
  transition: transform .2s, background .2s;
}
.faq-item[open] summary .plus { transform: rotate(45deg); background: var(--accent); color: #1a0f08; }
.faq-item .body {
  margin: 14px 0 4px; color: var(--text-2);
  font-size: 15px; line-height: 1.7;
  max-width: 820px;
}

/* ---------- CTA ---------- */
.cta-final {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 100%, rgba(229,145,95,0.12), transparent 70%);
  pointer-events: none;
}
.cta-final h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  margin: 0; text-wrap: balance; position: relative;
}
.cta-final h2 em { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--accent); }
.cta-final p {
  margin: 22px auto 36px; color: var(--text-2);
  font-size: 18px; max-width: 560px; line-height: 1.65; position: relative;
}
.cta-final .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 60px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-3); transition: color .15s; }
.footer-links a:hover { color: var(--text-1); }


/* ============================================================
   i18n: language switcher, banner, RTL, per-language font swaps
   ============================================================ */

/* Language switcher (lives in nav) */
#lang-switcher { position: relative; display: inline-flex; align-items: center; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-2); font: inherit; font-size: 13px;
  padding: 6px 10px; border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lang-trigger:hover { background: var(--bg-2); color: var(--text-1); border-color: rgba(255,255,255,0.18); }
.lang-trigger svg { color: var(--text-3); }
.lang-trigger-label { font-weight: 500; letter-spacing: 0.01em; }
.lang-trigger-caret { font-size: 10px; color: var(--text-3); margin-left: 1px; }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02);
  z-index: 100;
}
[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 8px;
  cursor: pointer; outline: none;
  font-size: 14px;
  transition: background .12s;
}
.lang-menu li:hover, .lang-menu li:focus { background: var(--bg-2); }
.lang-menu li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.lang-menu .lang-native { font-weight: 600; }
.lang-menu .lang-name { color: var(--text-3); font-size: 12px; font-family: var(--font-en); }
.lang-menu li[aria-selected="true"] .lang-name { color: var(--accent); opacity: 0.75; }

@media (max-width: 720px) {
  .lang-trigger { padding: 6px 8px; font-size: 12px; }
  .lang-trigger-caret { display: none; }
}

/* Banner */
#lang-banner {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(90deg, rgba(229,145,95,0.14), rgba(47,74,60,0.18));
  border-bottom: 1px solid rgba(229,145,95,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13.5px;
  color: var(--text-1);
}
.lang-banner-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 10px 32px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.lang-banner-text { flex: 1 1 auto; min-width: 220px; color: var(--text-1); }
.lang-banner-actions { display: flex; gap: 8px; align-items: center; }
.lang-banner-keep, .lang-banner-revert {
  background: transparent; color: var(--text-1);
  border: 1px solid var(--line-strong);
  padding: 6px 12px; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lang-banner-keep { background: var(--accent); color: #1a0f08; border-color: var(--accent); font-weight: 600; }
.lang-banner-keep:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.lang-banner-revert:hover { background: var(--bg-2); }
.lang-banner-close {
  background: transparent; border: none; color: var(--text-3);
  font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.lang-banner-close:hover { background: var(--bg-2); color: var(--text-1); }
@media (max-width: 540px) {
  .lang-banner-inner { padding: 10px 16px; }
  .lang-banner-actions { width: 100%; }
}

/* ---------- Per-language font swaps ---------- */
/* Default (zh) already uses PingFang stack via --font-cn. Swap for others. */
body[data-lang="en"] {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
body[data-lang="ja"] {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
}
body[data-lang="ko"] {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
}
body[data-lang="hi"] {
  font-family: "Noto Sans Devanagari", "Mangal", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
body[data-lang="ar"] {
  font-family: "Noto Naskh Arabic", "Geeza Pro", "Tahoma", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero/section title fonts: keep Fraunces for em on Latin scripts; for Asian/Arabic, em uses
   the script's own italic-ish flavour (system serif fallback) since Fraunces lacks coverage */
body[data-lang="ja"] h1.hero-title em,
body[data-lang="ja"] .section-title em,
body[data-lang="ja"] h2 em,
body[data-lang="ko"] h1.hero-title em,
body[data-lang="ko"] .section-title em,
body[data-lang="ko"] h2 em {
  font-family: inherit; font-style: normal; font-weight: 700;
  /* underline accent so the emphasis still reads when italic isn't available */
  background: linear-gradient(transparent 70%, var(--accent-soft) 70%);
  padding: 0 0.1em;
}
body[data-lang="hi"] h1.hero-title em,
body[data-lang="hi"] .section-title em,
body[data-lang="hi"] h2 em {
  font-family: "Noto Serif Devanagari", Georgia, serif;
  font-style: normal; font-weight: 600;
}
body[data-lang="ar"] h1.hero-title em,
body[data-lang="ar"] .section-title em,
body[data-lang="ar"] h2 em {
  font-family: "Amiri", "Noto Naskh Arabic", serif;
  font-style: normal; font-weight: 700;
}

/* English keeps Fraunces italic for em (already default). */

/* Adjust title scale slightly for scripts where glyphs run wider */
body[data-lang="hi"] h1.hero-title,
body[data-lang="ar"] h1.hero-title { font-size: clamp(36px, 5vw, 60px); }
body[data-lang="ja"] h1.hero-title,
body[data-lang="ko"] h1.hero-title { font-size: clamp(36px, 5vw, 62px); }

/* ---------- RTL adjustments ---------- */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .nav-inner,
[dir="rtl"] .hero-inner,
[dir="rtl"] .footer-inner { direction: rtl; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .hero-meta { direction: rtl; }
[dir="rtl"] .hero-cta-row { direction: rtl; }

/* Mirror left-pointing chevrons / arrows in nav buttons (we only have minor ones) */
[dir="rtl"] .author-link,
[dir="rtl"] .btn-secondary { /* arrows are in text — we provide ar-specific ones in copy already */ }

/* Phone mockup / showcase rail: keep LTR internally because it shows English transcripts */
[dir="rtl"] .hero-phone,
[dir="rtl"] .phone-screen,
[dir="rtl"] .mini-phone,
[dir="rtl"] .mini-screen,
[dir="rtl"] .feature .visual,
[dir="rtl"] .showcase-rail { direction: ltr; text-align: left; }

/* Section eyebrows + mono labels stay LTR (they're often English/code) */
[dir="rtl"] .section-eyebrow,
[dir="rtl"] .eyebrow,
[dir="rtl"] .ftag,
[dir="rtl"] .loop-step .num,
[dir="rtl"] .feature .ftag { direction: ltr; display: inline-block; unicode-bidi: isolate; }

/* Loop steps: in RTL the icon should sit on the right */
[dir="rtl"] .loop-step .icon { margin-left: auto; margin-right: 0; }

/* Problem cards / feature cards: text alignment */
[dir="rtl"] .problem-card,
[dir="rtl"] .loop-step,
[dir="rtl"] .feature,
[dir="rtl"] .oss-tile,
[dir="rtl"] .author-card,
[dir="rtl"] .faq-item summary,
[dir="rtl"] .faq-item .body { text-align: right; }

/* FAQ plus icon — flip side */
[dir="rtl"] .faq-item summary { flex-direction: row-reverse; }

/* Author card: foot links arrow direction handled by translation copy */
[dir="rtl"] .author-foot { flex-direction: row-reverse; }

/* Logo mark / phone notch shouldn't flip */
[dir="rtl"] .logo { flex-direction: row-reverse; }
[dir="rtl"] .logo-mark { transform: none; }

/* Hero phone: in RTL, place phone on left side (visual balance) */
@media (min-width: 901px) {
  [dir="rtl"] .hero-inner { grid-template-columns: 0.9fr 1.1fr; }
  [dir="rtl"] .hero-copy { grid-column: 2; }
  [dir="rtl"] .hero-phone { grid-column: 1; grid-row: 1; }
}

/* ---------- Actions stage (long-press on a sentence) ---------- */
.actions { padding: 110px 0; border-top: 1px solid var(--line); }

.actions-stage {
  position: relative;
  margin: 64px auto 0;
  max-width: 1040px;
  height: 620px;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px) 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "left center right"
    "bottom bottom bottom";
  gap: 8px 32px;
}
.lane-left   { grid-area: left;   display:flex; flex-direction:column; gap:18px; align-items:flex-end; padding-right:8px; padding-top:24px; }
.lane-right  { grid-area: right;  display:flex; flex-direction:column; gap:18px; align-items:flex-start; padding-left:8px;  padding-top:24px; }
.lane-bottom { grid-area: bottom; display:flex; flex-direction:column; align-items:center; gap:14px; padding-top:32px; }
.action-center { grid-area: center; position: relative; display:flex; flex-direction:column; align-items:center; justify-content:center; padding: 0 12px; }

.action-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* lane label – tiny vertical / horizontal eyebrow */
.lane-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg-1);
  position: relative;
  z-index: 2;
}
.lane-left  .lane-label { align-self: flex-end; }
.lane-right .lane-label { align-self: flex-start; }

.lane-bottom-row {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
}

/* action card – pill */
.action-card {
  position: relative; z-index: 2;
  width: 280px;
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.action-card .action-mark {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.action-card .action-mark sub { font-size: 8px; margin-left: 1px; }
.action-card .action-body { flex: 1; min-width: 0; }
.action-card .action-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.005em;
}
.action-card .action-meta {
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.action-card .progress {
  height: 3px;
  background: var(--bg-3);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.action-card .progress > span {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* center – pressed sentence card */
.press-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--accent);
  border-radius: 18px;
  padding: 18px 22px 22px;
  width: 100%;
  max-width: 380px;
  box-shadow:
    0 0 0 6px rgba(217,123,87,0.10),
    0 0 0 14px rgba(217,123,87,0.04),
    0 30px 80px rgba(0,0,0,0.55);
  z-index: 2;
}
.press-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.press-time { color: var(--accent); }
.press-press { color: var(--text-3); }
.press-text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-1);
  letter-spacing: -0.005em;
  font-weight: 500;
}
.press-text u {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.press-finger {
  position: absolute;
  bottom: -16px; right: 28px;
  z-index: 3;
}
.press-ring {
  position: absolute;
  inset: -22px;
  border-radius: 26px;
  border: 1px dashed rgba(217,123,87,0.35);
  pointer-events: none;
  animation: press-pulse 2.4s ease-in-out infinite;
  z-index: 1;
}
@keyframes press-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.015); }
}
.press-hint {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

/* takeaways below */
.actions-takeaways {
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1040px;
}
.action-pt {
  display: flex; gap: 14px; align-items: flex-start;
}
.action-pt-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding-top: 4px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 22px;
  line-height: 1;
  display: grid; place-items: center;
  background: var(--bg-1);
}
.action-pt h4 {
  margin: 0 0 6px;
  font-size: 16px; font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.005em;
}
.action-pt p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

/* responsive */
@media (max-width: 900px) {
  .actions-stage {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "center" "left" "right" "bottom";
    gap: 24px;
  }
  .lane-left, .lane-right, .lane-bottom { align-items: center; padding: 0; }
  .lane-bottom-row { flex-direction: column; }
  .action-card { width: 100%; max-width: 320px; }
  .action-lines { display: none; }
  .actions-takeaways { grid-template-columns: 1fr; gap: 22px; }
}
