:root {
  --accent: #c8a886;
  --accent-hi: #e2c9a8;
  --ink: #1c1b1a;
  --ink-2: #201f1d;
  --paper: #f4efe8;
  --shade: 22, 21, 20;
  --sans: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --zh: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--ink); }
body { font-family: var(--sans); color: var(--paper); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
a:hover { color: var(--accent-hi); }
button { font: inherit; }
.zh, :lang(zh) { font-family: var(--sans); }
html[lang^="zh"] body { font-family: 'DM Sans', var(--zh); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page { position: relative; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; background: var(--ink); }

/* ── Header ─────────────────────────────────────────── */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 40px; padding-top: max(22px, env(safe-area-inset-top)); background: linear-gradient(180deg, rgba(var(--shade), .82) 0%, rgba(var(--shade), 0) 100%); opacity: 0; animation: fadeDown .9s .2s cubic-bezier(.2,.8,.2,1) forwards; }
.top::after { content: ''; position: absolute; left: 40px; right: 40px; bottom: 0; height: 1px; background: var(--accent); opacity: .45; transform: scaleX(0); transform-origin: left; animation: draw 1.6s .5s cubic-bezier(.7,0,.2,1) forwards; }
.logo { height: 46px; width: auto; display: block; }
.top-right { display: flex; align-items: center; gap: 22px; }
.tagline { margin: 0; font-size: 14px; letter-spacing: .01em; color: rgba(244,239,232,.78); white-space: nowrap; }
.tagline em { font-style: normal; color: var(--accent); }

.lang { display: flex; border: 1px solid rgba(200,168,134,.4); border-radius: 2px; overflow: hidden; }
.lang button { appearance: none; background: transparent; border: 0; color: rgba(244,239,232,.6); height: 40px; min-width: 46px; padding: 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .1em; cursor: pointer; transition: background .3s, color .3s; }
.lang button[lang] { font-family: var(--zh); letter-spacing: .04em; }
.lang button + button { border-left: 1px solid rgba(200,168,134,.4); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.lang button:not([aria-pressed="true"]):hover { color: var(--paper); background: rgba(200,168,134,.12); }

.touch { appearance: none; background: transparent; border: 1px solid rgba(200,168,134,.55); color: var(--paper); font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; height: 40px; padding: 0 16px; cursor: pointer; border-radius: 2px; white-space: nowrap; transition: background .3s, border-color .3s; }
.touch:hover { background: rgba(200,168,134,.14); border-color: var(--accent); }
html[lang^="zh"] .touch { letter-spacing: .12em; }

/* ── Panels ─────────────────────────────────────────── */
.panels { flex: 1 1 auto; min-height: 0; display: flex; }
.panel { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; clip-path: inset(100% 0 0 0); animation: rise 1.25s var(--d, 0s) cubic-bezier(.76,0,.24,1) forwards; transition: flex-grow .9s cubic-bezier(.2,.8,.2,1); }
.panel + .panel { border-left: 1px solid rgba(200,168,134,.22); }
.bg-wrap { position: absolute; inset: 0; transform: scale(1.22); animation: settle 2.8s var(--d, 0s) cubic-bezier(.2,.7,.2,1) forwards; }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s cubic-bezier(.2,.8,.2,1), filter 1s; filter: saturate(.92) brightness(.9); }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--shade), .5) 0%, rgba(var(--shade), .08) 30%, rgba(var(--shade), .62) 62%, rgba(var(--shade), .95) 100%); }
.grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; pointer-events: none; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.content { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 40px 52px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.content > * { opacity: 0; transform: translateY(22px); animation: up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.content > *:nth-child(1) { animation-delay: calc(var(--d, 0s) + .75s); }
.content > *:nth-child(2) { animation-delay: calc(var(--d, 0s) + .85s); }
.content > *:nth-child(3) { animation-delay: calc(var(--d, 0s) + .95s); }
.content > *:nth-child(4) { animation-delay: calc(var(--d, 0s) + 1.05s); }
.content > *:nth-child(5) { animation-delay: calc(var(--d, 0s) + 1.15s); }

.num { font-size: 104px; font-weight: 300; line-height: .78; letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px var(--accent); margin: 0 0 6px -4px; transition: color .8s; font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 0; }
html[lang^="zh"] .eyebrow { letter-spacing: .18em; font-size: 13px; }
.title { font-size: clamp(32px, 2.9vw, 46px); font-weight: 300; line-height: 1.06; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
html[lang^="zh"] .title { letter-spacing: .02em; line-height: 1.2; }
.title em { font-style: normal; color: var(--accent); }
.sub { font-size: 15px; line-height: 1.55; color: rgba(244,239,232,.74); margin: 0; max-width: 34ch; text-wrap: pretty; }
html[lang^="zh"] .sub { max-width: 22em; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ── Buttons ────────────────────────────────────────── */
.cta { appearance: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 50px; padding: 0 22px; border: 1px solid var(--accent); background: var(--accent); color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-decoration: none; border-radius: 2px; cursor: pointer; overflow: hidden; transition: background .35s, color .35s, border-color .35s, opacity .3s; }
.cta:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--ink); }
.cta.ghost { background: rgba(var(--shade), .35); color: var(--paper); border-color: rgba(200,168,134,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cta.ghost:hover { background: var(--accent); color: var(--ink); }
.cta svg { width: 18px; height: 18px; flex: none; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.cta:hover .i-arrow { transform: translateX(4px); }
.cta:hover .i-ext { transform: translate(3px, -3px); }
.cta:hover .i-dl { transform: translateY(3px); }
.cta[aria-busy="true"] { opacity: .7; cursor: progress; }

@media (hover: hover) and (min-width: 761px) {
  .panels:hover .panel { flex-grow: .82; }
  .panels .panel:hover { flex-grow: 1.45; }
  .panel:hover .bg { transform: scale(1.06); filter: saturate(1) brightness(1); }
  .panel:hover .num { color: rgba(200,168,134,.16); }
}

/* ── Toast ──────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 14px 20px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; border-radius: 2px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); animation: toastIn .6s cubic-bezier(.2,.8,.2,1) both; text-align: center; }

/* ── Lead form ──────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(14,13,12,.58); -webkit-backdrop-filter: blur(12px) saturate(.8); backdrop-filter: blur(12px) saturate(.8); animation: fade .6s ease both; }
.sheet { position: relative; width: 100%; max-width: 448px; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--ink-2); border: 1px solid rgba(200,168,134,.3); padding: 44px 40px 32px; box-shadow: 0 50px 90px -30px rgba(0,0,0,.7); animation: sheetUp .8s .1s cubic-bezier(.2,.8,.2,1) both; }
.sheet::before { content: ''; position: absolute; left: 40px; right: 40px; top: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: draw 1s .5s cubic-bezier(.7,0,.2,1) forwards; }
.x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: rgba(244,239,232,.6); cursor: pointer; border-radius: 2px; }
.x:hover { color: var(--paper); background: rgba(244,239,232,.06); }
.x svg { width: 18px; height: 18px; }
.sheet h2 { font-size: 32px; font-weight: 300; line-height: 1.12; letter-spacing: -.015em; margin: 12px 0 12px; outline: none; }
html[lang^="zh"] .sheet h2 { letter-spacing: .02em; }
.sheet h2 em { font-style: normal; color: var(--accent); }
.lede { font-size: 15px; line-height: 1.55; color: rgba(244,239,232,.72); margin: 0 0 26px; text-wrap: pretty; }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(244,239,232,.55); }
html[lang^="zh"] .field label { font-size: 13px; letter-spacing: .1em; }
.field input { appearance: none; width: 100%; height: 46px; padding: 0 2px; background: transparent; border: 0; border-bottom: 1px solid rgba(244,239,232,.22); border-radius: 0; color: var(--paper); font: inherit; font-size: 17px; outline: none; transition: border-color .3s; }
.field input::placeholder { color: rgba(244,239,232,.3); }
.field input:focus { border-bottom-color: var(--accent); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--paper); -webkit-box-shadow: 0 0 0 40px var(--ink-2) inset; caret-color: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; font-size: 14px; color: #f0b9a4; }
.submit { width: 100%; margin-top: 10px; height: 54px; }
.later { align-self: center; appearance: none; background: transparent; border: 0; color: rgba(244,239,232,.55); font-size: 13px; letter-spacing: .04em; height: 44px; padding: 0 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(244,239,232,.25); }
.later:hover { color: var(--paper); }
.fine { font-size: 12px; line-height: 1.5; color: rgba(244,239,232,.4); margin: 6px 0 0; text-align: center; }
.done { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.note { font-size: 13px; line-height: 1.5; color: rgba(244,239,232,.6); margin: -12px 0 20px; }
.check { width: 64px; height: 64px; color: var(--accent); }
.check circle { stroke-dasharray: 176; stroke-dashoffset: 176; animation: dash .9s cubic-bezier(.7,0,.2,1) forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: dash .5s .7s cubic-bezier(.7,0,.2,1) forwards; }

/* ── Motion ─────────────────────────────────────────── */
@keyframes rise { to { clip-path: inset(0 0 0 0); } }
@keyframes riseX { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { to { transform: scale(1); } }
@keyframes up { to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheetUpM { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes dash { to { stroke-dashoffset: 0; } }

/* ── Tablet ─────────────────────────────────────────── */
@media (max-width: 1180px) and (min-width: 761px) {
  .tagline { display: none; }
  .content { padding: 0 28px 40px; }
  .num { font-size: 84px; }
  .cta { padding: 0 16px; }
  .actions { gap: 8px; }
}

/* ── Mobile: three rows share the phone's height ────── */
@media (max-width: 760px) {
  .top { position: relative; flex: none; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); gap: 10px; background: var(--ink); }
  .top::after { left: 16px; right: 16px; }
  .logo { height: 34px; }
  .tagline { display: none; }
  .top-right { gap: 8px; }
  .lang button { height: 44px; min-width: 42px; padding: 0 8px; }
  .touch { height: 44px; font-size: 11px; padding: 0 10px; letter-spacing: .12em; }
  .panels { flex-direction: column; }
  .panel { clip-path: inset(0 100% 0 0); animation-name: riseX; }
  .panel + .panel { border-left: 0; border-top: 1px solid rgba(200,168,134,.25); }
  .shade { background: linear-gradient(90deg, rgba(var(--shade), .9) 0%, rgba(var(--shade), .62) 55%, rgba(var(--shade), .25) 100%), linear-gradient(0deg, rgba(var(--shade), .6), rgba(var(--shade), 0) 60%); }
  .content { top: 0; bottom: 0; justify-content: center; gap: 8px; padding: 0 20px; }
  .panel:last-child .content { padding-bottom: env(safe-area-inset-bottom); }
  .num { position: absolute; top: 14px; right: 18px; font-size: 58px; margin: 0; }
  .eyebrow { font-size: 11px; letter-spacing: .24em; }
  html[lang^="zh"] .eyebrow { font-size: 12px; }
  .title { font-size: 26px; max-width: 78%; }
  .sub { font-size: 13px; line-height: 1.45; max-width: 30ch; }
  html[lang^="zh"] .sub { line-height: 1.6; }
  .actions { margin-top: 6px; gap: 8px; }
  .cta { height: 44px; padding: 0 16px; font-size: 13px; }
  .scrim { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-width: 1px 0 0; padding: 32px 22px calc(20px + env(safe-area-inset-bottom)); animation-name: sheetUpM; }
  .sheet::before { left: 22px; right: 22px; }
  .sheet h2 { font-size: 28px; }
  .lede { margin-bottom: 18px; font-size: 14px; }
  .form { gap: 12px; }
  .toast { bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) and (max-height: 760px) {
  .sub { display: none; }
  .num { font-size: 46px; }
  .lede { display: none; }
}
@media (max-width: 360px) {
  .logo { height: 28px; }
  .touch { letter-spacing: .06em; padding: 0 8px; }
}
/* Phones held sideways: let the page scroll instead of squeezing */
@media (max-height: 500px) and (orientation: landscape) {
  .page { height: auto; min-height: 100svh; overflow: visible; }
  .panels { flex-direction: column; }
  .panel { flex: none; height: 300px; }
  .top { position: relative; background: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}
