:root { color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--loka-cream); color: var(--loka-ink); font-family: var(--loka-font-serif); font-size: var(--loka-text-lg); line-height: 1.45; }
a { color: inherit; text-underline-offset: 4px; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--loka-terracotta-deep); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
[hidden] { display: none !important; }
.wrap { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 24px; top: -100px; z-index: 10; padding: 12px 20px; background: var(--loka-cream); }
.skip-link:focus { top: 12px; }
.site-header { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; line-height: 0; }
.brand svg { display: block; }
nav { display: flex; align-items: center; gap: 36px; }
.nav-about { font-family: var(--loka-font-mono); font-size: var(--loka-text-note); text-decoration: none; }
.nav-about:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 16px 24px; background: var(--loka-cream-2); border: var(--loka-border-2); box-shadow: 3px 3px 0 var(--loka-rule-dark); font-family: var(--loka-font-pixel); font-size: var(--loka-text-pixel-md); line-height: 1.7; text-transform: uppercase; text-align: center; text-decoration: none; }
.button:hover { background: var(--loka-cream-3); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--loka-rule-dark); }
.button-small { min-height: 44px; padding: 10px 16px; font-size: var(--loka-text-pixel-sm); }
.button-primary { background: var(--loka-gold); min-height: 60px; padding-inline: 28px; }
.button-primary:hover { background: var(--loka-gold-soft); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding-top: 24px; padding-bottom: 72px; }
.hero-copy { padding-bottom: 16px; }
.invitation { display: flex; align-items: center; gap: 10px; font-family: var(--loka-font-mono); font-size: var(--loka-text-note); color: var(--loka-ink-soft); margin-bottom: 28px; }
.invitation-square { width: 8px; height: 8px; background: var(--loka-terracotta); }
h1 { font-size: clamp(48px, 5.2vw, 70px); line-height: .98; letter-spacing: -.025em; }
.hero-description { font-size: var(--loka-text-xl); line-height: 1.25; margin-top: 28px; }
.hero-explanation { max-width: 390px; font-size: var(--loka-text-lg); color: var(--loka-ink-soft); margin: 20px 0 28px; }
.cta-note { margin-top: 18px; font-size: var(--loka-text-xs); font-family: var(--loka-font-mono); line-height: 1.7; }
.neighborhood { min-width: 0; }
.scene { position: relative; height: 560px; overflow: hidden; border: var(--loka-border-3); background: var(--loka-indigo-deep); box-shadow: 6px 6px 0 var(--loka-rule-dark); }
.scene > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 72%; image-rendering: pixelated; }
.scene-caption { position: absolute; top: 16px; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); padding: 9px 12px; background: var(--loka-indigo-deep); color: var(--loka-cream); font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); }
.scene-dialogue { position: absolute; left: 24px; right: 24px; bottom: 148px; background: var(--loka-cream); border: var(--loka-border-2); box-shadow: var(--loka-card-shadow-md); padding: 16px 20px 12px; }
.scene-dialogue::after { content: ''; position: absolute; left: 47%; bottom: -10px; width: 16px; height: 16px; background: var(--loka-cream); border-right: var(--loka-border-2); border-bottom: var(--loka-border-2); transform: rotate(45deg); }
.character-name { display: block; font-family: var(--loka-font-pixel); font-size: var(--loka-text-pixel-sm); line-height: 1.6; margin-bottom: 8px; }
.scene-dialogue p { font-size: var(--loka-text-xl); line-height: 1.15; }
.character-sprite { position: absolute; bottom: 24px; left: calc(50% - 33px); width: 66px; height: 108px; image-rendering: pixelated; }
.character-sprite svg { shape-rendering: crispEdges; }
.scene-lo { position: absolute; bottom: 22px; right: 18px; }
.place-picker { display: flex; margin-top: 22px; gap: 8px; }
.place-picker button { flex: 1; min-height: 46px; border: var(--loka-border-2); background: transparent; font-family: var(--loka-font-mono); font-size: var(--loka-text-note); cursor: pointer; }
.place-picker button[aria-pressed="true"] { background: var(--loka-indigo); color: var(--loka-cream); }
.place-picker button:hover:not([aria-pressed="true"]) { background: var(--loka-cream-2); }
.place-hint { text-align: center; margin-top: 12px; color: var(--loka-ink-soft); font-style: italic; }
.trial-section { background: var(--loka-indigo); color: var(--loka-cream); padding: 40px 0; }
h2 { font-size: clamp(36px, 4vw, 48px); line-height: 1.08; letter-spacing: -.012em; }
.trial-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.trial-summary > p { max-width: 400px; color: var(--loka-cream-2); font-size: var(--loka-text-xl); line-height: 1.35; }
.join-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding-block: 64px; align-items: start; }
.join-copy { position: sticky; top: 36px; padding-top: 28px; }
.paper-label { display: block; font-family: var(--loka-font-mono); font-size: var(--loka-text-note); margin-bottom: 24px; color: var(--loka-ink-soft); }
.join-copy > p { font-size: var(--loka-text-xl); line-height: 1.3; margin-top: 24px; }
.next-step { margin-top: 36px; border-top: 1px solid var(--loka-rule); padding-top: 24px; max-width: 360px; }
.next-step h3 { font-size: var(--loka-text-xl); }
.next-step p { margin-top: 16px; color: var(--loka-ink-soft); }
.next-step strong { font-weight: 400; color: var(--loka-ink); }
.join-copy .signup-note { font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); line-height: 1.8; margin-top: 36px; }
.form-paper { background: var(--loka-cream-2); border: var(--loka-border-2); box-shadow: var(--loka-card-shadow-xl); padding: 28px 24px 20px; min-width: 0; }
.form-heading { padding: 0 8px 20px; border-bottom: 1px solid var(--loka-rule); margin-bottom: 12px; }
.form-heading h3 { font-size: var(--loka-text-2xl); }
.form-heading span { font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); color: var(--loka-ink-soft); }
iframe { display: block; width: 100%; border: 0; }
.form-fallback { font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); line-height: 1.8; padding: 8px 8px 16px; }
.form-status { font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); line-height: 1.8; padding: 0 8px 12px; color: var(--loka-ink-soft); }
.site-footer { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--loka-rule); padding-block: 28px; font-family: var(--loka-font-mono); font-size: var(--loka-text-xs); line-height: 1.8; }
@media (min-width: 1500px) { .hero { gap: 80px; } }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }
  .hero { gap: 36px; }
  h1 { font-size: 56px; }
  .scene { height: 540px; }
  .scene-dialogue { left: 16px; right: 16px; padding: 14px; }
  .scene-dialogue p { font-size: 25px; }
  .trial-summary, .join-section { gap: 36px; }
  .form-paper { padding-inline: 12px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 88px; gap: 12px; }
  .brand svg { width: 96px; height: auto; }
  .nav-about { display: none; }
  nav { gap: 0; }
  .button-small { padding-inline: 12px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; padding-bottom: 48px; }
  .hero-copy { padding: 0; }
  .invitation { margin-bottom: 22px; font-size: var(--loka-text-xs); }
  h1 { font-size: clamp(46px, 11vw, 66px); }
  .hero-description { margin-top: 24px; }
  .hero-explanation { max-width: 100%; }
  .hero .button-primary { width: 100%; }
  .cta-note { text-align: center; font-size: 10px; }
  .scene { height: 460px; }
  .scene > img { object-position: center 76%; }
  .scene-dialogue p { font-size: var(--loka-text-xl); }
  .trial-section { padding-block: 32px; }
  .trial-summary, .join-section { grid-template-columns: 1fr; }
  .trial-summary { gap: 20px; }
  .trial-summary > p { font-size: var(--loka-text-lg); }
  .join-section { padding-block: 56px; gap: 32px; }
  .join-copy { position: static; padding: 0; }
  .join-copy > p { font-size: var(--loka-text-lg); }
  .next-step { max-width: none; margin-top: 24px; padding-top: 20px; }
  .join-copy .signup-note { margin-top: 24px; }
  .form-paper { padding: 20px 8px 16px; }
  .form-heading { padding-inline: 12px; }
  .form-heading h3 { font-size: 32px; }
  .form-fallback { padding-inline: 12px; }
  .site-footer { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.language-waitlist { margin-top: 24px; font-family: var(--loka-font-mono); font-size: 14px; line-height: 1.8; }
.language-waitlist summary { cursor: pointer; padding-block: 14px; min-height: 48px; }
.language-waitlist summary span { text-decoration: underline; text-underline-offset: 4px; }
.waitlist-paper { margin-top: 16px; padding: 16px 8px; background: var(--loka-cream-2); border: var(--loka-border-2); }
.hero:has(.language-waitlist[open]) { align-items: start; }

.invitation { color: var(--loka-terracotta-deep); font-weight: 500; }
.character-name[lang="ko"] { font-family: var(--loka-font-l2-ko); font-size: 16px; }
#scene-line { font-family: var(--loka-font-l2-ko); font-size: 23px; line-height: 1.5; word-break: keep-all; }
#scene-translation { margin-top: 10px; font-family: var(--loka-font-mono); font-size: 12px; line-height: 1.6; color: var(--loka-ink-soft); }

/* Canonical world rhythms: 2px idle bob, 13s crossing, stepped footfall. */
.character-sprite { animation: scene-idle 2.8s ease-in-out infinite; z-index: 2; }
@keyframes scene-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.scene-walker { position: absolute; left: -48px; bottom: 8%; width: 44px; height: 72px; animation: scene-crossing 13s linear infinite; pointer-events: none; filter: brightness(.78); }
.scene-walker svg { animation: scene-footfall .44s steps(2) infinite; }
@keyframes scene-crossing { from { left: -48px; } to { left: 108%; } }
@keyframes scene-footfall { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
.scene-dialogue { z-index: 3; }
.scene-lo { z-index: 4; }
.preview-controls { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; }
.preview-controls .place-hint { margin: 0; }
#motion-toggle { min-height: 44px; border: 0; padding: 8px 0 8px 8px; background: transparent; font-family: var(--loka-font-mono); font-size: var(--loka-text-note); text-decoration: underline; cursor: pointer; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .scene *, .scene *::before, .scene *::after { animation: none !important; }
  .scene-walker { display: none; }
}
