:root {
  --bg: #0e0e0d;
  --ink: #f3f2ec;
  --muted: #8f8e86;
  --voice: rgba(243, 242, 236, .62);
  --line: #2a2a27;
  --window: #1a1a18;
  --bar: #20201e;
  --field: #121211;
  --accent: #f2dca6;
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; }
body { font-family: var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
kbd { font-family: inherit; }

/* Header */
.top { position: fixed; inset: 0 0 auto; z-index: 20; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); background: linear-gradient(var(--bg) 40%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 26px; height: 26px; filter: invert(1); }
.top nav { display: flex; align-items: center; gap: 18px; }

/* Languages: a menu that is always there, and an offer when the visitor's own language differs */
html[lang="ko"] { word-break: keep-all; }
html[lang="ja"] { --font: 'Pretendard JP Variable', 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; line-break: strict; }
html[lang="vi"] { --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
html[lang="ja"] .headline { letter-spacing: -.02em; }
/* Headings wrap at phrase boundaries (Japanese) and into even lines, never leaving one word behind. */
.heading h2, .l2, .sub { text-wrap: balance; }
html[lang="ja"] .heading h2, html[lang="ja"] .sub { word-break: auto-phrase; }
html[lang="ja"] .heading h2, html[lang="vi"] .heading h2 { letter-spacing: -.015em; }
html[lang="vi"] .headline { letter-spacing: -.03em; font-size: clamp(34px, 7.2vw, 106px); }
.top nav { gap: 10px; }
.langs { position: relative; }
.langs summary { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; list-style: none; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { color: var(--ink); background: #1d1d1b; }
.langs summary:focus-visible, .suggest:focus-visible, .suggest-close:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.langs summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.langs .code { display: none; }
.langs ul { position: absolute; right: 0; top: 44px; min-width: 168px; margin: 0; padding: 6px; list-style: none; background: #1b1b19; border: 1px solid #30302c; border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); }
.langs a { display: block; padding: 9px 12px; border-radius: 8px; color: #d6d5ce; font-size: 14px; text-decoration: none; }
.langs a:hover { background: #262624; color: var(--ink); }
.langs a[aria-current] { color: var(--ink); font-weight: 680; }
.suggestion { display: none; align-items: center; gap: 2px; }
html[data-suggest] .suggestion { display: inline-flex; }
.suggest { display: none; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(242, 220, 166, .32); background: rgba(242, 220, 166, .1); color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.suggest:hover { background: rgba(242, 220, 166, .18); }
html[data-suggest="ko"] .suggest[data-for="ko"], html[data-suggest="en"] .suggest[data-for="en"],
html[data-suggest="ja"] .suggest[data-for="ja"], html[data-suggest="vi"] .suggest[data-for="vi"] { display: inline-flex; }
.suggest-close { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.suggest-close:hover { color: var(--ink); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-langs a[aria-current] { color: var(--ink); }

/* Call to action */
.cta { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #121211; font-weight: 680; font-size: 16px; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.cta:hover { transform: translateY(-1px); background: #fff; }
.cta-small { height: 36px; padding: 0 15px; font-size: 14px; }
.cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cta:disabled { opacity: .6; cursor: progress; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Beta signup: email + one button; the note line doubles as the status. */
.beta { display: grid; gap: 10px; width: min(100%, 520px); }
.beta-row { display: flex; gap: 8px; }
.beta input { flex: 1; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid #3c3b37; background: #181816; color: var(--ink); font: inherit; font-size: 16px; }
.beta input::placeholder { color: #75746d; }
.beta input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242, 220, 166, .15); }
.beta .cta { flex: none; border: 0; cursor: pointer; font-family: inherit; }
.beta-check:empty { display: none; }
.beta-note { margin: 0 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.beta[data-state="invalid"] .beta-note, .beta[data-state="failed"] .beta-note { color: #f1a88f; }
.beta[data-state="done"] .beta-note { color: var(--accent); }
.beta-note a { color: inherit; }
.closing .beta { justify-items: center; text-align: center; }
.closing .beta-note { margin-left: 0; }

/* Keys */
.keys { display: inline-flex; align-items: center; }
.key { display: inline-grid; width: 46px; height: 46px; padding: 6px 7px; border-radius: 9px; background-color: #262624; border: 1px solid #3a3a36; box-shadow: 0 3px 0 #090908, inset 0 1px 0 rgba(255, 255, 255, .06); color: #cfcfc6; font-size: 12px; font-weight: 550; line-height: 1; }
.key-fn span { justify-self: end; }
.key-fn svg { justify-self: start; align-self: end; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.key-wide { width: auto; min-width: 64px; align-items: end; }
.plus { margin: 0 7px; color: var(--muted); font-size: 13px; }

/* Howl popup: the same compact glass capsule as the app */
.hud { position: absolute; left: 0; top: 0; z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(66, 66, 61, .5); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14); color: #f5f4ef; font: 650 11.5px/1 var(--font); letter-spacing: 0; white-space: nowrap; overflow: hidden; opacity: 0; pointer-events: none; }
.bars { display: flex; align-items: center; gap: 3px; height: 16px; }
.bars i { display: block; width: 3px; height: 16px; border-radius: 2px; background: rgba(255, 255, 255, .92); transform: scaleY(.15); }
.spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .22); border-top-color: #fff; animation: spin .8s linear infinite; }
.hud.is-working .bars { display: none; }
.hud.is-working .spin { display: block; }
.badge { color: rgba(255, 255, 255, .88); }

.caret { display: inline-block; width: 2px; height: 1.1em; margin: 0 1px; vertical-align: -.18em; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
.w { display: inline-block; }
.frag { display: inline-block; }

/* Hero */
.hero { min-height: 100svh; display: grid; align-content: center; max-width: 1240px; margin: 0 auto; padding: 110px var(--gutter) 72px; }
.headline { margin: 0; font-size: clamp(42px, 7.2vw, 106px); line-height: 1.08; font-weight: 760; letter-spacing: -.04em; }
.l1, .l2 { display: block; }
.l1 { color: var(--muted); }
.l2 { position: relative; min-height: 1.08em; }
/* The fn key in the headline is an illustration of the gesture, not a control. */
.l1-end { white-space: nowrap; }
.l1 .keys { vertical-align: .1em; margin-left: .22em; pointer-events: none; }
.l1 .key { font-size: .17em; width: 3.6em; height: 3.6em; padding: .45em .55em; border-radius: .6em; line-height: 1; letter-spacing: 0; font-weight: 600; }
.l1 .key-fn svg { width: 1.05em; height: 1.05em; }
.l2 .caret { width: .05em; height: .86em; vertical-align: -.06em; margin-left: .03em; }
.l2 .hero-speech { position: absolute; padding: 0; max-width: none; left: 0; top: 0; display: flex; flex-wrap: wrap; gap: .15em .5em; font-size: clamp(20px, 2.3vw, 32px); line-height: 1.35; font-weight: 450; letter-spacing: -.01em; color: var(--voice); opacity: 0; }
.js .hero-speech { opacity: 1; }
/* In the hero the popup is shown at the app's own 44 pt size. */
.l2 .hud { height: 44px; gap: 10px; padding: 0 16px; }
.l2 .bars { height: 22px; gap: 4px; }
.l2 .bars i { width: 4px; height: 22px; }
.l2 .spin { width: 18px; height: 18px; }
.hero-foot { display: flex; align-items: flex-start; gap: 22px; margin-top: clamp(32px, 6vh, 60px); }

/* Features: one fixed stage, three scenes */
.track { position: relative; }
.js .track { height: 380svh; }
.sticky { max-width: 1240px; margin: 0 auto; padding: 88px var(--gutter) 40px; display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.3fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.js .sticky { position: sticky; top: 0; height: 100svh; }
.headings { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.heading h2 { margin: 0; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.25; letter-spacing: -.028em; font-weight: 720; }
.heading .sub { margin: 12px 0 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }
.js .heading { opacity: .24; transition: opacity .5s ease; }
.js .heading.is-active { opacity: 1; }

.stage { position: relative; perspective: 1400px; }
.js .stage { display: grid; }
.js .scene { grid-area: 1 / 1; visibility: hidden; }
.scene { position: relative; padding-top: 30px; transform-style: preserve-3d; }
.window { background: var(--window); border: 1px solid #2f2f2c; border-radius: 14px; overflow: hidden; box-shadow: 0 44px 90px -34px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .35); }
.titlebar { position: relative; height: 36px; display: flex; align-items: center; padding: 0 14px; background: var(--bar); border-bottom: 1px solid #2a2a27; }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a36; }
.app { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: #9a998f; pointer-events: none; }
.content { padding: 20px 22px 6px; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.who strong { font-size: 14.5px; }
.subject { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #2e2e2b; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #cfcfc6; }
.incoming { display: inline-block; margin: 0 0 12px 40px; padding: 9px 14px; border-radius: 17px 17px 17px 5px; background: #2b2b28; font-size: 15px; }
.letter p { margin: 0 0 12px 40px; font-size: 14.5px; line-height: 1.55; color: #dcdbd3; }
.letter .sign { color: var(--muted); font-size: 13.5px; }
.quote { margin: 0 0 14px 40px; font-size: 14px; border-top: 1px solid #2d2d2a; }
.qrow { position: relative; display: grid; grid-template-columns: .8fr 1.1fr 1fr 1fr; padding: 9px 10px; border-bottom: 1px solid #2d2d2a; border-radius: 8px; }
.qrow span:last-child { text-align: right; }
.qhead { color: var(--muted); font-size: 12px; border-radius: 0; }
.field { position: relative; margin: 4px 16px 16px; min-height: 76px; padding: 11px 14px; border: 1px solid #34342f; border-radius: 12px; background: var(--field); font-size: 15px; line-height: 1.55; }
.field-chat { border-radius: 19px; }
.placeholder { position: absolute; left: 20px; top: 11px; color: #6c6b65; pointer-events: none; opacity: 0; }
.reply-line { display: block; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.field .text { display: block; }
.field .caret { margin: 0 -1px; }
.line { display: block; }
.fact { border-radius: 4px; }
.scene[data-scene="1"] .fact { color: var(--accent); }
.voice { display: flex; align-items: flex-start; gap: 18px; min-height: 70px; margin: 20px 4px 0; }
.voice .key { width: 36px; height: 36px; padding: 5px 6px; border-radius: 7px; font-size: 10.5px; }
.voice .key-wide { width: auto; min-width: 50px; }
.voice .key-fn svg { width: 11px; height: 11px; }
.speech { display: flex; flex-wrap: wrap; gap: 3px 8px; max-width: 480px; padding-top: 6px; font-size: 15px; line-height: 1.5; color: var(--voice); }
.rings { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.rings i { position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; border: 1.5px solid rgba(242, 220, 166, .6); opacity: 0; }
.wolf { position: absolute; left: -90px; top: -90px; z-index: 6; width: calc(100% + 180px); height: calc(100% + 180px); pointer-events: none; }

/* Closing */
.closing { min-height: 72svh; display: grid; place-items: center; align-content: center; gap: 40px; padding: 80px var(--gutter); }
.mark { display: inline-flex; align-items: center; gap: clamp(14px, 2vw, 26px); text-decoration: none; font-size: clamp(64px, 12vw, 164px); font-weight: 800; letter-spacing: -.055em; }
.mark img { width: .95em; height: .95em; filter: invert(1); }
footer { display: flex; justify-content: space-between; padding: 26px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .beta-row { flex-direction: column; }
  .beta input { flex: none; width: 100%; }
  .beta .cta { justify-content: center; }
  .beta-note { margin-left: 4px; }
  .langs .name { display: none; }
  .langs .code { display: inline; }
  .langs summary { padding: 0 10px; }
  .top nav { gap: 6px; }
  html[data-suggest] .top .cta-small { display: none; }
}
@media (max-width: 380px) {
  html[data-suggest] .brand span { display: none; }
  .suggest { padding: 0 11px; }
  footer { flex-direction: column; gap: 12px; }
}
@media (max-width: 860px) {
  .sticky { grid-template-columns: 1fr; align-content: center; gap: 18px; padding-top: 72px; }
  .js .heading { grid-area: 1 / 1; opacity: 0; }
  .heading h2 { font-size: 23px; }
  .heading .sub { margin-top: 6px; font-size: 14.5px; }
  .scene { padding-top: 24px; }
  .content { padding: 14px 14px 4px; }
  .incoming, .letter p, .quote { margin-left: 0; }
  .letter p, .incoming { font-size: 14px; }
  .quote { font-size: 12.5px; }
  .qrow { padding: 7px 6px; }
  .field { margin: 4px 10px 10px; min-height: 64px; font-size: 14px; }
  .voice { gap: 12px; margin-top: 14px; min-height: 60px; }
  .speech { font-size: 14px; }
  .hero-foot { flex-wrap: wrap; gap: 16px; }
}
@media (max-height: 720px) and (max-width: 860px) {
  .who { margin-bottom: 8px; }
  .letter p { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .caret, .spin { animation: none; }
}
