/* Colors: Radix Colors 3.0.0 sand + ruby (MIT). Steps 1–2 backgrounds, 6–7 borders, 11–12 text. */
:root {
  --canvas:#f3f0ea; --surface:#fbf8f2; --hairline:#dad9d6; --text:#21201c; --muted:#63635e; --faint:#8d8d86;
  --wax:#ca244d; --wax-deep:#64172b; --wax-subtle:#feeaed;
  --seal:#9a1a35; --seal-shade:#4a0d1f;
}
@media (prefers-color-scheme: dark) {
  :root { --canvas:#151412; --surface:#22201c; --hairline:#3b3a37; --text:#eeeeec; --muted:#b5b3ad; --faint:#6f6d66;
    --wax:#ff949d; --wax-deep:#fed2e1; --wax-subtle:#3a141e; --seal:#b81f40; --seal-shade:#3a0a18; }
}
@font-face { font-family:"Pretendard"; font-weight:400; font-display:swap; src:url(fonts/Pretendard-Regular.subset.woff2) format("woff2"); }
@font-face { font-family:"Pretendard"; font-weight:600; font-display:swap; src:url(fonts/Pretendard-SemiBold.subset.woff2) format("woff2"); }
@font-face { font-family:"Instrument Serif"; font-style:normal; font-display:swap; src:url(fonts/InstrumentSerif-Regular.ttf) format("truetype"); }
@font-face { font-family:"Instrument Serif"; font-style:italic; font-display:swap; src:url(fonts/InstrumentSerif-Italic.ttf) format("truetype"); }

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--canvas); color:var(--text);
  font:400 16px/1.7 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; }
/* Pretendard has no kana or hanzi; use each script's system face so lines don't mix fonts mid-word. */
:lang(ja) body, body:lang(ja) { font-family:-apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
:lang(zh-Hans) body, body:lang(zh-Hans) { font-family:-apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) body, body:lang(zh-Hant) { font-family:-apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
main { max-width:720px; margin:0 auto; padding:32px 16px 80px; }
a { color:var(--wax); text-underline-offset:3px; }

.top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding-bottom:16px; border-bottom:1px solid var(--hairline); }
.brand { display:flex; align-items:center; gap:8px; color:var(--text); text-decoration:none; font-weight:600; }
.brand img { width:26px; height:26px; border-radius:6px; }
.top nav { display:flex; gap:16px; font-size:15px; }
.top nav a { color:var(--muted); text-decoration:none; white-space:nowrap; }
.top nav a:hover { color:var(--text); }

.serif { font-family:"Instrument Serif", "Apple SD Gothic Neo", serif; font-weight:400; }
h1 { word-break:keep-all; font-family:"Instrument Serif", serif; font-weight:400; font-size:clamp(44px, 9vw, 72px); line-height:1.02; letter-spacing:-0.01em; margin:56px 0 16px; }
h1 em { color:var(--wax); }
h2 { font-family:"Instrument Serif", serif; font-weight:400; font-size:32px; line-height:1.15; margin:56px 0 12px; }
h3 { font-size:16px; font-weight:600; margin:0 0 4px; }
.lede { font-size:18px; color:var(--muted); max-width:34em; margin:0; }
.muted { color:var(--muted); }
.note { font-size:14px; color:var(--faint); }

.steps { list-style:none; padding:0; margin:24px 0 0; border-top:1px solid var(--hairline); }
.steps li { display:grid; grid-template-columns:48px 1fr; gap:12px; padding:20px 0; border-bottom:1px solid var(--hairline); }
.steps .n { font-family:"Instrument Serif", serif; font-size:32px; line-height:1; color:var(--wax); }
.steps p { margin:0; color:var(--muted); }

.metrics { display:grid; grid-template-columns:repeat(2, 1fr); gap:1px; background:var(--hairline); border:1px solid var(--hairline); border-radius:10px; overflow:hidden; margin-top:20px; }
.metrics div { background:var(--surface); padding:16px; }
.metrics svg { width:22px; height:22px; color:var(--wax); display:block; margin-bottom:12px; }
.metrics strong { display:block; font-weight:600; }
.metrics span { font-size:14px; color:var(--muted); }

.prose h2 { font-family:inherit; font-weight:600; font-size:18px; margin:32px 0 6px; }
.prose ul { padding-left:20px; }
.prose li { margin:4px 0; }
.page-title { font-size:48px; }
footer { margin-top:64px; padding-top:16px; border-top:1px solid var(--hairline); font-size:14px; color:var(--faint); }
footer a { color:var(--muted); }
footer p { margin:8px 0 0; }
.langs { display:flex; flex-wrap:wrap; gap:4px 16px; }
.langs a { text-decoration:none; }
.langs a[aria-current="page"] { color:var(--text); font-weight:600; }
@media (max-width:480px) { .metrics { grid-template-columns:1fr; } h1 { margin-top:40px; } }

/* ---------- Home page: scroll-driven seal, story phone, reveals ---------- */
.page-index main { max-width:1080px; }
.page-index main > section { max-width:720px; }
.big { font-size:18px; }

.hero { height:260vh; position:relative; }
.hero-stage { position:sticky; top:0; height:100svh; max-width:1080px; margin:0 auto; padding:0 16px;
  display:grid; grid-template-columns:1.05fr 1fr; align-items:center; gap:32px; }
.hero h1 { margin-top:0; }
.hint { margin-top:28px; font-size:15px; color:var(--faint); opacity:calc(1 - var(--p, 0) * 5); }
.hero-figure { margin:0; display:flex; flex-direction:column; align-items:center; position:relative; }
.hero-seal { width:min(40vw, 50vh, 400px); height:auto; overflow:visible; }
.hero-seal .wax { fill:var(--seal); }
.hero-seal .wax path { fill:var(--seal); }
.hero-seal .lip { fill:none; stroke:var(--seal-shade); stroke-opacity:.22; stroke-width:3; }
.hero-seal .mark-ring { fill:none; stroke:var(--seal-shade); stroke-width:4; }
.hero-seal .mark { fill:var(--seal-shade); }
.seal-half { transition:transform .9s cubic-bezier(.5,0,.75,0), opacity .9s ease-in; transform-box:fill-box; transform-origin:50% 50%; }
.hero.is-open .seal-left { transform:translate(-18%, 30%) rotate(-22deg); opacity:0; }
.hero.is-open .seal-right { transform:translate(18%, 34%) rotate(26deg); opacity:0; }
.hero-meter { margin:8px 0 0; font-family:"Instrument Serif", serif; font-size:34px; font-variant-numeric:tabular-nums; color:var(--text); transition:opacity .4s; }
.hero-meter .of { color:var(--faint); font-size:18px; font-family:inherit; }
.hero-meter { font-family:"Instrument Serif", serif; }
:lang(ko) .hero-meter .of, :lang(ja) .hero-meter .of, :lang(zh-Hans) .hero-meter .of, :lang(zh-Hant) .hero-meter .of { font-family:"Pretendard", -apple-system, sans-serif; }
.hero.is-open .hero-meter { opacity:0; }
.hero-letter { position:absolute; left:0; right:0; top:38%; margin:0; text-align:center; font-family:"Instrument Serif", serif;
  font-style:italic; font-size:clamp(26px, 3.4vw, 40px); line-height:1.25; color:var(--text);
  opacity:0; transform:translateY(16px); transition:opacity .8s .5s ease-out, transform .8s .5s ease-out;
  word-break:keep-all; line-break:strict; text-wrap:balance; }
.hero.is-open .hero-letter { opacity:1; transform:none; }

.wrap { max-width:1080px; margin:0 auto; padding:0 16px; }
.story { padding:40px 0 24px; }
.story-grid { display:grid; grid-template-columns:1fr 340px; gap:64px; }
.story-step { min-height:72vh; display:flex; flex-direction:column; justify-content:center; opacity:.28; transition:opacity .5s; }
.story-step.is-active { opacity:1; }
.story-step .n { font-family:"Instrument Serif", serif; font-size:56px; line-height:1; color:var(--wax); }
.story-step h3 { font-size:24px; margin:12px 0 8px; }
.story-step p { margin:0; color:var(--muted); font-size:18px; max-width:28em; }
.phone-col { position:sticky; top:calc(50vh - 340px); align-self:start; display:flex; flex-direction:column; align-items:center; gap:14px; padding:40px 0; }
.phone { position:relative; width:300px; aspect-ratio:1320/2868; border-radius:46px; border:10px solid #1c1b18;
  background:var(--canvas); overflow:hidden; box-shadow:0 1px 0 var(--hairline); }
.phone .screen { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .6s; }
.phone .screen.is-active { opacity:1; }
.sound-toggle { font:inherit; font-size:14px; color:var(--muted); background:none; border:1px solid var(--hairline); border-radius:8px; padding:6px 14px; cursor:pointer; }
.sound-toggle[aria-pressed="true"] { color:var(--text); border-color:var(--muted); }

.metrics .figure { margin:6px 0 4px; font-family:"Instrument Serif", serif; font-size:30px; line-height:1.1; color:var(--text); font-variant-numeric:tabular-nums; }
.price { display:flex; gap:24px; align-items:center; }
.price .seal-static { width:120px; flex:none; overflow:visible; }
.seal-static .wax, .seal-static .wax path { fill:var(--seal); }
.seal-static .lip { fill:none; stroke:var(--seal-shade); stroke-opacity:.22; stroke-width:2; }
.seal-static .mark-ring { fill:none; stroke:var(--seal-shade); stroke-width:3; }
.seal-static .mark { fill:var(--seal-shade); }

.reveal { opacity:0; transform:translateY(24px); transition:opacity .8s ease-out, transform .8s ease-out; }
.reveal.is-in { opacity:1; transform:none; }

@media (max-width:820px) {
  .hero { height:230vh; }
  .hero-stage { grid-template-columns:1fr; grid-template-rows:auto auto; align-content:center; gap:8px; }
  .hero-figure { order:-1; }
  .hero-seal { width:min(58vw, 34svh, 260px); }
  .hero h1 { font-size:clamp(40px, 11vw, 56px); }
  .hero .lede { font-size:16px; }
  .hero-letter { top:22%; }
  .story-grid { grid-template-columns:1fr; gap:0; }
  .phone-col { order:-1; top:8px; padding:8px 0; z-index:1; background:linear-gradient(var(--canvas) 85%, transparent); }
  .phone { width:170px; border-width:6px; border-radius:28px; }
  .story-step { min-height:60vh; }
  .price { flex-direction:column; align-items:flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height:auto; }
  .hero-stage { position:static; height:auto; padding-top:40px; padding-bottom:40px; }
  .reveal { opacity:1; transform:none; transition:none; }
  .story-step { opacity:1; }
}
/* The sticky stage sits under the header so the first screen shows the whole seal. */
.page-index .hero { margin-top:-72px; }
.page-index .hero-stage { padding-top:72px; box-sizing:border-box; }
.page-index .top { position:relative; z-index:2; }
