/* ===========================
   Lluc Vivet Torras — Portfolio
   css/style.css  ·  湖 — the lake
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --h: 100vh;            /* set from JS to the real viewport height */
  --move: 1500ms;        /* page transition duration (set from JS)  */

  --ink:       #f4ede1;
  --ink-dim:   rgba(244, 237, 225, .7);
  --ink-faint: rgba(244, 237, 225, .34);
  --vermilion: #e0573f;
  --sakura:    #f4b6c2;
  --night:     #0b0e22;

  --paper:     #f8f1e2;
  --paper-ink: #211b16;
  --wood:      #3a281f;

  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans:  'Zen Kaku Gothic New', system-ui, sans-serif;
  --mono:  'Space Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 5vw, 80px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

html, body { height: 100%; overflow: hidden; background: var(--night); }

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sakura); outline-offset: 4px; border-radius: 4px; }

@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
}

.no-anim, .no-anim * { transition: none !important; }

/* ---------- No JavaScript ---------- */
.noscript {
  position: fixed; inset: auto 16px 16px 16px; z-index: 200; padding: 14px 18px; border-radius: 12px;
  background: rgba(11, 14, 34, .9); color: var(--ink); font-size: .9rem; text-align: center;
}
.noscript a { color: var(--sakura); border-bottom: 1px solid currentColor; }

/* ---------- Intro veil ---------- */
#veil {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--night);
  transition: opacity 1.4s ease, visibility 0s 1.4s;
}
#veil span {
  font-family: var(--serif); font-size: 3.2rem; color: var(--ink);
  animation: breathe 2.4s ease-in-out infinite;
}
body.loaded #veil { opacity: 0; visibility: hidden; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.96); } }

/* ---------- Ink-brush cursor ---------- */
#inkCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100;
  pointer-events: none;
}
#enso {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  pointer-events: none; overflow: visible;
  fill: none; stroke: rgba(255, 246, 234, .9); stroke-width: 5.5; stroke-linecap: round;
  will-change: transform;
}
#enso.dark { stroke: rgba(33, 27, 22, .85); }
#enso path {
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transform-origin: 50% 50%;
  transition: stroke-dashoffset .55s cubic-bezier(.65, 0, .35, 1), opacity .3s;
  opacity: 0;
}
#enso.on path { stroke-dashoffset: 0; opacity: 1; animation: enso-spin 6s linear infinite; }
@keyframes enso-spin { to { transform: rotate(360deg); } }
@media not all and (hover: hover) and (pointer: fine) {
  #inkCanvas, #enso { display: none; }
}

/* ---------- 3D lake ---------- */
#stage { position: fixed; inset: 0; z-index: 0; background: var(--night); }
#threeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* In 3D mode the camera does the travelling: pages are just overlays that fade in */
.three-on #world { transform: none !important; height: var(--h); transition: none; }
.three-on .layer {
  top: 0 !important; background: none !important;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s .5s;
}
body.three-on[data-page="home"]:not(.in-transit) #page-home,
body.three-on[data-page="projects"]:not(.in-transit) #page-projects,
body.three-on[data-page="about"]:not(.in-transit) #page-about {
  opacity: 1; visibility: visible; transition: opacity .9s ease;
}
.three-on #sceneSvg, .three-on #lakeCanvas, .three-on #petalCanvas,
.three-on #deepCanvas, .three-on #deepFx, .three-on .deep-shade,
.three-on .stars, .three-on .moon, .three-on .cloud, .three-on .crane,
.three-on .interior .wall, .three-on .interior .ceiling, .three-on .interior .beam,
.three-on .interior .post, .three-on .interior .tatami, .three-on .interior .andon,
.three-on .interior .marumado, .three-on .interior .shoji { display: none; }
.three-on .interior { background: none; transition: opacity .9s ease, visibility 0s .9s; }
.three-on .interior.show { transition: opacity .9s ease; }
.three-on .interior .room { justify-content: flex-end; padding-right: clamp(24px, 9vw, 160px); }
.three-on .interior .exit, .three-on .interior .copy { color: var(--ink); border-color: var(--ink-faint); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.three-on .about-text, .three-on .deep-head { text-shadow: 0 2px 24px rgba(4, 6, 26, .55); }
@media (max-width: 760px) {
  .three-on .interior .room { padding: calc(var(--ceil) + 20px) 20px 6vh; }
}

/* ---------- Nav ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
}
.seal {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 5px;
  background: var(--vermilion); color: #fff3e8;
  font-family: var(--serif); font-weight: 800; font-size: 1rem;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 230, .28);
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 40px); list-style: none; }
.nav-links a {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 8px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  opacity: .62; transition: opacity .3s;
  text-shadow: 0 1px 12px rgba(5, 8, 25, .5);
}
.nav-links .jp {
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; text-transform: none; line-height: 1.3;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 5px; height: 5px; border-radius: 50%; background: var(--vermilion);
  transform: translateX(-50%) scale(0); transition: transform .4s var(--ease-out);
}
.nav-links a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }

@media (max-width: 560px) {
  .nav-logo span:last-child { display: none; }
  .nav-links a { font-size: .56rem; letter-spacing: .06em; }
}

/* ---------- Shared type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.eyebrow.dark { color: rgba(33, 27, 22, .6); }

.section-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.01em;
  margin-top: 16px;
}
.section-title .jp {
  display: block; margin-bottom: .45em;
  font-size: .36em; letter-spacing: .4em; color: var(--sakura);
}
.section-title em { font-style: normal; color: var(--sakura); }

.layer-foot {
  margin: 72px auto 0; text-align: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); line-height: 2;
}

/* staggered reveal when a page becomes active */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s ease, transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + var(--move) * .55);
}
body[data-page="about"]    #page-about    .reveal,
body[data-page="projects"] #page-projects .reveal { opacity: 1; transform: none; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid rgba(244, 237, 225, .3);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.btn:hover { background: var(--ink); color: #141633; border-color: var(--ink); }

/* ---------- World (vertical camera) ---------- */
#world {
  position: fixed; left: 0; top: 0; z-index: 1;
  width: 100%; height: calc(var(--h) * 3);
  transform: translate3d(0, calc(var(--h) * -1), 0);
  transition: transform var(--move) cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}
#world[data-at="about"]    { transform: translate3d(0, 0, 0); }
#world[data-at="projects"] { transform: translate3d(0, calc(var(--h) * -2), 0); }

.layer { position: absolute; left: 0; width: 100%; height: var(--h); overflow: hidden; }
.layer-sky     { top: 0; }
.layer-surface { top: var(--h); }
.layer-deep    { top: calc(var(--h) * 2); }

/* =========================================================
   SURFACE — HOME
   ========================================================= */
.layer-surface { background: #1d1f3d; }

.surface-zoom {
  position: absolute; inset: 0;
  transition: transform var(--move) var(--ease-out), filter var(--move) ease;
  will-change: transform;
}
.surface-zoom.zoomed {
  transform: scale(11);
  filter: brightness(1.25) saturate(1.1);
  transition-timing-function: cubic-bezier(.7, 0, .84, 0), ease;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#lakeCanvas { position: absolute; left: 0; width: 100%; opacity: 0; transition: opacity 1.2s ease; }
#lakeCanvas.ready { opacity: 1; }
#petalCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.home-ui {
  position: absolute; inset: 0; pointer-events: none;
  transition: opacity .6s ease, transform .9s var(--ease-out);
}
.home-ui a { pointer-events: auto; }
body:not([data-page="home"]) .home-ui { opacity: 0; transform: translateY(-14px); }

.home-title {
  position: absolute; left: var(--gutter); top: clamp(96px, 16vh, 180px);
  max-width: min(680px, 92vw);
}
.name {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.7rem, 7.4vw, 6.6rem); line-height: .98; letter-spacing: -.01em;
  margin: 18px 0 20px;
}
.name .line { display: block; clip-path: inset(-10% -5% 0 -5%); padding-bottom: .06em; }
.name .line > span {
  display: block; transform: translateY(110%);
  transition: transform 1.3s var(--ease-out) .5s;
}
.name .line + .line > span { transition-delay: .62s; }
body.loaded .name .line > span { transform: none; }
body.name-ready .name .line { clip-path: none; }
body.name-ready .name .line > span { transition: none; }
.role {
  color: var(--ink-dim); font-size: clamp(.9rem, 1.25vw, 1.02rem); line-height: 1.8;
  text-shadow: 0 1px 14px rgba(20, 16, 50, .6);
}
.role a { color: var(--ink); border-bottom: 1px solid var(--ink-faint); transition: border-color .3s; }
.role a:hover { border-color: var(--sakura); }

.vert {
  position: absolute; right: var(--gutter); top: clamp(110px, 18vh, 200px);
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: .95rem; letter-spacing: .55em; color: var(--ink-dim);
}

.home-menu {
  position: absolute; left: var(--gutter); bottom: clamp(28px, 8vh, 84px);
  display: flex; gap: clamp(20px, 5vw, 72px); list-style: none;
}
.menu-link { display: grid; gap: 6px; text-shadow: 0 2px 18px rgba(5, 10, 25, .7); }
.menu-link .num {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-dim);
}
.menu-link .kanji {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1;
  transition: transform .6s var(--ease-out), color .3s;
}
.menu-link .label {
  position: relative; padding-bottom: 8px;
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
}
.menu-link .label::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--vermilion);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out);
}
.menu-link:hover .kanji, .menu-link:focus-visible .kanji { transform: translateY(-8px); color: var(--sakura); }
.menu-link:hover .label::after, .menu-link:focus-visible .label::after { transform: scaleX(1); }

.hint {
  position: absolute; right: var(--gutter); bottom: clamp(28px, 8vh, 84px);
  text-align: right; line-height: 2;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-dim);
}

@media (max-width: 760px) {
  .vert, .hint { display: none; }
  .home-menu { right: var(--gutter); justify-content: space-between; gap: 12px; }
  .menu-link .num { font-size: .52rem; letter-spacing: .1em; }
  .menu-link .label { font-size: .68rem; letter-spacing: .12em; }
}

/* =========================================================
   SKY — ABOUT
   ========================================================= */
.layer-sky { background: linear-gradient(#04061a 0%, #0b0e2a 45%, #1d1f3d 100%); }

.stars { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; animation: twinkle 4s ease-in-out infinite alternate; }
.stars.b { animation-duration: 5.5s; animation-delay: -2.5s; }
@keyframes twinkle { from { opacity: .3; } to { opacity: 1; } }

.moon {
  position: absolute; right: clamp(24px, 30vw, 520px); top: clamp(84px, 11vh, 120px);
  width: clamp(64px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fff9ec, #f0e2c4 55%, #d6c3a0);
  box-shadow: 0 0 60px 12px rgba(255, 240, 210, .22), 0 0 200px 70px rgba(255, 230, 200, .07);
}
.cloud {
  position: absolute; left: 0; height: clamp(26px, 5vh, 56px); border-radius: 999px;
  background: rgba(170, 150, 210, .16); filter: blur(12px);
  animation: drift linear infinite;
}
@keyframes drift { from { transform: translateX(-60vw); } to { transform: translateX(120vw); } }
.crane {
  position: absolute; left: 0; width: 44px; height: 22px;
  color: rgba(244, 237, 225, .5);
  animation: fly 40s linear infinite;
}
.crane path { animation: flap 1.3s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes fly { from { transform: translate(-12vw, 0); } to { transform: translate(112vw, -14vh); } }
@keyframes flap { 50% { transform: scaleY(-.5); } }

.about-scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: clamp(110px, 18vh, 180px) var(--gutter) clamp(48px, 8vh, 90px);
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(244, 237, 225, .2) transparent;
  -webkit-mask-image: linear-gradient(transparent 0, transparent 64px, #000 120px);
          mask-image: linear-gradient(transparent 0, transparent 64px, #000 120px);
}
.about-grid {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end;
}
.about-text p:not(.eyebrow) {
  margin-top: 1.1em; max-width: 60ch;
  color: var(--ink-dim); font-size: clamp(1rem, 1.2vw, 1.1rem);
}
.about-text p.lead { color: var(--ink); margin-top: 1.6em; }
.cv-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.skills {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px;
  padding: clamp(22px, 3vw, 34px); border-radius: 18px;
  background: rgba(10, 12, 38, .45); border: 1px solid rgba(244, 237, 225, .12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.skill-group h3 {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px;
  font-family: var(--mono); font-weight: 400; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--sakura);
}
.skill-group h3 .jp { font-family: var(--serif); font-size: .95rem; letter-spacing: 0; color: var(--ink-dim); }
.skill-group li { list-style: none; padding: 3px 0; font-size: .95rem; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .moon { right: 7vw; top: 88px; width: 52px; opacity: .8; }
}
@media (max-width: 420px) {
  .skills { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
}

/* =========================================================
   UNDERWATER — PROJECTS
   ========================================================= */
.layer-deep { background: linear-gradient(#2f7f8f, #124559 35%, #0a2b3d 70%, #04131d); }
#deepCanvas, #deepFx { position: absolute; inset: 0; width: 100%; height: 100%; }
#deepFx { pointer-events: none; }
.deep-shade { position: absolute; inset: 0; background: #020a10; opacity: var(--deep-dark, 0); pointer-events: none; }

.deep-scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: clamp(110px, 18vh, 170px) var(--gutter) 100px;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(244, 237, 225, .2) transparent;
  -webkit-mask-image: linear-gradient(transparent 0, transparent 64px, #000 120px);
          mask-image: linear-gradient(transparent 0, transparent 64px, #000 120px);
}
.deep-head {
  max-width: 1200px; margin: 0 auto clamp(32px, 6vh, 64px);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.tabs {
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  border: 1px solid rgba(244, 237, 225, .18);
  background: rgba(22, 14, 40, .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tab {
  padding: 8px 18px; border-radius: 999px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-dim); transition: background .3s, color .3s;
}
.tab[aria-selected="true"] { background: var(--ink); color: #241a3c; }

.cards {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px; min-height: 250px;
  padding: clamp(22px, 3vw, 34px); border-radius: 18px;
  background: linear-gradient(160deg, rgba(74, 52, 104, .5), rgba(22, 14, 40, .58));
  border: 1px solid rgba(240, 200, 222, .16);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  opacity: 0; transform: translateY(46px);
  transition: opacity .9s ease, transform 1s var(--ease-out), border-color .4s, box-shadow .4s;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.card[hidden] { display: none; }
body[data-page="projects"] .card.in { opacity: 1; transform: none; }
body[data-page="projects"] .card.in:hover {
  transform: translateY(-6px); transition-delay: 0s;
  border-color: rgba(244, 182, 194, .5);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-num { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--ink-dim); }
.card-arrow { font-size: 1.1rem; transition: transform .4s var(--ease-out), color .3s; }
.card:hover .card-arrow { transform: translate(4px, -4px); color: var(--sakura); }
.card-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; }
.card-desc { color: var(--ink-dim); font-size: .95rem; max-width: 46ch; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; position: relative; z-index: 1; }
.card-tags span {
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(244, 237, 225, .18);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; color: var(--ink-dim);
}
.card-kanji {
  position: absolute; right: 18px; bottom: -14px; pointer-events: none;
  font-family: var(--serif); font-size: 6.5rem; line-height: 1;
  color: rgba(244, 237, 225, .06); transition: color .5s;
}
.card:hover .card-kanji { color: rgba(244, 182, 194, .22); }

.depth {
  position: absolute; right: clamp(8px, 1.6vw, 26px); top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; color: var(--ink-dim);
  pointer-events: none;
}
.depth-jp { font-family: var(--serif); writing-mode: vertical-rl; font-size: .85rem; letter-spacing: .3em; }
.depth-track { position: relative; width: 1px; height: 26vh; background: rgba(244, 237, 225, .22); }
.depth-mark {
  position: absolute; left: 50%; top: var(--p, 0%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--sakura);
  transform: translate(-50%, -50%);
}
@media (max-width: 700px) { .depth { display: none; } }

/* =========================================================
   INSIDE THE HOUSE — CONTACT
   ========================================================= */
.interior {
  --ceil: clamp(80px, 13vh, 124px);
  position: fixed; inset: 0; z-index: 40; overflow: hidden;
  color: var(--paper-ink);
  visibility: hidden; opacity: 0;
  transition: opacity .5s ease, visibility 0s .5s;
}
.interior.show { visibility: visible; opacity: 1; transition: opacity .5s ease; }

.wall { position: absolute; inset: 0; background: radial-gradient(ellipse at 35% 55%, #f6ebd4, #e4d4b5 65%, #cdb995); }
.ceiling {
  position: absolute; left: 0; right: 0; top: 0; height: var(--ceil);
  background: repeating-linear-gradient(90deg, #2a1c16 0 2px, #3d2a21 2px 72px);
}
.beam {
  position: absolute; left: 0; right: 0; top: var(--ceil); height: 18px;
  background: linear-gradient(#5d4232, #3a281f); box-shadow: 0 8px 22px rgba(60, 40, 20, .25);
}
.post {
  position: absolute; top: 0; bottom: 0; width: clamp(16px, 2.4vw, 38px);
  background: linear-gradient(90deg, #2c1f18, #4c3628 45%, #2c1f18);
}
.post.l { left: clamp(6px, 4vw, 64px); }
.post.r { right: clamp(6px, 4vw, 64px); }
.tatami {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20vh;
  border-top: 8px solid #2f2c1f;
  background:
    linear-gradient(90deg, transparent calc(50% - 4px), #2a281c calc(50% - 4px) calc(50% + 4px), transparent calc(50% + 4px)),
    repeating-linear-gradient(0deg, rgba(60, 50, 10, .08) 0 2px, transparent 2px 5px),
    linear-gradient(#cfc38c, #a69a62);
}
.andon {
  position: absolute; left: clamp(46px, 11vw, 200px); bottom: calc(20vh - 10px);
  width: 44px; height: 70px; border: 3px solid var(--wood);
  background: linear-gradient(#fff0cf, #f6c98a);
  box-shadow: 0 0 60px 26px rgba(255, 200, 120, .32);
  animation: flicker 4s ease-in-out infinite;
}
@keyframes flicker { 40% { box-shadow: 0 0 52px 22px rgba(255, 200, 120, .26); } 60% { box-shadow: 0 0 66px 30px rgba(255, 200, 120, .36); } }

.room {
  position: absolute; inset: 0; z-index: 2; overflow-y: auto;
  padding: calc(var(--ceil) + 40px) clamp(48px, 9vw, 160px) 7vh;
  display: flex; align-items: center; justify-content: center; gap: clamp(32px, 7vw, 120px);
}

.marumado {
  position: relative; flex: none;
  width: min(32vw, 44vh, 400px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: clamp(10px, 1.3vw, 16px) solid var(--wood);
  box-shadow: inset 0 0 0 3px #5b4130, inset 0 12px 30px rgba(0, 0, 0, .45), 0 14px 40px rgba(60, 40, 20, .28);
  background:
    radial-gradient(1px 1px at 20% 20%, #fff 50%, transparent),
    radial-gradient(1px 1px at 40% 12%, #fff 50%, transparent),
    radial-gradient(1px 1px at 82% 34%, #fff 50%, transparent),
    radial-gradient(1px 1px at 12% 38%, #fff 50%, transparent),
    linear-gradient(#070a1e, #1d1f42 50%);
}
.win-moon {
  position: absolute; left: 62%; top: 15%; width: 18%; aspect-ratio: 1; border-radius: 50%;
  background: #fbf1dc; box-shadow: 0 0 30px 8px rgba(255, 240, 210, .35);
}
.win-hills {
  position: absolute; left: 0; right: 0; top: 38%; height: 13%;
  background: #0d0f26;
  clip-path: polygon(0 100%, 0 55%, 14% 30%, 28% 58%, 46% 8%, 60% 50%, 76% 32%, 100% 66%, 100% 100%);
}
#winCanvas { position: absolute; left: 0; top: 50%; width: 100%; height: 50%; }

.kakejiku { flex: none; width: min(410px, 84vw); filter: drop-shadow(0 18px 30px rgba(60, 40, 20, .3)); }
.scroll-rod {
  position: relative; height: 16px; margin: 0 -14px; border-radius: 8px;
  background: linear-gradient(#6b4632, #2a1912);
}
.scroll-rod::before, .scroll-rod::after {
  content: ''; position: absolute; top: 1px; width: 14px; height: 14px; border-radius: 50%; background: #1a100c;
}
.scroll-rod::before { left: -6px; } .scroll-rod::after { right: -6px; }
.scroll-body { padding: 18px 16px 22px; background: linear-gradient(90deg, #6e543d, #8a6c4f 50%, #6e543d); }
.scroll-paper {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 20px;
  padding: 30px 26px 34px;
  background: var(--paper); box-shadow: inset 0 0 50px rgba(140, 100, 50, .16);
}
.scroll-kanji {
  writing-mode: vertical-rl;
  font-family: var(--serif); font-weight: 800; font-size: clamp(2.4rem, 4vw, 3.3rem);
  line-height: 1; letter-spacing: .12em; color: var(--vermilion);
}
.scroll-content h2 {
  margin-top: 14px;
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.45rem, 2.3vw, 1.95rem); line-height: 1.18;
}
.contact-email {
  display: inline-block; margin: 18px 0 22px; padding-bottom: 2px;
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  border-bottom: 2px solid var(--vermilion); word-break: break-all;
  transition: color .3s;
}
.contact-email:hover { color: var(--vermilion); }
.contact-links { list-style: none; }
.contact-links li { border-top: 1px solid rgba(33, 27, 22, .15); }
.contact-links a {
  display: flex; justify-content: space-between; padding: 10px 0;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  transition: color .3s, padding .3s;
}
.contact-links a:hover { color: var(--vermilion); padding-left: 6px; }
.hanko {
  position: absolute; left: 22px; bottom: 26px;
  writing-mode: vertical-rl;
  padding: 6px 4px; border: 2px solid var(--vermilion); border-radius: 4px;
  font-family: var(--serif); font-weight: 800; font-size: .8rem; color: var(--vermilion);
  opacity: .85; transform: rotate(-4deg);
}

.exit, .copy {
  position: absolute; bottom: 5vh; z-index: 3;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
}
.exit { left: var(--gutter); padding: 8px 0; border-bottom: 1px solid rgba(33, 27, 22, .3); transition: border-color .3s; }
.exit:hover { border-color: var(--vermilion); }
.copy { right: var(--gutter); opacity: .6; }

/* shoji doors */
.shoji {
  position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 10;
  background:
    linear-gradient(90deg, #4a3226 0 12px, transparent 12px calc(100% - 12px), #4a3226 calc(100% - 12px)),
    linear-gradient(#4a3226 0 12px, transparent 12px calc(100% - 12px), #4a3226 calc(100% - 12px)),
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 3px), #5a3d2d calc(25% - 3px) 25%),
    repeating-linear-gradient(0deg, transparent 0 calc(12.5% - 3px), #5a3d2d calc(12.5% - 3px) 12.5%),
    radial-gradient(ellipse at 50% 55%, #fff2d4, #f3d39c 70%, #e2bb7d);
  transition: transform .95s cubic-bezier(.7, 0, .2, 1);
}
.shoji.l { left: 0; }
.shoji.r { right: 0; }
.shoji::after {
  content: ''; position: absolute; top: 50%; width: 10px; height: 46px; margin-top: -23px;
  border-radius: 6px; background: #3a281f; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5);
}
.shoji.l::after { right: 26px; }
.shoji.r::after { left: 26px; }
.interior.open .shoji.l { transform: translateX(-102%); }
.interior.open .shoji.r { transform: translateX(102%); }

@media (max-width: 760px) {
  .room { flex-direction: column; justify-content: flex-start; gap: 28px; padding-inline: 34px; padding-bottom: 22vh; }
  .marumado { width: min(46vw, 200px); }
  .andon { display: none; }
  .exit, .copy { display: none; }
}
@media (max-height: 640px) and (min-width: 761px) {
  .room { align-items: flex-start; }
}

/* =========================================================
   HIDDEN GALLERY — opens from inside the samurai's pupil
   --iris is the radius of the opening; the gallery is clipped to it and
   an amber iris ring rides its edge, so it looks like the pupil dilating.
   ========================================================= */
@property --iris { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

body { --iris: 0px; transition: --iris 1.25s cubic-bezier(.6, 0, .35, 1); }
body[data-page="gallery"]:not(.in-transit) { --iris: 150vmax; transition: --iris 2.1s cubic-bezier(.55, 0, .1, 1) .05s; }

.gallery {
  position: fixed; inset: 0; z-index: 45;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 190, 90, .09), transparent 45%),
    radial-gradient(circle at 50% 40%, #2a0f0c 0%, #120807 48%, #050303 100%);
  clip-path: circle(var(--iris) at 50% 50%);
  visibility: hidden;
  transition: visibility 0s 1.25s;
}
body[data-page="gallery"] .gallery { visibility: visible; transition: none; }

/* iris fibres riding the edge of the opening */
.iris-ring {
  position: fixed; inset: 0; z-index: 46; pointer-events: none;
  --ringW: calc(var(--iris) * .38 + 24px);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 214, 140, .95) calc(var(--iris) + 1px), rgba(255, 160, 50, .0) calc(var(--iris) + var(--ringW) * .25)),
    repeating-conic-gradient(from var(--spin) at 50% 50%, rgba(255, 196, 92, .95) 0deg 1.1deg, rgba(196, 96, 16, .85) 1.1deg 2.3deg, rgba(255, 150, 40, .9) 2.3deg 3.2deg),
    #3a1606;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--iris), #000 calc(var(--iris) + 1px), #000 calc(var(--iris) + var(--ringW) * .7), transparent calc(var(--iris) + var(--ringW)));
          mask: radial-gradient(circle at 50% 50%, transparent var(--iris), #000 calc(var(--iris) + 1px), #000 calc(var(--iris) + var(--ringW) * .7), transparent calc(var(--iris) + var(--ringW)));
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s 1.3s;
  animation: iris-spin 14s linear infinite;
}
body[data-page="gallery"]:not(.in-transit) .iris-ring, body.iris-closing .iris-ring { opacity: 1; visibility: visible; transition: opacity .3s ease; }
@keyframes iris-spin { to { --spin: 360deg; } }

/* slow fibre texture deep in the background */
.gallery::before {
  content: ''; position: absolute; inset: -30vmax; pointer-events: none;
  background: repeating-conic-gradient(from var(--spin) at 50% 50%, rgba(255, 170, 70, .05) 0deg 1.4deg, transparent 1.4deg 3deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 12vmax, #000 30vmax, transparent 70vmax);
          mask: radial-gradient(circle at 50% 50%, transparent 12vmax, #000 30vmax, transparent 70vmax);
  animation: iris-spin 60s linear infinite reverse;
}
.gallery::after {        /* vignette */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

.gallery-scroll {
  position: absolute; inset: 0; z-index: 1; overflow-y: auto;
  padding: clamp(110px, 17vh, 170px) var(--gutter) 80px;
  overscroll-behavior: contain; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(255, 200, 97, .25) transparent;
}
.gallery-head { max-width: 1200px; margin: 0 auto clamp(28px, 5vh, 56px); }
.gallery-head > * {
  opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity .9s ease, transform 1.1s var(--ease-out), filter 1s ease;
}
.gallery-head > :nth-child(2) { transition-delay: .1s; }
.gallery-head > :nth-child(3) { transition-delay: .2s; }
body[data-page="gallery"]:not(.in-transit) .gallery-head > * { opacity: 1; transform: none; filter: none; transition-delay: calc(1.1s + var(--d, 0s)); }
body[data-page="gallery"]:not(.in-transit) .gallery-head > :nth-child(2) { --d: .12s; }
body[data-page="gallery"]:not(.in-transit) .gallery-head > :nth-child(3) { --d: .24s; }
.gallery-head .section-title em { color: #ffc861; text-shadow: 0 0 40px rgba(255, 170, 60, .35); }
.gallery-sub { margin-top: 14px; color: var(--ink-dim); }

.photo-grid { max-width: 1200px; margin: 0 auto; columns: 3 300px; column-gap: 20px; }
.photo {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  break-inside: avoid; margin: 0 0 20px; position: relative; cursor: none;
  border-radius: 12px; overflow: hidden; isolation: isolate;
  background: #1a0f0d;
  box-shadow: 0 22px 50px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 200, 97, .07);
  opacity: 0; transform: perspective(900px) translateY(40px) scale(.96);
  filter: blur(8px);
  transition: opacity .9s ease, transform 1.1s var(--ease-out), filter .9s ease, box-shadow .5s;
  transition-delay: calc(var(--i, 0) * 80ms + 1.3s);
}
body[data-page="gallery"]:not(.in-transit) .photo {
  opacity: 1; filter: none;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
}
body[data-page="gallery"]:not(.in-transit) .photo.tilting { transition: transform .12s linear, box-shadow .5s, opacity .9s, filter .9s; transition-delay: 0s; }
.photo:hover { box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 200, 97, .35), 0 0 40px -10px rgba(255, 170, 60, .35); }
.photo img {
  display: block; width: 100%; height: auto;
  transform: scale(1.02) translate(calc(var(--ry) * -.6), calc(var(--rx) * .6));
  transition: transform .9s var(--ease-out), filter .6s; filter: saturate(.9) brightness(.95);
}
.photo:hover img { transform: scale(1.07) translate(calc(var(--ry) * -.6), calc(var(--rx) * .6)); filter: saturate(1.05) brightness(1.02); }
.photo::after {          /* moving shine */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 230, 180, .22), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.photo:hover::after { opacity: 1; }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(5, 3, 3, .85));
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; color: var(--ink);
  transform: translateY(8px); opacity: 0; transition: opacity .4s, transform .5s var(--ease-out);
}
.photo:hover figcaption, .photo:focus-visible figcaption { opacity: 1; transform: none; }
.gallery-foot { text-align: center; margin-top: 52px; }
.gallery-empty { color: var(--ink-dim); font-family: var(--mono); font-size: .8rem; }

/* 3D world inside the eye (js/gallery3d.js) */
.gallery-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.gallery.g3d .gallery-scroll { pointer-events: none; overflow: hidden; }
.gallery.g3d .photo-grid { display: none; }
.gallery.g3d .gallery-head { position: absolute; left: var(--gutter); top: clamp(96px, 14vh, 150px); max-width: 560px; margin: 0; }
.gallery.g3d .gallery-head .section-title { font-size: clamp(2rem, 4.6vw, 3.8rem); }
.gallery.g3d .gallery-head { text-shadow: 0 2px 18px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .6); }
.gallery.g3d .gallery-foot { position: absolute; left: var(--gutter); bottom: clamp(22px, 5vh, 44px); margin: 0; text-align: left; }
.gallery.g3d .gallery-foot a { pointer-events: auto; }
.gallery-hint { display: none; }
.gallery.g3d .gallery-hint {
  display: block; position: absolute; right: var(--gutter); bottom: clamp(30px, 5.6vh, 52px);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 200, 120, .6);
  opacity: 0; transition: opacity 1s ease 2.4s;
}
body[data-page="gallery"]:not(.in-transit) .gallery.g3d .gallery-hint { opacity: 1; }
.gallery.g3d::before { display: none; }
.gallery-hint .hint-touch { display: none; }
@media not all and (hover: hover) and (pointer: fine) {
  .gallery-hint .hint-fine { display: none; }
  .gallery-hint .hint-touch { display: inline; }
}
@media (max-width: 600px) {
  .gallery.g3d .gallery-hint { left: var(--gutter); right: auto; bottom: 86px; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 3;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 70px clamp(10px, 3vw, 40px) 40px;
  background: rgba(5, 3, 3, 0); backdrop-filter: blur(0px);
  transition: background .45s ease, backdrop-filter .45s ease;
}
.lightbox.open { background: rgba(5, 3, 3, .92); backdrop-filter: blur(10px); }
.lightbox[hidden] { display: none; }
.lb-figure { display: grid; justify-items: center; gap: 14px; min-width: 0; }
.lb-figure img {
  max-width: 100%; max-height: calc(100vh - 180px); border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 200, 97, .12);
  will-change: transform, opacity;
}
.lb-figure figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--ink-dim); text-align: center; transition: opacity .3s; }
.lb-count { color: #ffc861; margin-right: 10px; }
.lb-btn, .lb-close {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 200, 97, .3); font-size: 1rem;
  opacity: 0; transform: scale(.85);
  transition: background .3s, color .3s, opacity .4s ease .15s, transform .5s var(--ease-out) .15s;
}
.lightbox.open .lb-btn, .lightbox.open .lb-close { opacity: 1; transform: none; }
.lb-btn:hover { background: #ffc861; color: #120807; }
.lb-close { position: absolute; top: 80px; right: clamp(10px, 3vw, 40px); }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 1fr; padding-inline: 12px; }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
}

/* =========================================================
   SNOW RUN — ski mini-game (js/skigame.js)
   ========================================================= */
.ski {
  position: fixed; inset: 0; z-index: 44; overflow: hidden;
  background: #f6eef2;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s .7s;
}
body[data-page="ski"]:not(.in-transit) .ski { opacity: 1; visibility: visible; transition: opacity 1s ease .1s; }
.ski::after {             /* white snow flash as you arrive */
  content: ''; position: absolute; inset: 0; pointer-events: none; background: #fff; opacity: 0;
}
body[data-page="ski"]:not(.in-transit) .ski::after { animation: ski-flash 1.1s ease-out; }
@keyframes ski-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.ski-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.ski-hud {
  position: absolute; top: clamp(84px, 11vh, 110px); left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; gap: clamp(16px, 4vw, 44px); padding: 10px 22px; border-radius: 999px;
  background: rgba(29, 24, 52, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .18); color: #fff; pointer-events: none;
  font-family: var(--mono); white-space: nowrap;
}
.ski-hud div { display: flex; align-items: baseline; gap: 8px; }
.ski-hud b { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; min-width: 2ch; }
.ski-hud small { font-size: .62rem; opacity: .7; }
.ski-label { font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }

.ski-toast {
  position: absolute; top: 28%; left: 50%; z-index: 2; transform: translate(-50%, 0);
  font-family: var(--serif); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.6rem); color: #c8372a;
  text-shadow: 0 2px 0 #fff, 0 6px 24px rgba(200, 55, 42, .35); pointer-events: none; opacity: 0;
}
.ski-toast.pop { animation: ski-toast .9s ease-out; }
@keyframes ski-toast { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1); } }

.ski-panel {
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); z-index: 3;
  width: min(460px, calc(100% - 32px)); padding: clamp(22px, 4vw, 36px);
  border-radius: 20px; text-align: left;
  background: rgba(24, 20, 44, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 30px 80px -30px rgba(20, 10, 40, .6);
  color: var(--ink);
}
.ski-panel[hidden] { display: none; }
.ski-panel .section-title { font-size: clamp(2rem, 6vw, 3rem); margin-top: 10px; }
.ski-text { margin-top: 14px; color: var(--ink-dim); font-size: .95rem; }
.ski-text b { color: var(--ink); }
.ski-keys { list-style: none; margin: 16px 0 22px; display: grid; gap: 8px; font-size: .82rem; color: var(--ink-dim); }
kbd {
  display: inline-block; margin-right: 4px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08);
  font-family: var(--mono); font-size: .68rem; color: var(--ink);
}
.ski-final { margin: 14px 0 22px; font-family: var(--mono); font-size: .9rem; color: var(--ink-dim); }
.ski-final b { font-family: var(--serif); font-size: 1.6rem; color: #ffc861; margin: 0 6px; }
.ski-go { background: #c8372a; border-color: #c8372a; color: #fff; }
.ski-go:hover { background: #fff; color: #c8372a; border-color: #fff; }
.ski-exit {
  display: inline-block; margin-left: 16px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.ski-exit:hover { color: var(--ink); }
.ski.ski-playing .ski-panel { display: none; }
.ski-touch { display: none; }
@media not all and (hover: hover) and (pointer: fine) {
  .ski-fine { display: none; }
  .ski-touch { display: list-item; }
}
@media (max-width: 560px) {
  .ski-hud { gap: 14px; padding: 8px 16px; }
  .ski-hud b { font-size: 1.1rem; }
  .ski-exit { display: block; margin: 16px 0 0; }
}

/* ---------- Titles: the cursor is a blade (letters split along the cursor's path) ---------- */
.bladeable .word { display: inline-block; white-space: nowrap; }
.home-ui .name { pointer-events: auto; }
.bladeable .ch { position: relative; display: inline-block; }
.ch-base { display: inline-block; }
.ch-half, .ch-blade { position: absolute; left: 0; top: 0; pointer-events: none; visibility: hidden; }
.ch-half { will-change: transform; }
.ch.cut .ch-base { visibility: hidden; }
.ch.cut .ch-half, .ch.cut .ch-blade { visibility: visible; }
.ch-blade {
  width: 0; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff 25%, #ffe6ee 50%, #fff 75%, transparent);
  box-shadow: 0 0 10px 2px rgba(255, 220, 230, .85), 0 0 22px 5px rgba(224, 87, 63, .35);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cloud, .crane, .crane path, .stars, .andon, #veil span, .iris-ring, .gallery::before { animation: none; }
}
