/* ==========================================================================
   Ryukura △ Solo Camp
   Theme: Shima Rin (Yuru Camp△) — dusk → night → campfire
   ========================================================================== */

:root {
  /* night sky */
  --night-0: #05081a;
  --night-1: #0a1030;
  --night-2: #121a45;
  --glass: rgba(16, 22, 58, .58);
  --glass-2: rgba(24, 31, 76, .72);
  --line: rgba(176, 186, 255, .14);
  --line-2: rgba(176, 186, 255, .24);

  /* ink */
  --ink: #f1f2ff;
  --ink-2: rgba(226, 230, 255, .76);
  --ink-3: rgba(206, 212, 255, .52);

  /* Rin */
  --hair: #5466a6;
  --violet: #b39bff;
  --ember: #ff9a3d;
  --ember-2: #ffc46b;
  --rose: #ff6f91;
  --tri: #f7c948;
  --teal: #3f9aa0;
  --cream: #e7dcc6;
  --wine: #b0414d;
  --navy: #4d6aa6;
  --mint: #6fbfa6;
  --paper: #f1e9d8;
  --paper-ink: #1c2242;

  --scarf: repeating-linear-gradient(90deg, var(--teal) 0 22px, var(--cream) 22px 34px, var(--wine) 34px 46px, var(--navy) 46px 66px, var(--cream) 66px 74px, var(--mint) 74px 90px);
  --dusk: linear-gradient(95deg, #ffd27a 0%, #ff9a52 30%, #ff6f91 62%, #b99bff 100%);

  /* type */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;

  --ease: cubic-bezier(.2, .75, .15, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .5, 1);
  --radius: 28px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--night-0); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-0);
  color: var(--ink);
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--ember); color: #1a0d00; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 8px; }

.mono { font-family: var(--mono); font-weight: 500; }
.jp { font-family: var(--jp); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad { background: var(--dusk); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 300;
  padding: 10px 16px; border-radius: 999px; background: var(--ember); color: #1a0d00; font-weight: 700;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- buttons ---------- */
.btn {
  --h: 54px;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s, border-color .35s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-ember {
  background: linear-gradient(180deg, #ffd07c, #ff9a3d 70%);
  color: #2a1300;
  box-shadow: 0 12px 34px -10px rgba(255, 140, 50, .75), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(150, 60, 0, .25);
}
.btn-ember:hover { box-shadow: 0 18px 44px -10px rgba(255, 140, 50, .9), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(150, 60, 0, .25); }
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .28); color: #fff;
  background: rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: .9rem; }

/* ==========================================================================
   Intro
   ========================================================================== */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  animation: intro-failsafe 0s 6s forwards;
}
.js.no-intro .intro { display: none; }
@keyframes intro-failsafe { to { visibility: hidden; } }

.intro-panel {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background: radial-gradient(120% 90% at 50% 100%, #111a48 0%, var(--night-0) 70%);
  transition: transform 1.05s cubic-bezier(.75, 0, .2, 1);
}
.intro-panel--top { top: 0; background: radial-gradient(120% 90% at 50% 100%, #10183f 0%, var(--night-0) 70%); }
.intro-panel--bottom { bottom: 0; background: radial-gradient(120% 90% at 50% 0%, #10183f 0%, var(--night-0) 70%); }
.intro.is-done .intro-panel--top { transform: translateY(-101%); }
.intro.is-done .intro-panel--bottom { transform: translateY(101%); }
.intro.is-done { pointer-events: none; }

.intro-inner { position: relative; z-index: 1; display: grid; justify-items: center; transition: opacity .45s, transform .7s var(--ease); }
.intro.is-done .intro-inner { opacity: 0; transform: scale(.94); }

.intro-tri { width: 112px; overflow: visible; filter: drop-shadow(0 0 22px rgba(247, 201, 72, .35)); }
.intro-tri-out {
  stroke: var(--tri); stroke-width: 5; stroke-linejoin: round;
  stroke-dasharray: 330; stroke-dashoffset: 330;
  animation: draw 1.1s .1s var(--ease) forwards;
}
.intro-tri-in { fill: var(--tri); opacity: 0; animation: fade-in .5s .85s forwards; }
.intro-flame { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); animation: flame-in .6s 1.1s var(--ease-spring) forwards, flicker .16s 1.7s infinite alternate; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes flame-in { to { transform: scale(1); } }
@keyframes flicker { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(.94, 1.08) skewX(3deg); } }

.intro-word {
  margin-top: 26px; display: flex; gap: .32em;
  font-weight: 800; font-stretch: 75%; font-size: 2.4rem; letter-spacing: .02em; line-height: 1;
}
.intro-word span { opacity: 0; translate: 0 .4em; filter: blur(8px); animation: rise .7s var(--ease) forwards; }
.intro-word span:nth-child(1) { animation-delay: .35s; }
.intro-word span:nth-child(2) { animation-delay: .42s; }
.intro-word span:nth-child(3) { animation-delay: .49s; }
.intro-word span:nth-child(4) { animation-delay: .56s; }
.intro-word span:nth-child(5) { animation-delay: .63s; }
.intro-word span:nth-child(6) { animation-delay: .70s; }
.intro-word span:nth-child(7) { animation-delay: .77s; }
@keyframes rise { to { opacity: 1; translate: 0 0; filter: blur(0); } }

.intro-log { margin-top: 16px; font-size: .78rem; color: var(--ink-3); letter-spacing: .04em; min-height: 1.4em; }
.intro-caret { color: var(--ember); }
.intro-bar { width: 220px; height: 3px; margin-top: 14px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.intro-bar i { display: block; height: 100%; background: var(--scarf); transform-origin: left; transform: scaleX(0); animation: bar 2.1s .15s cubic-bezier(.4, 0, .3, 1) forwards; }
@keyframes bar { to { transform: scaleX(1); } }
.intro-skip { position: absolute; right: 22px; bottom: 20px; z-index: 2; font-size: .72rem; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.intro-skip:hover { color: var(--ink); }

/* ==========================================================================
   Sky layers
   ========================================================================== */
.sky {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(130, 96, 230, .26), transparent 62%),
    radial-gradient(900px 640px at -5% 35%, rgba(63, 154, 160, .13), transparent 60%),
    radial-gradient(1200px 800px at 50% 115%, rgba(255, 140, 60, .10), transparent 60%),
    var(--night-0);
}
.stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.grain::before {
  content: ""; position: absolute; inset: -100px; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-30px, 18px); } 40% { transform: translate(22px, -26px); }
  60% { transform: translate(-14px, -36px); } 80% { transform: translate(34px, 12px); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--scarf); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px rgba(255, 154, 61, .4); }

.scarf-band { height: 6px; background: var(--scarf); }
.scarf-band--thick { height: 10px; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; top: 14px; left: 50%; translate: -50% 0; z-index: 60;
  width: min(1200px, 100% - 24px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 7px 7px 7px 18px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background .45s, border-color .45s, box-shadow .45s, translate .5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(10, 14, 40, .62);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border-color: var(--line);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, .6);
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-weight: 800; font-stretch: 75%; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-tri { width: 26px; height: 24px; color: var(--tri); filter: drop-shadow(0 0 10px rgba(247, 201, 72, .45)); transition: transform .6s var(--ease-spring); }
.brand:hover .brand-tri { transform: rotate(-8deg) scale(1.08); }

.nav-links { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(8, 11, 32, .35); border: 1px solid var(--line); }
.nav-links a { position: relative; padding: 7px 15px; border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--ink-2); transition: color .25s, background .25s; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-links a.is-active { color: #1d1200; background: linear-gradient(180deg, #ffd07c, #ffa94d); }

.nav-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.amb {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(8, 11, 32, .4); color: var(--ink-2);
  transition: color .3s, border-color .3s, background .3s, box-shadow .3s;
}
.amb svg { width: 18px; height: 18px; }
.amb:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.amb-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.amb-bars i { width: 2px; height: 3px; border-radius: 2px; background: currentColor; opacity: .6; transition: height .3s; }
.amb[aria-pressed="true"] { color: #2a1300; background: linear-gradient(180deg, #ffd07c, #ff9a3d); border-color: transparent; box-shadow: 0 0 24px rgba(255, 154, 61, .55); }
.amb[aria-pressed="true"] .amb-bars i { opacity: 1; animation: eq .9s ease-in-out infinite alternate; }
.amb[aria-pressed="true"] .amb-bars i:nth-child(2) { animation-delay: -.3s; }
.amb[aria-pressed="true"] .amb-bars i:nth-child(3) { animation-delay: -.6s; }
.amb[aria-pressed="true"] .amb-bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8f4e; box-shadow: 0 0 0 0 rgba(47, 143, 78, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 143, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 143, 78, 0); } }

.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(8, 11, 32, .4); position: relative; }
.menu-btn i { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn i:nth-of-type(1) { top: 15px; }
.menu-btn i:nth-of-type(2) { top: 23px; }
.menu-btn[aria-expanded="true"] i:nth-of-type(1) { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-of-type(2) { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 96px 24px 40px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(130, 96, 230, .35), transparent 60%), rgba(5, 8, 26, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: grid; gap: 6px; }
.mobile-menu a { display: flex; align-items: baseline; gap: 14px; font-weight: 800; font-stretch: 75%; font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.1; text-transform: uppercase; opacity: 0; translate: 0 16px; animation: rise .6s var(--ease) forwards; }
.mobile-menu a small { font-size: .8rem; color: var(--ember); letter-spacing: .1em; }
.mobile-menu a:nth-child(2) { animation-delay: .05s; } .mobile-menu a:nth-child(3) { animation-delay: .1s; }
.mobile-menu a:nth-child(4) { animation-delay: .15s; } .mobile-menu a:nth-child(5) { animation-delay: .2s; }
.mobile-menu-jp { font-size: 1rem; letter-spacing: .3em; color: var(--ink-3); }
html.menu-open { overflow: hidden; }

/* ==========================================================================
   Scenes (cover-box: an image-sized box that always covers its scene,
   so HUD markers can be pinned to points in the artwork)
   ========================================================================== */
.scene { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.scene-box {
  --ar: 16 / 9; --ax: 50%; --ay: 50%;
  position: absolute; left: var(--ax); top: var(--ay);
  width: max(100cqw, calc(100cqh * (var(--ar))));
  aspect-ratio: var(--ar);
  translate: calc(var(--ax) * -1) calc(var(--ay) * -1);
  will-change: transform;
}
.scene-box > img, .scene-box picture, .scene-box picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- HUD markers ---------- */
.hud {
  --c: #fff;
  position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; z-index: 2;
  color: var(--c); font: 500 10.5px/1.25 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  pointer-events: none;
}
.hud-ret {
  --s: 30px;
  position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s);
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 8px 1.5px, linear-gradient(currentColor, currentColor) 0 0 / 1.5px 8px,
    linear-gradient(currentColor, currentColor) 100% 0 / 8px 1.5px, linear-gradient(currentColor, currentColor) 100% 0 / 1.5px 8px,
    linear-gradient(currentColor, currentColor) 0 100% / 8px 1.5px, linear-gradient(currentColor, currentColor) 0 100% / 1.5px 8px,
    linear-gradient(currentColor, currentColor) 100% 100% / 8px 1.5px, linear-gradient(currentColor, currentColor) 100% 100% / 1.5px 8px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, .6));
}
.hud-ret::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px 2px rgba(255, 154, 61, .8); }
.hud-ret--sm { --s: 20px; }
.hud-tag {
  position: absolute; left: 24px; top: -30px; white-space: nowrap;
  display: grid; gap: 1px; padding: 5px 9px 5px 10px;
  background: rgba(6, 9, 28, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-left: 2px solid var(--ember); border-radius: 0 6px 6px 0;
}
.hud-tag::before { content: ""; position: absolute; left: -14px; bottom: -6px; width: 14px; height: 1px; background: currentColor; transform-origin: right; transform: rotate(-38deg); opacity: .8; }
.hud-tag b { font-weight: 700; color: #fff; }
.hud-tag small { font-size: 9.5px; color: rgba(255, 255, 255, .7); }
.hud-tag--left { left: auto; right: 24px; border-left: 0; border-right: 2px solid var(--ember); border-radius: 6px 0 0 6px; text-align: right; }
.hud-tag--left::before { left: auto; right: -14px; transform-origin: left; transform: rotate(38deg); }
.hud-tag--up { left: 50%; top: auto; bottom: 26px; translate: -50% 0; border-left: 0; border-bottom: 2px solid var(--ember); border-radius: 6px 6px 0 0; text-align: center; }
.hud-tag--up::before { display: none; }

/* HUD reveal */
.js .hud .hud-ret { opacity: 0; transform: scale(2.2) rotate(45deg); transition: opacity .5s var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .hud .hud-tag { opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity .3s calc(var(--d, 0s) + .45s), clip-path .7s var(--ease) calc(var(--d, 0s) + .45s); }
.js .hud .hud-tag--left { clip-path: inset(0 0 0 100%); }
.js .hud .hud-tag--up { clip-path: inset(100% 0 0 0); }
.js .hud-on .hud .hud-ret { opacity: 1; transform: none; }
.js .hud-on .hud .hud-tag { opacity: 1; clip-path: inset(0 0 0 0); }
.hud-on .hud .hud-ret { animation: ret-breathe 3.2s ease-in-out infinite; animation-delay: calc(var(--d, 0s) + 1.2s); }
@keyframes ret-breathe { 50% { transform: scale(1.12); } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate; background: #7d6b98; }
.hero-scene .scene-box { --ar: 4 / 3; --ax: 26%; --ay: 0%; transform: scale(1.06); transform-origin: 30% 20%; }
.hero-scene img { filter: saturate(1.06); }

.breath {
  position: absolute; left: 49%; top: 21%; width: 9%; aspect-ratio: 1.6; z-index: 1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  filter: blur(6px); opacity: 0; pointer-events: none;
  animation: breath 5.2s ease-out infinite;
}
.breath--2 { animation-delay: 2.6s; top: 20%; }
@keyframes breath {
  0% { opacity: 0; transform: translate(-30%, 10%) scale(.4); }
  18% { opacity: .75; }
  100% { opacity: 0; transform: translate(70%, -60%) scale(1.6); }
}
.headlight {
  display: none; position: absolute; left: 50%; top: 52.5%; width: 34%; aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(255, 246, 214, .7), rgba(255, 210, 140, .18) 45%, transparent 75%);
  mix-blend-mode: screen; pointer-events: none; animation: headlight 3.4s ease-in-out infinite;
}
@keyframes headlight { 50% { opacity: .55; transform: scale(.9); } }
.hud--ride { display: none; }

.hero-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(270deg, rgba(10, 10, 36, .82) 0%, rgba(10, 10, 36, .52) 30%, rgba(10, 10, 36, 0) 56%),
    linear-gradient(0deg, var(--night-0) 0%, rgba(5, 8, 26, .55) 14%, rgba(5, 8, 26, 0) 34%),
    linear-gradient(180deg, rgba(5, 8, 26, .55) 0%, rgba(5, 8, 26, 0) 16%);
}
.nightfall { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(180deg, #0b1134, var(--night-0) 80%); }

.hero-content {
  position: absolute; z-index: 3;
  right: clamp(24px, 5.5vw, 110px); top: 52%; translate: 0 -50%;
  width: min(620px, 44vw);
}
.chip {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 8px;
  padding: 7px 14px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  background: rgba(8, 11, 32, .45); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: blink 2.4s infinite; }
.chip time { color: #fff; font-weight: 700; }
.chip-sep { opacity: .4; }
@keyframes blink { 50% { opacity: .35; } }

.hero-title {
  margin: 18px 0 10px -.04em;
  font-weight: 800; font-stretch: 75%;
  font-size: clamp(4.4rem, 11.2vw, 12.5rem); line-height: .8; letter-spacing: -.012em;
  text-transform: uppercase;
}
.hero-title-row { display: flex; }
.hero-title-row span {
  display: inline-block;
  background: linear-gradient(180deg, #fff 30%, #d9d6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(120, 90, 230, .45));
}
.hero-tag { font-weight: 800; font-stretch: 80%; font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.005em; }
.hero-sub { margin-top: 18px; max-width: 34em; color: var(--ink-2); font-size: clamp(1rem, 1.15vw, 1.13rem); }
.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-vert {
  position: absolute; z-index: 3; right: 20px; top: 50%; translate: 0 -50%;
  writing-mode: vertical-rl; font-size: .82rem; font-weight: 700; letter-spacing: .35em; color: rgba(255, 255, 255, .55);
}
.hero-vert span { margin: .6em 0; color: var(--ember); }
.hero-foot {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i { position: relative; width: 56px; height: 1px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--ember); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* hero entrance (after intro) */
.js .hero-title-row span { opacity: 0; translate: 0 .35em; filter: blur(14px); }
.js [data-hero-rise] { opacity: 0; translate: 0 24px; }
.js.is-ready .hero-title-row span { animation: hero-letter 1.1s var(--ease) forwards; animation-delay: calc(.08s + var(--i) * .065s); }
.js.is-ready [data-hero-rise] { animation: hero-rise 1s var(--ease) forwards; animation-delay: calc(.35s + var(--i) * .1s); }
@keyframes hero-letter { to { opacity: 1; translate: 0 0; filter: drop-shadow(0 6px 30px rgba(120, 90, 230, .45)); } }
@keyframes hero-rise { to { opacity: 1; translate: 0 0; } }

/* ==========================================================================
   Sections — shared
   ========================================================================== */
.section { position: relative; padding: clamp(100px, 13vw, 180px) 0; }
.sec-head { display: grid; justify-items: center; text-align: center; gap: 18px; margin-bottom: clamp(48px, 6vw, 80px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-2); }
.eyebrow-scarf { width: 34px; height: 7px; border-radius: 2px; background: var(--scarf); background-size: 90px 100%; }
.h2 {
  font-weight: 800; font-stretch: 75%;
  font-size: clamp(2.7rem, 6.6vw, 5.8rem); line-height: .92; letter-spacing: -.008em;
  text-wrap: balance;
}
.sec-sub { max-width: 36em; color: var(--ink-2); font-size: 1.1rem; text-wrap: pretty; }

/* spotlight shared by cards */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 170, 90, .14), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.spot:hover::before { opacity: 1; }

/* ==========================================================================
   01 Basecamp
   ========================================================================== */
.basecamp-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(48px, 7vw, 100px); align-items: center; }
.collage { position: relative; padding: 0 0 130px; }
.photo {
  position: relative; border-radius: var(--radius); overflow: hidden; rotate: -2.5deg;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 8px rgba(255, 255, 255, .03);
}
.photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 60% 30%; transition: transform 1.2s var(--ease); }
.photo:hover img { transform: scale(1.04); }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px;
  font-size: .72rem; letter-spacing: .08em; color: #fff;
  background: linear-gradient(0deg, rgba(5, 8, 26, .85), transparent);
}

.permit {
  position: absolute; right: -18px; bottom: 0; width: min(380px, 78%);
  rotate: 3deg; color: var(--paper-ink);
  background:
    repeating-linear-gradient(0deg, rgba(28, 34, 66, .045) 0 1px, transparent 1px 26px),
    linear-gradient(160deg, #f6efe1, var(--paper));
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75);
  -webkit-mask: radial-gradient(circle 11px at left 66%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at right 66%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at left 66%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at right 66%, #0000 97%, #000) right / 51% 100% no-repeat;
  transition: rotate .6s var(--ease-spring), translate .6s var(--ease);
}
.permit:hover { rotate: 0deg; }
.permit-head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px 0; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; opacity: .72; }
.permit-body { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 12px 18px 14px; }
.permit-face {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden; align-self: start;
  background: #c9d3ea; border: 3px solid var(--paper-ink); box-shadow: 4px 4px 0 var(--teal);
}
.permit-face img { width: 100%; height: 100%; image-rendering: pixelated; }
.permit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.permit-fields .wide { grid-column: 1 / -1; }
.permit-fields dt { font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.permit-fields dd { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.permit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 16px; border-top: 2px dashed rgba(28, 34, 66, .25); }
.barcode {
  flex: 1; height: 34px; opacity: .85;
  background: repeating-linear-gradient(90deg, var(--paper-ink) 0 2px, transparent 2px 4px, var(--paper-ink) 4px 5px, transparent 5px 8px, var(--paper-ink) 8px 11px, transparent 11px 12px, var(--paper-ink) 12px 13px, transparent 13px 16px);
}
.stamp {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  border: 2.5px solid var(--wine); color: var(--wine); rotate: -14deg;
  font-weight: 900; font-size: .68rem; line-height: 1.15; text-align: center; letter-spacing: .05em;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4.5px var(--wine);
  opacity: .82;
}

.basecamp-copy { display: grid; gap: 22px; }
.basecamp-copy .h2 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); }
.lead { font-size: clamp(1.15rem, 1.5vw, 1.32rem); line-height: 1.55; color: var(--ink); }
.basecamp-copy p { color: var(--ink-2); text-wrap: pretty; }
.basecamp-copy strong { color: #fff; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.stats li {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(28, 36, 86, .55), rgba(14, 19, 52, .55));
  border: 1px solid var(--line);
}
.stats b { font-weight: 800; font-stretch: 75%; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; background: var(--dusk); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats b i { font-style: normal; opacity: .55; }
.stats span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  position: relative; z-index: 2; margin: clamp(0px, 2vw, 30px) -5vw;
  rotate: -2.2deg;
  background: linear-gradient(180deg, rgba(10, 14, 42, .92), rgba(6, 9, 30, .92));
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.mq-row { display: flex; overflow: hidden; white-space: nowrap; padding: 14px 0 6px; }
.mq-row--rev { padding: 0 0 16px; }
.mq-track {
  flex: none; display: flex; align-items: center; gap: .45em; padding-right: .45em;
  font-weight: 800; font-stretch: 75%; font-size: clamp(2.8rem, 7.6vw, 6.6rem); line-height: 1; text-transform: uppercase;
  animation: mq 46s linear infinite;
}
.mq-track b { color: var(--ember); font-size: .6em; font-weight: 400; }
.mq-row--rev .mq-track { animation-direction: reverse; animation-duration: 54s; color: transparent; -webkit-text-stroke: 1.4px rgba(214, 220, 255, .5); }
.mq-row--rev .mq-track b { color: var(--violet); -webkit-text-stroke: 0; }
.mq-track .jp { font-weight: 900; font-size: .82em; }
@keyframes mq { to { transform: translateX(-100%); } }

/* ==========================================================================
   02 Loadout
   ========================================================================== */
.loadout::before {
  content: ""; position: absolute; inset: 10% -10% auto; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(120, 90, 230, .14), transparent 70%);
}
.gear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gear {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 26px 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-2), rgba(12, 16, 46, .7));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: translate .6s var(--ease), border-color .4s, box-shadow .5s, opacity .9s var(--ease), filter .9s var(--ease) !important;
}
.gear:hover { translate: 0 -6px; border-color: rgba(255, 170, 90, .35); box-shadow: 0 30px 60px -30px rgba(255, 140, 60, .35); }
.gear-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.gear-no { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.gear-no em { font-style: normal; color: var(--ember-2); }
.gear-ico { width: 68px; height: 68px; flex: none; fill: none; stroke: url(#gIco); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px rgba(255, 140, 80, .25)); }
.gear-ico circle[r="2.5"], .gear-ico circle[r="2.6"] { fill: var(--ember); stroke: none; }
.ico-flame { fill: var(--ember); stroke: none; transform-box: fill-box; transform-origin: 50% 100%; }
.gear:hover .ico-flame { animation: flicker .14s infinite alternate; }
.ico-route { stroke-dasharray: 3 5; }
.js .gear-ico > * { stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.js .gear.is-in .gear-ico > * { stroke-dashoffset: 0; }
.js .gear.is-in .gear-ico > .ico-route { stroke-dasharray: 3 5; }
.gear h3 { font-weight: 800; font-stretch: 78%; font-size: clamp(1.7rem, 2.2vw, 2.05rem); line-height: 1.02; }
.h3-note { display: block; margin-top: 6px; font-family: var(--mono); font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.gear p { color: var(--ink-2); font-size: .98rem; line-height: 1.6; flex: 1; }
.meter { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pips { display: flex; gap: 5px; }
.pips i { width: 15px; height: 13px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: rgba(255, 255, 255, .12); }
.pips i.on { background: linear-gradient(180deg, #ffd27a, #ff7a3d); }
.js .pips i.on { transform: scale(0); transform-origin: 50% 100%; transition: transform .5s var(--ease-spring); transition-delay: calc(.4s + var(--i) * .06s); }
.js .gear.is-in .pips i.on { transform: scale(1); }
.meter b { font-weight: 800; font-stretch: 75%; font-size: 1.8rem; line-height: 1; }
.meter b small { font-size: .55em; color: var(--ink-3); font-weight: 600; }
.gear-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.wip { color: var(--mint); display: inline-flex; align-items: center; gap: 6px; }
.wip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }

/* ==========================================================================
   Interlude — night
   ========================================================================== */
.night { position: relative; height: 112svh; min-height: 620px; overflow: hidden; isolation: isolate; background: #22345f; }
.night-scene .scene-box { --ar: 1080 / 608; --ax: 50%; --ay: 50%; }
.night-scene img { filter: saturate(1.08) contrast(1.04); }
.night-shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, var(--night-0) 0%, rgba(5, 8, 26, 0) 22%),
    linear-gradient(0deg, var(--night-0) 0%, rgba(5, 8, 26, 0) 22%),
    radial-gradient(120% 90% at 50% 55%, transparent 55%, rgba(5, 8, 26, .55));
}
.night .hud { z-index: 2; }
.night-jp {
  position: absolute; z-index: 4; right: clamp(16px, 6vw, 110px); top: 13%;
  writing-mode: vertical-rl; font-weight: 900; font-size: clamp(2rem, 4.1vw, 3.9rem); line-height: 1.35; letter-spacing: .08em;
  color: #fff; text-shadow: 0 6px 40px rgba(0, 0, 40, .7);
}
.night-en {
  position: absolute; z-index: 4; left: clamp(16px, 6vw, 110px); top: 15%;
  display: grid; gap: 8px; max-width: 440px;
  font-weight: 700; font-stretch: 85%; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.15;
  text-shadow: 0 4px 30px rgba(0, 0, 30, .8);
}
.night-en .mono { font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-2); }

/* ==========================================================================
   03 Trail log
   ========================================================================== */
.route { position: relative; --p: 0; }
.route-line { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 2px; translate: -1px 0; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .2) 0 7px, transparent 7px 15px); }
.route-line > i { position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p)); background: linear-gradient(180deg, var(--ember-2), var(--rose) 60%, var(--violet)); box-shadow: 0 0 16px rgba(255, 140, 80, .6); }
.route-rider {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); z-index: 3;
  width: 46px; height: 46px; translate: -50% -50%; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffd07c, #ff9a3d); box-shadow: 0 0 0 6px rgba(255, 154, 61, .16), 0 10px 30px rgba(255, 120, 40, .5);
}
.route-rider svg { width: 28px; height: 28px; fill: none; stroke: #2a1300; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.sites { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); }
.site { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); align-items: center; }
.site .pin { grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 2; }
.site .site-card { grid-row: 1; grid-column: 1; }
.site:nth-child(even) .site-card { grid-column: 3; }
.pin {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font-size: .78rem; font-weight: 700; color: var(--ember-2);
  background: var(--night-1); border: 2px solid rgba(255, 170, 90, .55);
  box-shadow: 0 0 0 6px var(--night-0);
}
.site-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; padding: 26px 28px; border-radius: 24px;
  background: linear-gradient(180deg, var(--glass-2), rgba(12, 16, 46, .7));
  border: 1px solid var(--line);
  transition: border-color .4s, translate .6s var(--ease);
}
.site-card:hover { border-color: rgba(255, 170, 90, .32); translate: 0 -4px; }
.site-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stars-badge { color: var(--ember-2); }
.stars-badge b { color: #fff; }
.site-card h3 { font-weight: 800; font-stretch: 78%; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1; overflow-wrap: anywhere; }
.site-card p { color: var(--ink-2); font-size: 1rem; }
.site-card strong { color: #fff; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px; }
.site-links a {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 7px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: .76rem; color: var(--ember-2);
  border: 1px solid rgba(255, 196, 107, .28); background: rgba(255, 196, 107, .06);
  transition: background .25s, color .25s, border-color .25s;
}
.site-links a:hover { background: var(--ember-2); color: #2a1300; border-color: transparent; }
.copy-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.copy-row code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  padding: 10px 14px; border-radius: 12px; font-family: var(--mono); font-size: .82rem; color: #e7f5ff;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line);
}
.copy {
  flex: none; padding: 0 16px; border-radius: 12px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); transition: background .25s, color .25s;
}
.copy:hover { background: rgba(255, 255, 255, .16); }
.copy.is-done { background: var(--mint); color: #062018; border-color: transparent; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 5px 11px; border-radius: 999px; font-size: .7rem; letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--line-2); }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: blink 1.4s infinite; }

/* ==========================================================================
   04 Rin
   ========================================================================== */
.rin-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.rin-head > div:first-child { display: grid; gap: 18px; }
.rin-notes { display: grid; gap: 22px; }
.rin-notes p { color: var(--ink-2); text-wrap: pretty; }
.rin-notes em { color: #fff; font-style: normal; font-weight: 700; }
.traits { display: grid; }
.traits li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: .95rem; }
.traits small { color: var(--ink-3); font-size: .8em; }
.trait-bar {
  flex: none; width: 90px; height: 14px;
  background: linear-gradient(90deg, var(--ember) calc(var(--v) * 20%), rgba(255, 255, 255, .14) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14'%3E%3Cpath d='M7 1l6.5 12H.5z'/%3E%3C/svg%3E") left / 18px 14px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14'%3E%3Cpath d='M7 1l6.5 12H.5z'/%3E%3C/svg%3E") left / 18px 14px repeat-x;
}

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 210px); grid-auto-flow: dense; gap: 14px; }
.g { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--night-1); }
.g--tall { grid-row: span 2; }
.g--wide { grid-column: span 2; }
.g-btn { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
.g:hover img { transform: scale(1.06); filter: brightness(1.06); }
.g figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; pointer-events: none;
  display: grid; gap: 1px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .78);
  background: linear-gradient(0deg, rgba(5, 8, 26, .82), transparent);
  translate: 0 8px; opacity: .92; transition: translate .5s var(--ease), opacity .5s;
}
.g figcaption .jp { font-family: var(--jp); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; color: #fff; text-transform: none; }
.g:hover figcaption { translate: 0 0; opacity: 1; }
.credits { margin-top: 26px; font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); text-align: center; }
.credits em { font-style: normal; color: var(--ink-2); }

/* ==========================================================================
   05 Signals
   ========================================================================== */
.signals { position: relative; isolation: isolate; background: var(--night-0); }
.signals-stage { position: relative; min-height: calc(100svh - 64px); overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--night-0) 0%, #012350 30%); }
.camp-scene .scene-box { --ar: 16 / 9; --ax: 50%; --ay: 100%; top: 100%; }
.fireglow {
  position: absolute; left: var(--x); top: var(--y); width: 26%; aspect-ratio: 1; translate: -50% -55%;
  background: radial-gradient(closest-side, rgba(255, 190, 90, .32), rgba(255, 120, 40, .1) 50%, transparent 72%);
  mix-blend-mode: screen; pointer-events: none; animation: glow 2.6s ease-in-out infinite;
}
.is-lit .fireglow { animation-duration: 1.2s; width: 34%; }
@keyframes glow { 0%, 100% { opacity: .9; transform: scale(1); } 35% { opacity: .65; transform: scale(.94); } 70% { opacity: 1; transform: scale(1.04); } }
.emitter { position: absolute; left: var(--x); top: var(--y); width: 1px; height: 1px; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.signals-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, var(--night-0) 0%, rgba(5, 8, 26, 0) 26%), linear-gradient(0deg, var(--night-0) 0%, transparent 6%); }

.signals-inner { position: relative; z-index: 2; padding: clamp(130px, 15vw, 200px) 0 clamp(250px, 30vw, 480px); display: grid; gap: 18px; }
.signals-title { font-weight: 800; font-stretch: 75%; font-size: clamp(3.2rem, 8.6vw, 8rem); line-height: .88; letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; text-shadow: 0 10px 50px rgba(0, 0, 40, .5); }
.signals-jp { font-weight: 900; font-size: clamp(1.4rem, 2.6vw, 2.2rem); letter-spacing: .3em; color: var(--ember-2); text-shadow: 0 0 24px rgba(255, 154, 61, .55); }

.signal-card {
  position: relative; margin-top: clamp(60px, 9vw, 120px); max-width: 920px;
  padding: 12px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 20, 56, .78), rgba(6, 10, 34, .78));
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
}
.signal-card::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 4px; border-radius: 0 0 4px 4px; background: var(--scarf); opacity: .9; }
.signal-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.signal-links a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px;
  transition: background .3s, translate .4s var(--ease);
}
.signal-links a:hover { background: rgba(255, 255, 255, .07); }
.signal-links a:hover i { translate: 3px -3px; color: var(--ember-2); }
.signal-links svg { width: 22px; height: 22px; flex: none; color: var(--ember-2); }
.signal-links span { display: grid; min-width: 0; }
.signal-links b { font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.signal-links small { font-size: .7rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-links i { margin-left: auto; font-style: normal; color: var(--ink-3); transition: translate .3s var(--ease), color .3s; }

.chibi {
  position: absolute; right: clamp(20px, 6%, 60px); bottom: calc(100% - 6px); z-index: 1;
  width: 104px; height: 160px; cursor: pointer; border-radius: 12px;
  transition: translate .5s var(--ease-spring);
}
.chibi:hover { translate: 0 -4px; }
.chibi img { position: absolute; right: 0; bottom: 0; width: auto; max-width: none; transition: opacity .5s; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.chibi-smoke { height: 152px; right: -2px !important; }
.chibi-fire { height: 158px; opacity: 0; }
.is-lit .chibi-smoke { opacity: 0; }
.is-lit .chibi-fire { opacity: 1; }
.chibi::after {
  content: "click to light ↓"; position: absolute; right: 100%; top: 34%; margin-right: 6px; white-space: nowrap;
  font: 500 .62rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  opacity: 0; translate: 6px 0; transition: opacity .3s, translate .3s;
}
.chibi:hover::after { opacity: 1; translate: 0 0; }
.is-lit .chibi::after { content: "click to rest"; }

.footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px;
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom));
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(220, 226, 255, .62);
}
.to-top { color: var(--ember-2); margin-right: clamp(0px, 12vw, 150px); }
.to-top:hover { color: #fff; }

/* ==========================================================================
   Peek (Rin says hi)
   ========================================================================== */
.peek {
  --pw: clamp(96px, 11vw, 150px);
  position: fixed; right: 0; bottom: 0; z-index: 45;
  width: calc(var(--pw) + 170px); height: calc(var(--pw) * 1.81 + 10px);
  overflow: hidden; pointer-events: none;
}
.peek img {
  position: absolute; right: 0; bottom: 0; width: var(--pw); height: auto;
  translate: 110% 0; transition: translate .9s var(--ease-spring);
  pointer-events: auto; cursor: pointer; filter: drop-shadow(-6px 0 20px rgba(0, 0, 0, .5));
}
.peek.is-in img { translate: 0 0; }
.peek.is-in.is-shy img { translate: 70% 0; }
.peek-bubble {
  position: absolute; right: calc(var(--pw) * .86); top: 6%; white-space: nowrap;
  padding: 7px 13px; border-radius: 14px 14px 2px 14px;
  font-weight: 700; font-size: .92rem; color: var(--paper-ink); background: var(--paper);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  opacity: 0; scale: .6; transform-origin: 100% 100%; transition: opacity .3s, scale .45s var(--ease-spring);
}
.peek.is-talking .peek-bubble { opacity: 1; scale: 1; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink); overflow: hidden;
}
.lightbox::backdrop { background: rgba(3, 5, 15, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox[open] { display: grid; place-items: center; animation: fade-in .3s; }
.lightbox figure { display: grid; justify-items: center; gap: 14px; max-width: min(1400px, 92vw); }
.lightbox img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lightbox img.pixel { min-width: min(92vw, 960px); }
.lightbox figcaption { display: flex; gap: 12px; align-items: baseline; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.lightbox figcaption .jp { font-family: var(--jp); font-weight: 700; font-size: 1.1rem; color: #fff; text-transform: none; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.1rem; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); transition: background .25s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lb-next { right: 18px; top: 50%; translate: 0 -50%; }

/* ==========================================================================
   Reveal
   ========================================================================== */
.js [data-reveal] { opacity: 0; translate: 0 30px; filter: blur(8px); transition: opacity .95s var(--ease) var(--d, 0s), translate .95s var(--ease) var(--d, 0s), filter .95s var(--ease) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; filter: none; }
.js .gear[data-reveal].is-in:hover { translate: 0 -6px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .basecamp-grid { grid-template-columns: 1fr; }
  .collage { max-width: 680px; width: 100%; margin-inline: auto; }
  .rin-head { grid-template-columns: 1fr; align-items: start; }
  .hero-content { width: min(600px, 52vw); }
}

/* hero: switch to a stacked layout when the screen is squarer than ~11:10 */
@media (max-aspect-ratio: 11 / 10) {
  .hero { min-height: 680px; }
  .hero-content { left: clamp(16px, 5vw, 48px); right: clamp(16px, 5vw, 48px); top: auto; bottom: 84px; translate: none; width: auto; max-width: 640px; }
  .hero-shade { background: linear-gradient(0deg, var(--night-0) 0%, rgba(5, 8, 26, .9) 30%, rgba(5, 8, 26, .35) 56%, rgba(5, 8, 26, 0) 70%), linear-gradient(180deg, rgba(5, 8, 26, .55) 0%, rgba(5, 8, 26, 0) 16%); }
  .hero-vert { display: none; }
  .hero-scene .scene-box { --ax: 30%; }
}
/* portrait: the scooter ride */
@media (max-aspect-ratio: 4 / 5) {
  .hero { background: var(--night-0); }
  .hero-scene .scene-box { --ar: 1024 / 2220; --ax: 50%; top: -15%; transform-origin: 50% 30%; }
  .hud--ride.hud--minor { display: none; }
  .breath, .hud--dusk { display: none; }
  .headlight, .hud--ride { display: block; }
  .hero-shade { background: linear-gradient(0deg, var(--night-0) 0%, rgba(5, 8, 26, .92) 32%, rgba(5, 8, 26, .3) 52%, rgba(5, 8, 26, 0) 64%), linear-gradient(180deg, rgba(5, 8, 26, .5) 0%, rgba(5, 8, 26, 0) 14%); }
}

@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; padding-left: 14px; }
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-status { display: none; }
  .hero-route { display: none; }
  .site { grid-template-columns: 44px minmax(0, 1fr); gap: 0 16px; align-items: start; }
  .site .pin { grid-column: 1; justify-self: start; margin-top: 22px; }
  .site .site-card, .site:nth-child(even) .site-card { grid-column: 2; }
  .route-line { left: 22px; }
  .route-rider { left: 22px; width: 40px; height: 40px; }
  .route-rider svg { width: 24px; height: 24px; }
  .signal-links { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .night-scene .scene-box { --ax: 44%; }
  .hud--minor { display: none; }
  .night-jp { top: 11%; }
  .camp-scene .scene-box { width: max(100cqw, 230vw); --ax: 58%; }
  .to-top { margin-right: 0; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .gear-grid { grid-template-columns: 1fr; }
  .collage { padding-bottom: 150px; }
  .permit { right: -4px; width: 92%; }
  .permit-face { width: 68px; height: 68px; }
  .stats li { padding: 14px 16px; }
  .signal-links { grid-template-columns: 1fr; }
  .site-card { padding: 22px 20px; }
  .signal-links a { padding: 14px; }
  .chibi { width: 86px; height: 132px; }
  .chibi-smoke { height: 124px; }
  .chibi-fire { height: 130px; }
  .hero-foot { justify-content: center; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .chip { font-size: .64rem; }
  .gallery { gap: 10px; grid-auto-rows: 150px; }
  .hud { font-size: 9px; }
  .hud-tag small { font-size: 8.5px; }
  .footer { flex-direction: column; align-items: flex-start; padding-right: 110px; }
  .peek { --pw: 84px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; translate: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .grain::before, .breath, .mq-track { animation: none !important; }
  .js [data-reveal], .js .hero-title-row span, .js [data-hero-rise] { opacity: 1; translate: none; filter: none; }
}
