@font-face { font-family: "Oranienbaum"; src: url("../fonts/Oranienbaum-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url("../fonts/ShipporiMincho-tokyo.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cabin"; src: url("../fonts/Cabin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #fff8f0;
  --ink-soft: rgba(255, 248, 240, 0.82);
  --line: rgba(255, 248, 240, 0.7);
  --warm: #2a1d3a;
  --deep: #4a2a2a;
  --tint: rgba(242, 167, 189, 0.34);
  --gut: clamp(16px, 4.4vw, 64px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --io: cubic-bezier(0.65, 0, 0.35, 1);
  --display: "Oranienbaum", "Bodoni 72", Didot, serif;
  --deco: "Oranienbaum", "Bodoni 72", Didot, serif;
  --kanji: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Cabin", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  --shadow: 0 2px 24px rgba(30, 14, 40, 0.5), 0 1px 3px rgba(30, 14, 40, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--warm); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; touch-action: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 5px; border-radius: 3px; }

#gl, #fx, .still, .scrim { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; z-index: 2; }
.still { display: none; background: center / cover no-repeat; transition: background-image 1s; }
.no-gl .still { display: block; }
.no-gl #gl { display: none; }
.scrim { z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(24, 12, 34, 0.42), rgba(24, 12, 34, 0.08) 42%, transparent 60%), linear-gradient(0deg, rgba(24, 12, 34, 0.3), transparent 22%); opacity: 1; transition: opacity 1.4s; }
.on-intro .scrim { opacity: 0.35; }

/* ---------- loader ---------- */
#loader { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 22px; background: radial-gradient(120% 90% at 30% 110%, #f2a7bd, #9c6fa8 45%, #2a1d3a 100%); transition: opacity 1.2s var(--io), visibility 0s linear 1.2s; }
.loaded #loader { opacity: 0; visibility: hidden; }
.emblem { width: 180px; height: 180px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.emblem .ring, .emblem .castle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--io) forwards; }
.emblem .castle { animation-delay: 0.35s; }
.emblem .spark { fill: var(--ink); stroke: none; transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.emblem .s2 { animation-delay: -0.6s; } .emblem .s3 { animation-delay: -1.2s; } .emblem .s4 { animation-delay: -1.8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { 0%, 100% { transform: scale(0.5) rotate(0deg); opacity: 0.4; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
.loader-pct { font-size: 12px; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.loader-pct::after { content: "%"; }

/* ---------- logo ---------- */
h1.logo { font-weight: 400; font-size: inherit; }
.logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; text-align: center; line-height: 1; text-shadow: var(--shadow); }
.logo .l1 { font-family: var(--sans); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5em; padding-left: 0.5em; }
.logo .l2 { font-family: var(--deco); font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; padding-left: 0.08em; }
.logo .kanji { font-family: var(--kanji); font-weight: 600; letter-spacing: 0.15em; margin-right: 0.6em; text-transform: none; }
.logo .l3 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.28em; }
.logo--big .l1 { font-size: clamp(14px, 1.6vw, 22px); }
.logo--big .l2 { font-size: clamp(76px, 12vw, 176px); line-height: 0.9; margin: 10px 0 16px; }
.logo--big .l3 { font-size: clamp(14px, 1.4vw, 20px); }
.logo--small .l1 { font-size: 10px; }
.logo--small .l2 { font-size: 40px; line-height: 0.95; margin: 4px 0 6px; }
.logo--small .l3 { font-size: 9px; }

/* ---------- notched button ---------- */
.notch { position: relative; display: inline-grid; place-items: center; min-width: 200px; height: 48px; padding: 0 28px; font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: 0.01em; text-shadow: var(--shadow); transition: transform 0.6s var(--out); transform: translate(var(--mx, 0), var(--my, 0)); }
.notch > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.notch .n-line { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.notch .n-in { fill: none; stroke: rgba(255, 248, 240, 0.45); stroke-width: 1; }
.notch .n-fill { fill: rgba(255, 248, 240, 0); transition: fill 0.4s; }
.notch:hover .n-fill { fill: rgba(255, 248, 240, 0.18); }
.notch--fill .n-fill { fill: var(--tint); }
.notch--fill:hover .n-fill { fill: rgba(232, 150, 160, 0.6); }
.notch > span { position: relative; }

/* ---------- intro (enter screen) ---------- */
#intro { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: var(--gut); padding-top: 4vh; transition: opacity 1.2s var(--io), visibility 0s linear 1.2s; }
#intro > * { opacity: 0; transform: translateY(24px); transition: opacity 1.4s var(--out), transform 1.6s var(--out); }
.loaded #intro > * { opacity: 1; transform: none; }
.loaded #intro > :nth-child(2) { transition-delay: 0.25s; }
.loaded #intro > :nth-child(3) { transition-delay: 0.45s; }
.intro-q { font-family: var(--display); font-size: clamp(30px, 3.6vw, 52px); text-transform: uppercase; text-shadow: var(--shadow); margin-top: 6px; }
#intro .notch { margin-top: 6vh; }
.entered #intro { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- chrome ---------- */
.top, .bottom, .realms, .credit { position: fixed; z-index: 20; transition: opacity 1.2s var(--io) 0.6s; }
body:not(.entered) .top, body:not(.entered) .bottom, body:not(.entered) .realms, body:not(.entered) .credit { opacity: 0; pointer-events: none; }

.top { top: 0; left: 0; right: 0; display: flex; justify-content: center; padding: 26px var(--gut) 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.menu-btn { position: absolute; right: var(--gut); top: 30px; display: flex; align-items: center; height: 64px; }
.menu-btn svg { width: 64px; height: 64px; margin-left: -18px; fill: none; stroke: var(--ink); stroke-width: 1.2; transform: rotate(-90deg); }
.menu-btn circle { stroke-dasharray: 1; stroke-dashoffset: 0.12; transition: stroke-dashoffset 0.9s var(--out); }
.menu-btn:hover circle { stroke-dashoffset: 0; }
.menu-label { position: relative; z-index: 1; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: var(--shadow); }

/* ---------- realm text ---------- */
.realms { inset: 0; pointer-events: none; }
.realm { position: absolute; left: var(--gut); top: 50%; transform: translateY(-58%); max-width: min(640px, 80vw); visibility: hidden; }
.realm.in, .realm.out { visibility: visible; }
.realm.in { pointer-events: auto; }
.realm > * { opacity: 0; transform: translateY(36px); filter: blur(6px); transition: opacity 1s var(--out), transform 1.4s var(--out), filter 1s var(--out); }
.realm.in > * { opacity: 1; transform: none; filter: none; }
.realm.in > :nth-child(1) { transition-delay: 0.15s; }
.realm.in > :nth-child(2) { transition-delay: 0.25s; }
.realm.in > :nth-child(3) { transition-delay: 0.4s; }
.realm.in > :nth-child(4) { transition-delay: 0.5s; }
.realm.out > * { opacity: 0; transform: translateY(-30px); filter: blur(6px); transition-duration: 0.7s; }
.eyebrow { font-size: clamp(14px, 1.25vw, 19px); text-transform: uppercase; letter-spacing: 0.03em; text-shadow: var(--shadow); }
.headline { font-family: var(--display); font-weight: 400; font-size: clamp(54px, 6.4vw, 98px); line-height: 0.94; text-transform: uppercase; letter-spacing: 0.005em; margin: 10px 0 12px; text-shadow: var(--shadow); }
.headline span { display: block; }
.sub { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; max-width: 34ch; color: var(--ink-soft); text-shadow: var(--shadow); margin-bottom: 28px; }

/* ---------- bottom bar ---------- */
.bottom { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 0 var(--gut) max(34px, env(safe-area-inset-bottom)); }
.sound { justify-self: start; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: var(--shadow); height: 40px; }
.sound svg { width: 28px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; overflow: visible; }
.foot-right { justify-self: end; }

.timeline { display: grid; justify-items: center; gap: 12px; }
.tl-label { font-family: var(--display); font-size: 22px; text-transform: uppercase; text-shadow: var(--shadow); min-height: 1em; transition: opacity 0.4s; }
.tl-label.swap { opacity: 0; }
.tl-track { position: relative; width: min(380px, 52vw); height: 30px; display: flex; justify-content: space-between; align-items: center; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed var(--line); }
.tl-track button { position: relative; width: 22px; height: 22px; display: grid; place-items: center; }
.tl-track button::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 10px rgba(255, 240, 220, 0.9); transition: transform 0.4s var(--out), opacity 0.4s; }
.tl-track button.on::after { opacity: 0; transform: scale(0.3); }
.tl-track button:hover::after { transform: scale(1.5); }
.tl-star { position: absolute; top: 50%; left: 0; width: 32px; height: 32px; margin: -16px 0 0 -16px; fill: var(--ink); filter: drop-shadow(0 0 8px rgba(255, 236, 210, 0.95)); transition: translate 1.4s var(--io); pointer-events: none; animation: spin 14s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.credit { right: var(--gut); bottom: 8px; font-size: 11px; letter-spacing: 0.05em; text-decoration: none; color: var(--ink-soft); text-shadow: var(--shadow); }
.credit:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- menu ---------- */
.menu { position: fixed; inset: 0; z-index: 25; display: grid; align-content: center; justify-items: center; gap: 48px; padding: 140px var(--gut) 90px; background: rgba(40, 24, 56, 0.4); backdrop-filter: blur(22px) saturate(1.15); -webkit-backdrop-filter: blur(22px) saturate(1.15); opacity: 0; visibility: hidden; transition: opacity 0.8s var(--io), visibility 0s linear 0.8s; }
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 0.8s var(--io); }
.menu-open .bottom, .menu-open .realms, .menu-open .credit { opacity: 0; pointer-events: none; transition-delay: 0s; }
.menu-list { list-style: none; text-align: center; }
.menu-list button { display: inline-flex; align-items: baseline; gap: 18px; padding: 4px 0; opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--out), transform 1s var(--out); text-shadow: var(--shadow); }
.menu-open .menu-list button { opacity: 1; transform: none; }
.menu-list li:nth-child(2) button { transition-delay: 0.05s; }
.menu-list li:nth-child(3) button { transition-delay: 0.1s; }
.menu-list li:nth-child(4) button { transition-delay: 0.15s; }
.menu-list li:nth-child(5) button { transition-delay: 0.2s; }
.menu-list b { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; opacity: 0.75; }
.menu-list span { font-family: var(--display); font-size: clamp(38px, 5.4vw, 76px); line-height: 1.08; text-transform: uppercase; }
.menu-list button:hover span, .menu-list button.on span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 10px; }
.menu-foot { display: flex; align-items: center; gap: 32px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: var(--shadow); opacity: 0; transition: opacity 0.8s 0.25s; }
.menu-open .menu-foot { opacity: 1; }
.menu-foot a { text-decoration: none; }
.menu-foot a:hover { text-decoration: underline; }
.menu-open .menu-label { visibility: hidden; }
.menu-open .menu-label::after { content: "Close"; visibility: visible; position: absolute; left: 0; }

/* ---------- visit panel ---------- */
.visit { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: var(--gut); background: rgba(30, 18, 44, 0.35); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity 0.6s var(--io), visibility 0s linear 0.6s; }
.visit.open { opacity: 1; visibility: visible; transition: opacity 0.6s var(--io); }
.visit-card { position: relative; width: min(500px, 100%); max-height: calc(100dvh - 2 * var(--gut)); overflow: auto; padding: 46px 40px 32px; border: 1px solid rgba(255, 248, 240, 0.5); border-radius: 4px; background: linear-gradient(160deg, rgba(255, 236, 226, 0.26), rgba(255, 236, 226, 0.1)); box-shadow: 0 40px 120px rgba(60, 20, 20, 0.35); transform: translateY(24px); transition: transform 0.8s var(--out); text-shadow: 0 1px 12px rgba(70, 34, 18, 0.4); }
.visit.open .visit-card { transform: none; }
.visit h3 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5vw, 56px); text-transform: uppercase; line-height: 1; margin: 8px 0 24px; }
.close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.tiers { list-style: none; border-top: 1px solid var(--line); }
.tiers li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tiers b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.facts { display: grid; gap: 12px; margin: 24px 0 20px; line-height: 1.5; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.facts dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 3px; opacity: 0.8; }
.concept-note { font-size: 13px; padding: 12px 14px; background: rgba(255, 248, 240, 0.12); }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; z-index: 70; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .top { padding-top: 18px; }
  .logo--small .l1 { font-size: 10px; }
  .logo--small .l2 { font-size: 24px; }
  .logo--small .l3 { font-size: 7px; }
  .menu-btn { top: 16px; height: 52px; display: grid; place-items: center; }
  .menu-btn > * { grid-area: 1 / 1; }
  .menu-btn svg { width: 52px; height: 52px; margin: 0; }
  .menu-label { font-size: 9px; }
  .realm { top: auto; bottom: 150px; transform: none; max-width: none; right: var(--gut); }
  .headline { font-size: clamp(46px, 13vw, 64px); }
  .sub { margin-bottom: 20px; }
  .notch { min-width: 180px; height: 44px; font-size: 15px; }
  .bottom { grid-template-columns: auto 1fr auto; gap: 10px; padding-bottom: max(30px, env(safe-area-inset-bottom)); }
  .sound span { display: none; }
  .tl-label { font-size: 17px; }
  .tl-track { width: 100%; }
  .foot-right .notch { min-width: 0; padding: 0 18px; }
  .credit { left: 0; right: 0; text-align: center; bottom: 6px; }
  .menu-foot { flex-direction: column; gap: 18px; }
  .scrim { background: linear-gradient(0deg, rgba(24, 12, 34, 0.6), rgba(24, 12, 34, 0.14) 55%, transparent 75%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.3s !important; transition-delay: 0s !important; }
}
.freeze *, .freeze *::before, .freeze *::after { transition: none !important; animation: none !important; }
