/* Authenticator landing. Họ màu: cobalt + cream (xem references/DESIGN.md). Một accent / trang. */
@font-face {
  font-family: "Geist"; src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
:root {
  --bg: #f5f3ee; --bg-2: #ebe8e0; --fg: #171a22; --muted: #5c6170; --line: #d8d4ca;
  --accent: #2857c9; --accent-fg: #f5f3ee; --tint: #e2e8f6; --phone: #111318;
  --r: 14px; --r-lg: 28px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1420; --bg-2: #161c2b; --fg: #e9e8e3; --muted: #9aa0ad; --line: #262d3d;
          --accent: #6d93ee; --accent-fg: #0f1420; --tint: #18223a; --phone: #05070c; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--fg); background: var(--bg); font-feature-settings: "ss01"; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.08; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 28px; max-width: 20ch; }
h3 { font-size: 20px; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-fg); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 64px;
  padding: 0 clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid var(--accent); transition: transform .15s var(--ease), background .2s, border-color .2s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, var(--fg)); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--muted); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-store { padding: 10px 20px 10px 16px; }
.btn-store span { display: flex; flex-direction: column; line-height: 1.1; font-size: 16px; }
.btn-store small { font-size: 11px; font-weight: 500; opacity: .8; letter-spacing: .01em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

main > section { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  min-height: calc(100dvh - 64px); padding-top: 24px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 20px; max-width: 12ch; }
.hero h1 em, .lead em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 36ch; margin-bottom: 28px; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 14px; }
.hero-visual { position: relative; margin: 0; aspect-ratio: 5 / 6; max-height: calc(100dvh - 120px); border-radius: var(--r-lg);
  overflow: hidden; background: radial-gradient(120% 90% at 70% 10%, var(--tint), var(--bg-2) 70%); }
.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .phone { position: absolute; left: 50%; bottom: -8%; width: min(54%, 320px); transform: translateX(-50%) rotate(-3deg); }
.phone { border-radius: 44px; padding: 10px; background: var(--phone); overflow: hidden; box-shadow: 0 40px 70px -24px rgb(10 14 30 / .55), inset 0 0 0 1px rgb(255 255 255 / .06); }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 720 / 1636; object-fit: cover; }

/* Chip code sống */
.code-chip { position: absolute; left: 7%; top: 12%; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px;
  border-radius: 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgb(10 14 30 / .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.code-chip small { display: block; color: var(--muted); font-size: 12px; }
.code-chip strong { font-size: 20px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.ring circle { fill: none; stroke: var(--line); stroke-width: 3; }
.ring .ring-fill { stroke: var(--accent); stroke-dasharray: 97.4; stroke-dashoffset: var(--left, 0); transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset 1s linear; }

/* Strip */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-top: 28px; padding-bottom: 28px; }
.strip div { display: flex; flex-direction: column; gap: 4px; }
.strip strong { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.strip span { color: var(--muted); font-size: 14px; max-width: 26ch; }

/* Services marquee */
.services { padding-top: 56px; padding-bottom: 8px; }
.services > p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; }
.marquee-track span { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--fg); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
}

/* Feature stack: trái dính, phải cuộn */
.stack { padding-top: 112px; padding-bottom: 48px; }
.stack-head { max-width: 640px; margin-bottom: 56px; }
.stack-head p { color: var(--muted); font-size: 18px; }
.stack-body { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.stack-sticky { position: sticky; top: calc(50vh - 130px); height: 260px; }
.stack-pane { position: absolute; inset: 0 0 auto 0; max-width: 40ch; opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease); }
.stack-pane.active { opacity: 1; transform: none; pointer-events: auto; }
.stack-pane h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 14px; }
.stack-pane p { color: var(--muted); font-size: 17px; }
.stack-dots { position: absolute; left: 0; bottom: 0; display: flex; gap: 6px; }
.stack-dots i { width: 22px; height: 3px; border-radius: 2px; background: var(--line); transition: background .3s, width .3s var(--ease); }
.stack-dots i.active { background: var(--accent); width: 40px; }
.stack-scroll { display: flex; flex-direction: column; gap: 10vh; padding: 10vh 0; }
.stack-shot { margin: 0; display: flex; justify-content: center; }
.stack-shot figcaption { display: none; }
.phone-sm { width: min(68%, 300px); transition: transform .6s var(--ease), opacity .6s var(--ease); opacity: .35; transform: scale(.94); }
.stack-shot.active .phone-sm { opacity: 1; transform: none; }

/* How it works: cột dọc có đường kẻ */
.how { padding-top: 96px; padding-bottom: 48px; }
.steps { list-style: none; margin: 0; padding: 0; max-width: 680px; border-left: 1px solid var(--line); }
.steps li { padding: 0 0 40px 32px; position: relative; }
.steps li::before { content: ""; position: absolute; left: -1px; top: 6px; width: 1px; height: 22px; background: var(--accent); }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); max-width: 56ch; }

/* Quote */
.quote { padding-top: 96px; padding-bottom: 96px; }
.quote blockquote { margin: 0; }
.quote p { max-width: 30ch; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.quote footer { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { padding-bottom: 96px; }
.faq details { border-top: 1px solid var(--line); max-width: 760px; overflow: hidden; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 500; font-size: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 64ch; }
.faq a { color: var(--fg); }

/* Closing */
.closing { padding-top: 64px; padding-bottom: 128px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.closing h2 { margin: 0; max-width: 22ch; }

body > footer { border-top: 1px solid var(--line); padding: 32px clamp(16px, 4vw, 40px); color: var(--muted); font-size: 14px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1120px; margin: 0 auto; }
body > footer nav { display: flex; gap: 20px; }
body > footer a { text-decoration: none; }
body > footer a:hover { color: var(--fg); }

/* Trang con: privacy / terms / support / 404 */
.doc { max-width: 720px; margin: 0 auto; padding: 64px clamp(16px, 4vw, 40px) 128px; }
.doc h1 { font-size: clamp(32px, 4.5vw, 48px); margin-bottom: 12px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 48px; }
.doc h2 { font-size: 22px; margin: 44px 0 12px; max-width: none; }
.doc p, .doc li { color: var(--muted); font-size: 16px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 10px 0; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--fg); }
.doc strong { color: var(--fg); font-weight: 500; }
.doc .card { background: var(--bg-2); border-radius: var(--r-lg); padding: 28px; margin: 24px 0; }
.doc .card h2 { margin-top: 0; }

/* Reveal khi cuộn */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-visual { animation: rise 1s var(--ease) .1s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* Mobile */
@media (max-width: 900px) {
  .stack-body { grid-template-columns: 1fr; }
  .stack-sticky { display: none; }
  .stack-scroll { gap: 48px; padding: 0; }
  .stack-shot { flex-direction: column; align-items: center; gap: 16px; }
  .stack-shot figcaption { display: block; font-weight: 500; font-size: 18px; text-align: center; }
  .phone-sm { width: min(70%, 280px); opacity: 1; transform: none; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 40px; }
  .hero-visual { aspect-ratio: 4 / 5; order: 2; max-height: none; }
  .hero .phone { width: 58%; }
  .code-chip { left: 5%; top: 6%; }
  .strip { grid-template-columns: 1fr; gap: 20px; }
  .btn { white-space: normal; }
  .cta .btn-store { flex: 1 1 100%; justify-content: center; }
  .stack { padding-top: 80px; }
  .steps li { padding-left: 22px; }
}
