/* ==========================================================================
   YORU — sections: hero · featured · dividers · tunnel · collections ·
   midnight run · pocket · stack · latest · footer · next collection · 404
   ========================================================================== */
:root {
  --paper-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .07 0 0 0 0 .06 0 0 0 .42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fiber-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .6' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .92 0 0 0 0 .9 0 0 0 0 .85 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; background: var(--bg-0); }
.hero__scene { position: absolute; inset: 0; z-index: 0; }
.hero__layer { position: absolute; inset: -5%; will-change: transform; }
.hero__layer img { width: 100%; height: 100%; object-fit: cover; }
.hero__layer--background { z-index: 1; }
.hero__layer--midground { z-index: 2; }
.hero__type { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: clamp(120px, 20vh, 220px); display: flex; align-items: flex-start; gap: clamp(10px, 1.4vw, 24px); will-change: transform; pointer-events: none; }
.hero__layer--foreground { z-index: 4; }
.hero__word { font-weight: 900; font-stretch: 112%; font-size: clamp(44px, 11vw, 190px); line-height: .82; letter-spacing: -.045em; color: var(--ivory); }
.hero__letters { display: flex; }
.hero__letters span { display: inline-block; transform: translateY(104%); opacity: 0; transition: transform 1.5s var(--ease-out), opacity 1.1s var(--ease-out); }
.hero__letters span:nth-child(2) { transition-delay: .07s; }
.hero__letters span:nth-child(3) { transition-delay: .14s; }
.hero__letters span:nth-child(4) { transition-delay: .21s; }
.hero__letters span:nth-child(5) { transition-delay: .28s; }
.hero__letters span:nth-child(6) { transition-delay: .35s; }
.hero__letters span:nth-child(7) { transition-delay: .42s; }
.hero__letters span:nth-child(8) { transition-delay: .49s; }
.is-loaded .hero__letters span { transform: none; opacity: 1; }
.hero__jp { display: flex; flex-direction: column; gap: .34em; margin-top: .5em; padding: .5em 0 0 .7em; border-left: 1px solid var(--red); font-family: var(--f-serif); font-weight: 500; font-size: clamp(13px, 1.35vw, 20px); line-height: 1; color: var(--ivory-80); opacity: 0; transition: opacity 1.2s .7s var(--ease-out); }
.is-loaded .hero__jp { opacity: 1; }
.hero__shade { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: linear-gradient(180deg, rgba(8, 8, 8, .58) 0%, rgba(8, 8, 8, 0) 22%, rgba(8, 8, 8, 0) 56%, rgba(8, 8, 8, .92) 100%); }
.terminal-bg--hero { z-index: 6; --t-o: .05; }
.hero__ui { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.hero__ui a, .hero__ui button { pointer-events: auto; }
.hero__top { position: absolute; top: calc(var(--nav-h) + 16px); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; gap: 16px; font-size: 10px; color: var(--ivory-60); }
.hero__top b { color: var(--ivory); font-weight: 400; }
.hero__side { position: absolute; right: calc(var(--gutter) * .45); top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; display: flex; gap: 18px; font-size: 9px; color: var(--ivory-40); }
.hero__bottom { position: absolute; left: var(--gutter); bottom: clamp(40px, 7vh, 84px); }
.hero__sub { font-size: clamp(11px, 1vw, 13px); letter-spacing: .44em; color: var(--ivory-80); }
.hero__intro { max-width: 30em; margin-top: 12px; font-size: clamp(13px, 1.1vw, 16px); color: var(--ivory-80); }
.hero__cta { display: inline-flex; align-items: center; gap: 14px; margin-top: 22px; min-height: 48px; padding: 14px 20px; border: 1px solid var(--ivory); background: var(--ivory); color: var(--bg-0); letter-spacing: .2em; transition: border-color .4s, background-color .4s, gap .5s var(--ease-out); }
.hero__cta span { color: var(--red); }
.hero__cta:hover { border-color: var(--red); background: var(--red); color: var(--ivory); gap: 22px; }
.hero__cta:hover span { color: var(--ivory); }
.hero__cta:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.hero__file { position: absolute; right: var(--gutter); bottom: clamp(40px, 7vh, 84px); text-align: right; font-size: 10px; color: var(--ivory-60); line-height: 1.9; }
.hero__scroll { --sp: 0; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 9px; color: var(--ivory-60); opacity: calc(1 - var(--sp)); }
.hero__scroll i { display: block; width: 1px; height: 46px; background: var(--red); transform-origin: top; transform: scaleY(calc(1 - var(--sp))); box-shadow: 0 0 8px rgba(210, 33, 46, .6); }

/* ---------- featured ---------- */
.featured { position: relative; padding: clamp(120px, 18vh, 220px) var(--gutter) clamp(120px, 16vh, 200px); overflow: hidden; isolation: isolate; background: var(--bg-0); }
.featured__ghost { position: absolute; left: -2vw; top: 32%; z-index: 0; white-space: nowrap; font-weight: 900; font-stretch: 125%; font-size: clamp(110px, 19vw, 330px); line-height: .8; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px rgba(234, 229, 218, .05); pointer-events: none; will-change: transform; }
.featured__head { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; pointer-events: none; }
.featured__title { display: flex; flex-direction: column; font-weight: 900; font-stretch: 118%; font-size: clamp(64px, 12.5vw, 220px); line-height: .82; letter-spacing: -.035em; }
.featured__outline { margin-left: clamp(40px, 14vw, 260px); will-change: transform; }
.featured__lead { position: relative; z-index: 1; max-width: var(--max); margin: clamp(-120px, -7vw, -40px) auto 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); align-items: end; }
.featured__leadcard { grid-column: 5 / span 8; grid-row: 1; }
.featured__leadmeta { grid-column: 1 / span 3; grid-row: 1; align-self: end; padding-bottom: 48px; display: grid; gap: 4px; color: var(--ivory-60); }
.featured__leadtitle { margin-bottom: 8px; font-family: var(--f-display); font-weight: 800; font-size: clamp(22px, 2.2vw, 34px); letter-spacing: .02em; line-height: 1; color: var(--ivory); }
.featured__leadtitle b { color: var(--red); font-weight: 500; }
.featured__dl { justify-self: start; margin-top: 20px; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid var(--red); -webkit-backdrop-filter: none; backdrop-filter: none; }
.featured__dl:hover { background: none; color: var(--red); }
.featured__grid { margin-top: clamp(90px, 15vh, 170px); }

/* ---------- collection divider ---------- */
.divider {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr auto; column-gap: clamp(12px, 2vw, 32px);
  padding: calc(var(--nav-h) + 50px) var(--gutter) clamp(48px, 9vh, 110px); background: #060606;
}
.divider__outline { position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 2vw; font-weight: 900; font-stretch: 125%; font-size: clamp(100px, 22vw, 420px); line-height: .8; letter-spacing: -.05em; white-space: nowrap; pointer-events: none; will-change: transform; }
.divider__outline span { -webkit-text-stroke: 1px rgba(234, 229, 218, .055); }
.divider__outline span:nth-child(2) { align-self: flex-end; }
.divider__stage { grid-column: 4 / span 6; grid-row: 1 / span 2; z-index: 1; display: grid; place-items: center; perspective: 1200px; perspective-origin: 50% 40%; }
.divider__glyph { position: relative; font-family: var(--f-serif); font-weight: 800; font-size: clamp(170px, 28vw, 470px); line-height: 1; transform-style: preserve-3d; will-change: transform; opacity: 0; transition: opacity 1.6s var(--ease-out); }
.divider.is-in .divider__glyph { opacity: 1; }
.divider__face {
  position: relative; display: block; color: transparent;
  background: var(--paper-noise), linear-gradient(168deg, #f2ede3 0%, #e2dccf 52%, #cdc5b4 100%);
  -webkit-background-clip: text; background-clip: text;
}
.divider__depth {
  position: absolute; inset: 0; display: block; color: #2c2925; transform: translateZ(-1px);
  text-shadow: 1px 1px 0 #4a453e, 2px 2px 0 #433e38, 3px 3px 0 #3c3832, 4px 4px 0 #35312c, 5px 5px 0 #2f2b27, 6px 6px 0 #292622, 7px 7px 0 #24211e, 8px 8px 0 #1e1c19, 18px 28px 46px rgba(0, 0, 0, .72);
}
.divider.is-multi .divider__glyph { font-size: clamp(84px, 12vw, 200px); }
.divider.is-multi .divider__face, .divider.is-multi .divider__depth { display: flex; flex-direction: column; align-items: center; line-height: 1.02; }
.divider__info { grid-column: 1 / span 5; grid-row: 2; align-self: end; position: relative; z-index: 2; }
.divider__no { color: var(--red); letter-spacing: .32em; margin-bottom: 18px; }
.divider__title { display: flex; flex-direction: column; font-weight: 900; font-stretch: 112%; font-size: clamp(46px, 6.4vw, 112px); line-height: .86; letter-spacing: -.02em; }
.divider__quote { margin-top: 20px; font-family: var(--f-serif); font-size: clamp(15px, 1.35vw, 19px); color: var(--ivory-80); }
.divider__meta { grid-column: 10 / span 3; grid-row: 2; align-self: end; position: relative; z-index: 2; text-align: right; font-size: 10px; line-height: 1.9; color: var(--grey); }
.divider__link { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 26px); z-index: 3; padding: 8px 0; border-bottom: 1px solid var(--line-2); color: var(--ivory-60); transition: color .3s, border-color .3s; }
.divider__link:hover { color: var(--ivory); border-color: var(--red); }
.divider__link span { color: var(--red); }
.divider__info > *, .divider__meta { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.divider.is-in .divider__info > *, .divider.is-in .divider__meta { opacity: 1; transform: none; }
.divider.is-in .divider__info > :nth-child(2) { transition-delay: .12s; }
.divider.is-in .divider__info > :nth-child(3) { transition-delay: .24s; }
/* moods */
.divider--ronin, .divider--onna { background: #0a0908; }
.divider--ronin::after, .divider--onna::after, .mode-ronin::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--fiber-noise); opacity: .9; }
.divider--ronin .divider__title, .divider--onna .divider__title, .divider--paper .divider__title { font-family: var(--f-serif); font-weight: 700; font-stretch: 100%; letter-spacing: .1em; }
.divider--ronin .divider__glyph { transition-duration: 2.6s; }
.divider--neon .divider__face { background: var(--paper-noise), linear-gradient(168deg, #f3eee5, #d8d1c3 70%); -webkit-background-clip: text; background-clip: text; }
.divider--rain { background: #07080a; }
.divider--rain .divider__face { background: var(--paper-noise), linear-gradient(168deg, #e8e7e3, #c9cac7 70%); -webkit-background-clip: text; background-clip: text; }
.divider--paper { background: var(--paper); color: var(--ink); }
.divider--paper::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--paper-noise); opacity: .55; }
.divider--paper .divider__face { background: var(--paper-noise), linear-gradient(168deg, #e3303b, #c21d29 55%, #9c1420); -webkit-background-clip: text; background-clip: text; }
.divider--paper .divider__depth { color: #5c0c12; text-shadow: 1px 1px 0 #8a1219, 2px 2px 0 #7f1017, 3px 3px 0 #740f15, 4px 4px 0 #690d13, 5px 5px 0 #5e0b11, 6px 6px 0 #530a0f, 7px 7px 0 #48090d, 18px 26px 40px rgba(60, 20, 20, .32); }
.divider--paper .divider__outline span { -webkit-text-stroke-color: rgba(21, 18, 20, .08); }
.divider--paper .divider__quote { color: rgba(21, 18, 20, .75); }
.divider--paper .divider__meta, .divider--paper .divider__link { color: rgba(21, 18, 20, .6); }
.divider--paper .divider__link { border-color: rgba(21, 18, 20, .25); }
.divider--paper .terminal-bg { --t-o: .03; }
.divider--paper .tline { color: var(--ink); }

/* ---------- speed tunnel ---------- */
.tunnel { position: relative; height: 165vh; background: var(--bg-viewer); }
.tunnel__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.tunnel__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tunnel__title { position: relative; z-index: 2; text-align: center; opacity: 0; will-change: transform, opacity; }
.tunnel__kanji { margin: 10px 0 4px; font-family: var(--f-serif); font-weight: 800; font-size: clamp(64px, 9vw, 140px); line-height: 1; color: var(--red); }
.tunnel__name { display: flex; flex-direction: column; font-weight: 900; font-stretch: 62%; font-style: italic; font-size: clamp(64px, 11vw, 196px); line-height: .84; letter-spacing: -.005em; }
.tunnel__hud { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(26px, 5vh, 54px); z-index: 2; display: flex; justify-content: space-between; gap: 14px; color: var(--ivory-60); }
.tunnel__hud b { color: var(--red); font-weight: 500; }
.tunnel__link { top: calc(var(--nav-h) + 26px); }
.tunnel.is-static { height: auto; }
.tunnel.is-static .tunnel__sticky { position: relative; height: 100vh; }
.tunnel.is-static .tunnel__title { opacity: 1; }

/* ---------- collection galleries ---------- */
.colsec { position: relative; padding: clamp(70px, 12vh, 150px) var(--gutter) clamp(90px, 14vh, 170px); overflow: hidden; isolation: isolate; background: var(--bg-0); }
.colsec__head { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto clamp(40px, 7vh, 84px); display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--grey); }
.colsec__more { position: relative; z-index: 2; display: flex; justify-content: space-between; max-width: var(--max); margin: clamp(70px, 11vh, 130px) auto 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ivory-80); transition: color .3s, letter-spacing .6s var(--ease-out); }
.colsec__more span { color: var(--red); }
.colsec__more:hover { color: var(--ivory); letter-spacing: .2em; }

.archive-intro { max-width: var(--max); margin: 0 auto; padding: 64px var(--gutter); border-top: 1px solid var(--line); }
.archive-intro h2 { font-size: clamp(22px, 3vw, 38px); margin: 16px 0; }
.archive-intro p { max-width: 64ch; line-height: 1.8; color: var(--ivory-80); }
.archive-intro__faq { max-width: 760px; margin-top: 32px; }
.archive-intro details { padding: 18px 0; border-top: 1px solid var(--line); }
.archive-intro summary { cursor: pointer; font-size: 16px; }
.archive-intro details p { margin-top: 14px; }
.seo-static { max-width: var(--max); padding: 48px var(--gutter); margin: 0 auto; }
.seo-static h1 { font-size: clamp(30px, 5vw, 64px); margin: 40px 0 20px; }
.seo-static p { line-height: 1.8; margin: 12px 0; }
.seo-static nav { line-height: 2; padding: 18px 0; }
.seo-static-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; margin: 36px 0; }
.seo-card img { width: 100%; height: auto; display: block; }
.seo-card h2 { margin-top: 14px; }
.no-js .loader { display: none; }
.mode-ronin { background: #0a0908; }
.mode-ronin .wp-media { transition-duration: 2.2s, .9s, .9s; }
.mode-ronin .wp-img { transition-duration: 1.4s, 2.4s; }
.mode-ronin .wp-reveal, .mode-onna .wp-reveal { font-family: var(--f-serif); font-size: 12px; letter-spacing: .12em; }
.mode-onna { background: #090708; }
.mode-neon { background: #070608; }
.mode-rain { background: #07080a; }
.mode-paper { background: #0b0a09; }
/* red sun: deep, slow */
.redsun { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.redsun__disc {
  position: absolute; left: 50%; top: 50%; width: min(80vw, 940px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #9a1b24 0%, #741119 58%, #4b0a10 100%);
  opacity: .5; box-shadow: 0 0 180px rgba(164, 17, 28, .32); transform: translate3d(-50%, -50%, 0); will-change: transform;
}
.colsec--redsun .wgrid { will-change: transform; }

/* ---------- midnight run ---------- */
.run { position: relative; background: #070606; }
.run__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.run__bgtype { position: absolute; left: 0; top: 50%; z-index: 0; display: flex; gap: .25em; padding-left: 3vw; margin-top: -.52em; white-space: nowrap; font-weight: 900; font-stretch: 62%; font-style: italic; font-size: clamp(170px, 34vw, 640px); line-height: 1; letter-spacing: -.01em; pointer-events: none; will-change: transform; }
.run__bgtype span { -webkit-text-stroke-color: rgba(210, 33, 46, .2); }
.run__telemetry { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 18px); z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--grey); }
.run__telemetry b { color: var(--red); font-weight: 500; }
.run__track { position: relative; z-index: 2; display: flex; align-items: center; gap: clamp(40px, 6vw, 110px); padding: 0 var(--gutter) 0 clamp(16px, 28vw, 520px); will-change: transform; }
.run .wp-card--run { flex: 0 0 auto; width: var(--rw); }
.wp-card__meta--run { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 14px; }
.wp-card__big { font-family: var(--f-display); font-weight: 900; font-stretch: 62%; font-style: italic; font-size: clamp(30px, 3.4vw, 58px); line-height: .9; letter-spacing: 0; text-transform: uppercase; color: var(--ivory); }
.mode-run .wp-media { transition-duration: .8s, .5s, .5s; clip-path: inset(0 100% 0 0); }
.mode-run .wp-card.is-in .wp-media { clip-path: inset(0 0 0 0); }
.mode-run .wp-img { transition-duration: .5s, .9s; }
.run__end { flex: 0 0 auto; align-self: center; padding: 28px 30px; border: 1px solid var(--line-2); line-height: 2; color: var(--ivory-80); transition: border-color .3s, color .3s; }
.run__end:hover { border-color: var(--red); color: var(--ivory); }
.run__progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(26px, 5vh, 54px); z-index: 3; display: flex; align-items: center; gap: 18px; color: var(--grey); }
.run__bar { position: relative; flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.run__bar i { position: absolute; inset: 0; background: var(--red); transform-origin: left; transform: scaleX(0); }
.run.is-static .run__sticky { position: relative; height: auto; padding: 140px 0 110px; overflow: visible; }
.run.is-static .run__track { overflow-x: auto; padding-bottom: 24px; padding-left: var(--gutter); scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
.run.is-static .wp-card--run { scroll-snap-align: start; }
.run.is-static .run__bgtype, .run.is-static .run__progress { display: none; }

/* ---------- pocket (mobile carousel) ---------- */
.pocket { position: relative; padding: clamp(110px, 16vh, 190px) 0 clamp(80px, 12vh, 150px); overflow: hidden; isolation: isolate; background: var(--bg-1); }
.pocket__head { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto clamp(30px, 5vh, 60px); padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.pocket__title { font-weight: 900; font-stretch: 112%; font-size: clamp(54px, 9vw, 160px); line-height: .86; letter-spacing: -.03em; }
.pocket__title > span:first-child { display: block; }
.pocket__jp { font-family: var(--f-serif); font-weight: 700; font-size: .3em; color: var(--red); vertical-align: top; letter-spacing: 0; margin-left: .3em; }
.pocket__ctrl { display: flex; align-items: center; gap: 8px; }
.pocket__count { margin-right: 14px; color: var(--grey); }
.pocket__count b { color: var(--ivory); font-weight: 500; }
.pocket__rail { --pw: clamp(210px, 19vw, 300px); position: relative; z-index: 1; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 34px calc(50vw - var(--pw) / 2) 50px; outline: none; }
.pocket__rail::-webkit-scrollbar { display: none; }
.pocket__rail.is-dragging { scroll-snap-type: none; }
.pocket__rail.is-dragging .wp-card { pointer-events: none; }
.pocket__track { display: flex; width: max-content; }
.pocket__card { flex: 0 0 var(--pw); width: var(--pw); scroll-snap-align: center; transform-origin: 50% 50%; will-change: transform; }
.pocket__card + .pocket__card { margin-left: calc(var(--pw) * -.06); }
.pocket__card .wp-media { border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 34px 70px rgba(0, 0, 0, .55); }
.pocket__card:not(.is-center) .wp-media { filter: brightness(.6) saturate(.85); }
.pocket__card .wp-card__meta { justify-content: center; opacity: 0; transition: opacity .4s; }
.pocket__card.is-center .wp-card__meta { opacity: 1; }
.pocket__card .wp-card__meta .dim:last-child { margin-left: 0; }

/* ---------- archive stack ---------- */
.stack { position: relative; min-height: 100vh; padding: clamp(120px, 16vh, 200px) var(--gutter); overflow: hidden; isolation: isolate; background: var(--bg-0); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: clamp(12px, 2vw, 32px); align-content: center; }
.stack__head { grid-column: 1 / span 5; grid-row: 1; align-self: end; position: relative; z-index: 2; }
.stack__title { display: flex; flex-direction: column; font-weight: 900; font-stretch: 118%; font-size: clamp(56px, 10vw, 180px); line-height: .84; letter-spacing: -.03em; }
.stack__count { margin-top: 24px; color: var(--grey); }
.stack__cta { grid-column: 1 / span 5; grid-row: 2; align-self: start; justify-self: start; position: relative; z-index: 2; margin-top: 30px; padding: 12px 0; border-bottom: 1px solid var(--red); letter-spacing: .3em; transition: gap .5s, color .3s; display: inline-flex; gap: 14px; }
.stack__cta span { color: var(--red); }
.stack__cta:hover { gap: 22px; }
.stack__scene { grid-column: 6 / span 7; grid-row: 1 / span 2; position: relative; z-index: 1; height: clamp(380px, 66vh, 660px); perspective: 1200px; }
.stack__pile { position: absolute; inset: 0; transform-style: preserve-3d; }
.stack__card {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(clamp(170px, 21vw, 340px), calc(clamp(230px, 46vh, 470px) * var(--ar)));
  aspect-ratio: var(--ar); background: var(--c, var(--bg-2)); outline: 1px solid rgba(234, 229, 218, .08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .62); will-change: transform; overflow: hidden;
}
.stack__card img { width: 100%; height: 100%; object-fit: cover; }
.stack__label { position: absolute; left: 8px; bottom: 6px; font-size: 8.5px; color: var(--ivory-80); text-shadow: 0 1px 6px #000; }

/* ---------- latest additions ---------- */
.latest { position: relative; padding: clamp(110px, 16vh, 200px) var(--gutter); overflow: hidden; isolation: isolate; background: var(--bg-0); }
.latest__head { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto clamp(40px, 7vh, 84px); pointer-events: none; }
.latest__title { display: flex; flex-direction: column; font-weight: 900; font-stretch: 112%; font-size: clamp(54px, 9vw, 160px); line-height: .84; letter-spacing: -.03em; }
.latest__list { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); }
.latest__row { display: grid; grid-template-columns: 72px minmax(0, 2fr) 1fr 1.3fr 110px 30px; align-items: center; gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease-out), color .3s, opacity .3s; }
.latest__thumb { position: relative; width: 72px; height: 46px; overflow: hidden; background: var(--c, var(--bg-2)); }
.latest__thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest__name { font-weight: 800; font-stretch: 110%; font-size: clamp(20px, 2.4vw, 38px); line-height: 1; letter-spacing: -.01em; text-transform: uppercase; }
.latest__id { color: var(--ivory-60); }
.latest__col, .latest__date { color: var(--grey); }
.latest__arrow { color: var(--red); opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .45s var(--ease-out); }
.latest__row:hover, .latest__row:focus-visible { padding-left: 18px; }
.latest__row:hover .latest__arrow, .latest__row:focus-visible .latest__arrow { opacity: 1; transform: none; }
.has-pointer .latest__list:hover .latest__row:not(:hover) { opacity: .4; }
.latest__preview { position: absolute; left: 0; top: 0; z-index: 1; width: min(clamp(280px, 34vw, 560px), calc(56vh * var(--ar, 1.6))); aspect-ratio: var(--ar, 1.6); pointer-events: none; opacity: 0; transition: opacity .3s var(--ease-out); will-change: transform; }
.latest__preview.is-on { opacity: 1; }
.latest__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(.96); transition: opacity .32s var(--ease-out), transform .7s var(--ease-out); }
.latest__preview img.is-front { opacity: .6; transform: scale(1); }

/* ---------- footer ---------- */
.footer { position: relative; overflow: hidden; isolation: isolate; padding: clamp(150px, 30vh, 320px) var(--gutter) calc(34px + env(safe-area-inset-bottom)); background: #040404; border-top: 1px solid var(--line); }
.footer__kanji { position: absolute; left: 50%; top: 46%; z-index: 0; transform: translate(-50%, -50%); font-family: var(--f-serif); font-weight: 800; font-size: clamp(300px, 58vw, 900px); line-height: 1; color: rgba(234, 229, 218, .035); pointer-events: none; }
.footer__grid { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.footer__id p { margin-bottom: 6px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer__links a, .footer__links button { color: var(--ivory-60); transition: color .3s; }
.footer__links a:hover, .footer__links button:hover { color: var(--red); }
.footer__bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 30px; flex-wrap: wrap; margin-top: clamp(80px, 14vh, 160px); }
.footer__end { font-size: clamp(14px, 2vw, 22px); letter-spacing: .24em; color: var(--ivory); }

/* ---------- next collection ---------- */
.nextcol { position: relative; overflow: hidden; padding: clamp(80px, 12vh, 140px) var(--gutter); display: grid; grid-template-columns: 1fr auto; gap: 30px 40px; border-top: 1px solid var(--line); background: var(--bg-0); }
.nextcol__prev { color: var(--grey); transition: color .3s; }
.nextcol__prev:hover { color: var(--ivory); }
.nextcol__all { grid-column: 2; grid-row: 1; color: var(--ivory-60); transition: color .3s; }
.nextcol__all:hover { color: var(--red); }
.nextcol__next { grid-column: 1 / -1; position: relative; display: grid; gap: 10px; }
.nextcol__next .mono { color: var(--red); }
.nextcol__name { font-weight: 900; font-stretch: 118%; font-size: clamp(48px, 9vw, 160px); line-height: .86; letter-spacing: -.03em; transition: color .4s; }
.nextcol__name span { color: var(--red); }
.nextcol__next:hover .nextcol__name { color: var(--red); }
.nextcol__jp { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--f-serif); font-weight: 800; font-size: clamp(90px, 14vw, 240px); line-height: 1; color: rgba(234, 229, 218, .06); pointer-events: none; }

/* ---------- error pages (404, 403, 401, 500…) ---------- */
.errpage {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; background: #060606;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr auto; column-gap: clamp(12px, 2vw, 32px);
  padding: calc(var(--nav-h) + 60px) var(--gutter) clamp(48px, 9vh, 110px);
}
.errpage__code {
  position: absolute; left: -1vw; bottom: -6vh; z-index: 0; pointer-events: none; white-space: nowrap;
  font-weight: 900; font-stretch: 125%; font-size: clamp(200px, 42vw, 760px); line-height: .78; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(234, 229, 218, .07);
}
.errpage__kanji { grid-column: 7 / span 6; grid-row: 1 / span 2; z-index: 1; align-self: center; justify-self: center; position: relative; font-family: var(--f-serif); font-weight: 800; font-size: clamp(170px, 27vw, 440px); line-height: 1; transform: perspective(1200px) rotateX(6deg) rotateY(-5deg); animation: err-settle 2.2s var(--ease-out) both; }
@keyframes err-settle { from { opacity: 0; transform: perspective(1200px) rotateX(11deg) rotateY(-9deg) translateY(30px); } to { opacity: 1; transform: perspective(1200px) rotateX(6deg) rotateY(-5deg); } }
.errpage__kanji .divider__face { position: relative; }
.errpage__info { grid-column: 1 / span 6; grid-row: 2; z-index: 2; position: relative; }
.errpage__title { display: flex; flex-direction: column; margin: 6px 0 24px; font-weight: 900; font-stretch: 118%; font-size: clamp(54px, 8.4vw, 150px); line-height: .84; letter-spacing: -.03em; }
.errpage__title .is-outline { color: transparent; -webkit-text-stroke: 1px var(--ivory-60); }
.errpage__msg { max-width: 30em; margin-bottom: 10px; font-family: var(--f-serif); font-size: clamp(16px, 1.45vw, 21px); color: var(--ivory-80); }
.errpage__links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 38px; }
.errpage__links a, .errpage__links button { color: var(--ivory-80); border-bottom: 1px solid var(--line-2); padding: 8px 0; transition: color .3s, border-color .3s; }
.errpage__links a:hover, .errpage__links button:hover { color: var(--ivory); border-color: var(--red); }
.errpage__links [data-random], .errpage__links [data-reload] { color: var(--red); }
.errpage__log { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 26px); z-index: 2; text-align: right; color: var(--grey); font-size: 10px; line-height: 1.9; }
/* tone per family: client errors red ink, server errors amber, offline grey */
.view--error[data-error^="5"] .divider__face { background: var(--paper-noise), linear-gradient(168deg, #d9b47a, #b58a45 55%, #7d5d2c); -webkit-background-clip: text; background-clip: text; }
.view--error[data-error^="5"] .divider__depth { color: #3a2a12; text-shadow: 1px 1px 0 #5c4320, 2px 2px 0 #533c1c, 3px 3px 0 #4a3519, 4px 4px 0 #412f16, 5px 5px 0 #382813, 6px 6px 0 #2f2210, 18px 28px 46px rgba(0, 0, 0, .7); }
.view--error[data-error^="5"] .red { color: var(--amber); }
.view--error[data-error="403"] .divider__face, .view--error[data-error="401"] .divider__face { background: var(--paper-noise), linear-gradient(168deg, #e3303b, #c21d29 55%, #8f121c); -webkit-background-clip: text; background-clip: text; }
.view--error[data-error="403"] .divider__depth, .view--error[data-error="401"] .divider__depth { color: #4a0a10; text-shadow: 1px 1px 0 #7a1118, 2px 2px 0 #6e0f15, 3px 3px 0 #620d13, 4px 4px 0 #560b10, 5px 5px 0 #4a0a0e, 6px 6px 0 #3e080c, 18px 28px 46px rgba(0, 0, 0, .72); }
.view--error[data-error="offline"] .divider__face { background: var(--paper-noise), linear-gradient(168deg, #9a978f, #686868 60%); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 900px) {
  .errpage { grid-template-rows: auto auto; align-content: end; }
  .errpage__kanji { grid-column: 1 / -1; grid-row: 1; font-size: clamp(150px, 46vw, 300px); margin-bottom: 10px; }
  .errpage__info { grid-column: 1 / -1; grid-row: 2; }
  .errpage__log { display: none; }
}
.is-reduced .errpage__kanji { animation: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .featured__leadcard { grid-column: 4 / span 9; }
  .featured__leadmeta { grid-column: 1 / span 3; }
  .latest__row { grid-template-columns: 64px minmax(0, 2fr) 1fr 100px 26px; }
  .latest__col { display: none; }
}
@media (max-width: 900px) {
  .featured__lead { display: block; margin-top: 36px; }
  .featured__leadmeta { padding: 22px 0 0; }
  .divider { grid-template-rows: 1fr auto auto; }
  .divider__stage { grid-column: 1 / -1; grid-row: 1; }
  .divider__info { grid-column: 1 / -1; grid-row: 2; }
  .divider__meta { grid-column: 1 / -1; grid-row: 3; text-align: left; margin-top: 18px; }
  .divider__link { top: auto; bottom: clamp(48px, 9vh, 110px); }
  .stack { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .stack__head, .stack__cta { grid-column: 1; }
  .stack__head { grid-row: 1; }
  .stack__scene { grid-column: 1; grid-row: 2; height: clamp(320px, 52vh, 520px); margin-top: 20px; }
  .stack__cta { grid-row: 3; }
  .hero__side { display: none; }
}
@media (max-width: 760px) {
  .hero__type { flex-direction: column; gap: 14px; bottom: clamp(150px, 24vh, 220px); }
  .hero__jp { flex-direction: row; gap: .6em; border-left: 0; border-top: 1px solid var(--red); padding: .6em 0 0; margin-top: 0; }
  .hero__top span:nth-child(2) { display: none; }
  .hero__file, .hero__scroll { display: none; }
  .hero__sub { letter-spacing: .3em; }
  .tunnel__hud span:nth-child(2) { display: none; }
  .run__telemetry span:nth-child(3), .run__telemetry span:nth-child(5) { display: none; }
  .run__track { padding-left: var(--gutter); gap: 28px; }
  .pocket__rail { --pw: 62vw; }
  .pocket__head { flex-direction: column; align-items: flex-start; }
  .latest__row { grid-template-columns: 58px minmax(0, 1fr) 22px; gap: 14px; padding: 12px 0; }
  .latest__thumb { width: 58px; height: 40px; }
  .latest__id, .latest__date { display: none; }
  .latest__arrow { opacity: 1; transform: none; }
  .latest__preview { display: none; }
  .nextcol { grid-template-columns: 1fr; }
  .nextcol__all { grid-column: 1; grid-row: auto; }
  .divider__link { position: relative; right: auto; bottom: auto; grid-column: 1 / -1; grid-row: 4; justify-self: start; margin-top: 22px; }
}

/* ---------- reduced motion ---------- */
.is-reduced .hero__letters span, .is-reduced .hero__jp { transition-duration: .3s; transition-delay: 0s; }
.is-reduced .wp-media { clip-path: none !important; transition: filter .3s, opacity .3s; }
.is-reduced .divider__glyph { transition-duration: .4s; }
