@charset "UTF-8";
/* ============================================================
   WEBMARKS WORLD — moving first view
   direction: ミニマルテック × クラフト感のある3Dワールド
   signature: 5章を一続きに巡るスクロール劇場
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --color-bg: #f6f8fc;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-solid: #ffffff;
  --color-text: #13213a;
  --color-muted: #52627b;
  --color-line: rgba(38, 61, 96, 0.14);
  --color-line-strong: rgba(38, 61, 96, 0.26);
  --color-dark: #101a2e;
  --color-light: #ffffff;
  --scene-accent: #2865d9;
  --scene-accent-rgb: 40, 101, 217;

  --font-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Manrope", "Noto Sans JP", sans-serif;

  --space: 8px;
  --radius-pill: 999px;
  --radius-panel: 28px;
  --header-height: 72px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --duration-fast: 0.28s;
  --duration-base: 0.72s;

  --z-visual: 10;
  --z-overlay: 20;
  --z-content: 30;
  --z-header: 100;
  --z-control: 200;
}

/* ---------- 2. Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  min-width: 320px;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.025em;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ol,
ul {
  list-style: none;
  padding: 0;
}

::selection {
  color: var(--color-light);
  background: var(--scene-accent);
}

:focus-visible {
  outline: 3px solid var(--scene-accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: calc(var(--z-control) + 10);
  padding: 10px 16px;
  color: var(--color-light);
  background: var(--color-dark);
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus {
  transform: none;
}

/* ---------- 3. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: var(--header-height);
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    10px
    max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

.site-header__brand,
.site-header__cta,
.chapter-nav {
  pointer-events: auto;
}

.site-header__brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

.site-header__preview {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  padding: 2px 7px;
  color: #ffffff;
  background: rgba(16, 26, 46, 0.82);
  border-radius: var(--radius-pill);
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-header__logo {
  width: clamp(116px, 24vw, 152px);
  height: auto;
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}

.site-header__wordmark {
  display: none;
  font-family: var(--font-en);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-header__brand.is-logo-missing .site-header__logo {
  display: none;
}

.site-header__brand.is-logo-missing .site-header__wordmark {
  display: inline;
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--color-light);
  background: var(--color-dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 28px rgba(16, 26, 46, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.chapter-nav {
  display: none;
}

/* ---------- 4. Scroll story ---------- */
.story {
  position: relative;
  height: 100svh;
  min-height: 600px;
  background: var(--color-bg);
}

html.is-enhanced:not(.is-static) .story {
  height: 500svh;
}

.story__sticky {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  overflow: clip;
  isolation: isolate;
  background: var(--color-bg);
}

html.is-enhanced:not(.is-static) .story__sticky {
  position: sticky;
  top: 0;
}

.story__visuals,
.story__scene,
.story__scene img,
.story__motion-field,
.story__transition-flare,
.story__veil,
.story__atmosphere {
  position: absolute;
  inset: 0;
}

.story__visuals {
  z-index: var(--z-visual);
  overflow: hidden;
  background: #e9eef7;
}

.story__scene {
  --scene-scale: 1.06;
  --scene-x: 0%;
  --scene-y: 0%;
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  transform: translateZ(0);
  background-color: #e6ecf5;
}

.story__scene[data-scene="0"] {
  background:
    radial-gradient(circle at 72% 42%, rgba(122, 174, 255, 0.9), transparent 28%),
    linear-gradient(140deg, #edf4ff 0%, #cbdcf7 56%, #e8f2fc 100%);
}

.story__scene[data-scene="1"] {
  background:
    radial-gradient(circle at 71% 42%, rgba(255, 183, 94, 0.8), transparent 30%),
    linear-gradient(140deg, #fff5e7 0%, #ebc997 58%, #d7e6fa 100%);
}

.story__scene[data-scene="2"] {
  background:
    radial-gradient(circle at 71% 42%, rgba(117, 142, 255, 0.84), transparent 29%),
    linear-gradient(140deg, #f2f1ff 0%, #b7c7f4 56%, #e9edf8 100%);
}

.story__scene[data-scene="3"] {
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 204, 115, 0.9), transparent 26%),
    linear-gradient(150deg, #effaff 0%, #b4dcf1 46%, #d9e5b6 100%);
}

.story__scene[data-scene="4"] {
  background:
    radial-gradient(circle at 70% 48%, rgba(134, 121, 255, 0.9), transparent 24%),
    linear-gradient(150deg, #f2efff 0%, #a8a2dc 50%, #e5b976 100%);
}

.story__scene.is-active {
  opacity: 1;
}

.story__scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-object-position, 63% 50%);
  transform: translate3d(var(--scene-x), var(--scene-y), 0) scale(var(--scene-scale));
  transform-origin: center;
  will-change: transform;
}

.story__scene::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 2;
  opacity: 0;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.28) 49%, transparent 60%);
  transform: translate3d(-48%, 0, 0) rotate(4deg);
  pointer-events: none;
}

.story__scene::before {
  content: "";
  position: absolute;
  inset: -2%;
  z-index: 1;
  opacity: 0;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-mask-image: radial-gradient(ellipse 34% 48% at 70% 53%, #000 0%, #000 46%, rgba(0, 0, 0, 0.82) 61%, transparent 79%);
  mask-image: radial-gradient(ellipse 34% 48% at 70% 53%, #000 0%, #000 46%, rgba(0, 0, 0, 0.82) 61%, transparent 79%);
  transform: translate3d(-0.4%, 0.5%, 0) scale(1.015);
  pointer-events: none;
  will-change: transform, opacity;
}

.story__scene[data-scene="0"]::before {
  background-image: url("../img/scenes/scene-01.webp");
  background-position: 63% 50%;
}

.story__scene[data-scene="1"]::before {
  background-image: url("../img/scenes/scene-02.webp");
  background-position: 66% 50%;
}

.story__scene[data-scene="2"]::before {
  background-image: url("../img/scenes/scene-03.webp");
  background-position: 64% 50%;
}

.story__scene[data-scene="3"]::before {
  background-image: url("../img/scenes/scene-04.webp");
  background-position: 61% 50%;
}

.story__scene[data-scene="4"]::before {
  background-image: url("../img/scenes/scene-05.webp");
  background-position: 64% 50%;
}

.story__scene.is-active::before {
  opacity: 0.9;
  animation: focusFloat 5.8s var(--ease-in-out-quart) infinite alternate;
}

.story__scene.is-active::after {
  animation: sceneGlint 7.6s var(--ease-in-out-quart) infinite;
}

.story__scene[data-scene="0"] img { --scene-object-position: 63% 50%; }
.story__scene[data-scene="1"] img { --scene-object-position: 66% 50%; }
.story__scene[data-scene="2"] img { --scene-object-position: 64% 50%; }
.story__scene[data-scene="3"] img { --scene-object-position: 61% 50%; }
.story__scene[data-scene="4"] img { --scene-object-position: 64% 50%; }

.story__motion-field {
  z-index: calc(var(--z-visual) + 4);
  overflow: hidden;
  opacity: 0.82;
  mix-blend-mode: screen;
  pointer-events: none;
}

.story__energy,
.story__orbit,
.story__tracer,
.story__beam {
  position: absolute;
  display: block;
  will-change: transform, opacity;
}

.story__energy {
  width: clamp(240px, 34vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--scene-accent-rgb), 0.42) 0%, rgba(var(--scene-accent-rgb), 0.14) 38%, transparent 70%);
  filter: blur(2px);
}

.story__energy--a {
  top: -14%;
  right: -4%;
  animation: energyFloatA 8.5s ease-in-out infinite alternate;
}

.story__energy--b {
  right: 20%;
  bottom: -30%;
  width: clamp(190px, 28vw, 440px);
  opacity: 0.66;
  animation: energyFloatB 10.5s ease-in-out infinite alternate;
}

.story__orbit {
  top: 50%;
  left: 72%;
  width: clamp(270px, 43vw, 660px);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--scene-accent-rgb), 0.34);
  border-radius: 50%;
  box-shadow:
    0 0 46px rgba(var(--scene-accent-rgb), 0.12),
    inset 0 0 36px rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
}

.story__orbit::before,
.story__orbit::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 18px 6px rgba(var(--scene-accent-rgb), 0.72);
}

.story__orbit::before {
  top: 8%;
  left: 26%;
}

.story__orbit::after {
  right: 10%;
  bottom: 28%;
}

.story__orbit--outer {
  animation: orbitSpin 18s linear infinite;
}

.story__orbit--inner {
  width: clamp(180px, 29vw, 440px);
  border-style: dashed;
  opacity: 0.72;
  animation: orbitSpinReverse 13s linear infinite;
}

.story__tracer {
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 18px 6px rgba(var(--scene-accent-rgb), 0.7),
    -40px 0 28px rgba(var(--scene-accent-rgb), 0.18);
}

.story__tracer--a {
  top: 18%;
  left: 58%;
  animation: tracerPathA 7.2s var(--ease-in-out-quart) infinite;
}

.story__tracer--b {
  right: 8%;
  bottom: 20%;
  width: 6px;
  height: 6px;
  opacity: 0.74;
  animation: tracerPathB 9.4s var(--ease-in-out-quart) infinite reverse;
}

.story__beam {
  top: 50%;
  left: 48%;
  width: 58vw;
  height: 2px;
  opacity: 0.34;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), rgba(var(--scene-accent-rgb), 0.72), transparent);
  box-shadow: 0 0 18px rgba(var(--scene-accent-rgb), 0.38);
  transform: translate3d(-12%, 0, 0) rotate(-18deg) scaleX(0.72);
  transform-origin: left center;
  animation: beamSweep 6.8s var(--ease-in-out-quart) infinite;
}

.story__transition-flare {
  --transition-energy: 0;
  z-index: calc(var(--z-overlay) - 1);
  opacity: calc(var(--transition-energy) * 0.78);
  background:
    radial-gradient(circle at 69% 48%, rgba(255, 255, 255, 0.92) 0%, rgba(var(--scene-accent-rgb), 0.46) 12%, transparent 37%);
  transform: scale(calc(0.82 + var(--transition-energy) * 0.22));
  will-change: transform, opacity;
  pointer-events: none;
}

@keyframes sceneGlint {
  0%, 62% { opacity: 0; transform: translate3d(-48%, 0, 0) rotate(4deg); }
  72% { opacity: 0.5; }
  88%, 100% { opacity: 0; transform: translate3d(48%, 0, 0) rotate(4deg); }
}

@keyframes focusFloat {
  0% { transform: translate3d(-0.5%, 0.7%, 0) scale(1.015); }
  45% { transform: translate3d(0.25%, -0.35%, 0) scale(1.025); }
  100% { transform: translate3d(0.8%, -0.8%, 0) scale(1.038); }
}

@keyframes energyFloatA {
  0% { opacity: 0.48; transform: translate3d(0, -3%, 0) scale(0.92); }
  100% { opacity: 0.82; transform: translate3d(-10%, 9%, 0) scale(1.12); }
}

@keyframes energyFloatB {
  0% { opacity: 0.36; transform: translate3d(-6%, 8%, 0) scale(1.08); }
  100% { opacity: 0.72; transform: translate3d(10%, -10%, 0) scale(0.9); }
}

@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(0.96); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.04); }
  to { transform: translate(-50%, -50%) rotate(360deg) scale(0.96); }
}

@keyframes orbitSpinReverse {
  from { transform: translate(-50%, -50%) rotate(360deg) scale(1.04); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(0.94); }
  to { transform: translate(-50%, -50%) rotate(0deg) scale(1.04); }
}

@keyframes tracerPathA {
  0%, 100% { opacity: 0.2; transform: translate3d(-4vw, 5vh, 0) scale(0.7); }
  35% { opacity: 1; transform: translate3d(17vw, -8vh, 0) scale(1.15); }
  70% { opacity: 0.58; transform: translate3d(27vw, 20vh, 0) scale(0.86); }
}

@keyframes tracerPathB {
  0%, 100% { opacity: 0.16; transform: translate3d(4vw, -4vh, 0); }
  45% { opacity: 0.86; transform: translate3d(-23vw, -20vh, 0) scale(1.3); }
  78% { opacity: 0.46; transform: translate3d(-30vw, 8vh, 0) scale(0.8); }
}

@keyframes beamSweep {
  0%, 100% { opacity: 0; transform: translate3d(-16%, 12vh, 0) rotate(-21deg) scaleX(0.55); }
  26% { opacity: 0.5; }
  58% { opacity: 0.22; transform: translate3d(4%, -12vh, 0) rotate(-13deg) scaleX(1.05); }
  76% { opacity: 0; }
}

.story__scene.is-placeholder::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 50%;
  left: 68%;
  z-index: 2;
  width: min(68vw, 420px);
  padding: 18px 22px;
  color: rgba(19, 33, 58, 0.58);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  font-size: clamp(0.74rem, 2vw, 0.9rem);
  font-weight: 600;
  text-align: center;
  transform: translate(-50%, -50%);
}

.story__scene img[hidden] {
  display: none;
}

.story__veil {
  z-index: var(--z-overlay);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 249, 253, 0.12) 0%, rgba(247, 249, 253, 0.08) 28%, rgba(247, 249, 253, 0.72) 53%, #f7f9fd 83%),
    linear-gradient(90deg, rgba(247, 249, 253, 0.2), transparent 72%);
}

.story__atmosphere {
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(circle at 86% 18%, rgba(var(--scene-accent-rgb), 0.2), transparent 25%),
    radial-gradient(circle at 68% 80%, rgba(255, 255, 255, 0.35), transparent 30%);
  mix-blend-mode: soft-light;
  transition: background var(--duration-base) var(--ease-out-expo);
  animation: atmosphereDrift 11s ease-in-out infinite alternate;
}

@keyframes atmosphereDrift {
  0% { opacity: 0.38; transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  100% { opacity: 0.68; transform: translate3d(1.5%, 1.2%, 0) scale(1.08); }
}

.story__progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: calc(var(--z-header) + 1);
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.story__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--scene-accent);
  box-shadow: 0 0 16px rgba(var(--scene-accent-rgb), 0.55);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* ---------- 5. Hero copy ---------- */
.story__content {
  position: absolute;
  inset: 0;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding:
    calc(var(--header-height) + 30px)
    max(20px, env(safe-area-inset-right))
    calc(124px + env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  pointer-events: none;
}

.story__content a {
  pointer-events: auto;
}

.story__overline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--scene-accent);
  font-family: var(--font-en);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  transition: color var(--duration-fast);
}

.story__overline-line {
  width: 26px;
  height: 1px;
  flex: none;
  background: currentColor;
}

.story__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 3px 8px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
}

.story__live i {
  width: 6px;
  height: 6px;
  background: var(--scene-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--scene-accent-rgb), 0.4);
  animation: livePulse 1.8s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--scene-accent-rgb), 0.42); transform: scale(0.88); }
  70% { box-shadow: 0 0 0 8px rgba(var(--scene-accent-rgb), 0); transform: scale(1.12); }
  100% { box-shadow: 0 0 0 0 rgba(var(--scene-accent-rgb), 0); transform: scale(0.88); }
}

.story__title {
  max-width: 12em;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.15rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: 0.025em;
  word-break: keep-all;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(255, 255, 255, 0.52);
}

.story__title span {
  display: block;
}

.story__chapters {
  position: relative;
  min-height: 12.75rem;
  margin-top: 22px;
}

.chapter-copy {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(100%, 38rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition:
    opacity 0.28s var(--ease-out-expo),
    transform 0.34s var(--ease-out-expo),
    visibility 0s linear 0.34s;
}

.chapter-copy.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.03s, 0.03s, 0s;
}

.chapter-copy__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 7px;
  color: var(--color-muted);
  font-family: var(--font-en);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chapter-copy__meta span:last-child {
  width: 100%;
  margin-top: 4px;
  color: var(--scene-accent);
  letter-spacing: 0.16em;
  transition: color var(--duration-fast);
}

.chapter-copy__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 4.8vw, 1.65rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  word-break: keep-all;
  text-wrap: balance;
}

.chapter-copy__lead {
  max-width: 34em;
  margin-top: 10px;
  color: var(--color-muted);
  font-size: clamp(0.78rem, 2.8vw, 0.94rem);
  font-weight: 500;
  line-height: 1.85;
  text-wrap: pretty;
}

.chapter-copy__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 14px;
  padding: 9px 16px;
  color: var(--color-dark);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  font-size: 0.76rem;
  font-weight: 700;
  transition:
    color var(--duration-fast),
    background-color var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast) var(--ease-out-expo);
}

/* ---------- 6. Navigation / progress controls ---------- */
.chapter-rail {
  display: none;
}

.chapter-dots {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  z-index: var(--z-content);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-pill);
  box-shadow: 0 16px 42px rgba(22, 39, 67, 0.14);
  backdrop-filter: blur(18px) saturate(135%);
}

.chapter-dots__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.chapter-dots__button,
.chapter-rail__button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.chapter-dots__button span {
  display: block;
  width: 7px;
  height: 7px;
  background: rgba(19, 33, 58, 0.28);
  border-radius: 50%;
  transition:
    width var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.chapter-dots__button.is-active span {
  width: 24px;
  background: var(--scene-accent);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 16px rgba(var(--scene-accent-rgb), 0.35);
}

.chapter-dots__label {
  overflow: hidden;
  color: var(--color-text);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story__scroll-cue {
  display: none;
}

/* ---------- 7. States / utility ---------- */
.motion-toggle {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: var(--z-control);
  min-height: 40px;
  padding: 9px 14px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 28px rgba(22, 39, 67, 0.12);
  backdrop-filter: blur(14px);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.motion-toggle[hidden] {
  display: none;
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: var(--z-control);
  padding: 12px 16px;
  color: var(--color-light);
  background: var(--color-dark);
  border-radius: 12px;
  font-size: 0.78rem;
}

html.is-static {
  scroll-behavior: auto;
}

html.is-static .story {
  height: 100svh;
}

html.is-static .story__sticky {
  position: relative;
}

html.is-static .story__scene,
html.is-static .story__scene img,
html.is-static .story__scene::before,
html.is-static .story__scene::after,
html.is-static .chapter-copy,
html.is-static .story__atmosphere,
html.is-static .story__motion-field *,
html.is-static .story__live i,
html.is-static .chapter-dots__button span {
  animation: none !important;
  transition: none !important;
}

html.is-static .story__motion-field,
html.is-static .story__transition-flare {
  display: none;
}

html.is-static .story__scene img {
  transform: none !important;
  will-change: auto;
}

html.is-static .story__progress {
  display: none;
}

/* ---------- 8. Pointer interactions ---------- */
@media (hover: hover) and (pointer: fine) {
  .site-header__cta:hover {
    background: var(--scene-accent);
    box-shadow: 0 14px 34px rgba(var(--scene-accent-rgb), 0.28);
    transform: translateY(-2px);
  }

  .site-header__cta:hover svg,
  .chapter-copy__cta:hover svg {
    transform: translateX(3px);
  }

  .site-header__cta svg,
  .chapter-copy__cta svg {
    transition: transform var(--duration-fast) var(--ease-out-expo);
  }

  .chapter-copy__cta:hover {
    color: var(--color-light);
    background: var(--scene-accent);
    border-color: var(--scene-accent);
    transform: translateY(-2px);
  }

  .chapter-dots__button:hover span,
  .chapter-rail__button:hover span {
    background: var(--scene-accent);
  }
}

/* ---------- 9. Tablet ---------- */
@media (min-width: 768px) {
  :root {
    --header-height: 84px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding:
      max(18px, env(safe-area-inset-top))
      clamp(28px, 4vw, 54px)
      14px;
  }

  .site-header__logo {
    width: 160px;
    max-height: 40px;
  }

  .site-header__cta {
    padding-inline: 22px;
    font-size: 0.82rem;
  }

  .story__veil {
    background:
      linear-gradient(90deg, rgba(247, 249, 253, 0.98) 0%, rgba(247, 249, 253, 0.93) 25%, rgba(247, 249, 253, 0.56) 43%, rgba(247, 249, 253, 0.07) 70%),
      linear-gradient(180deg, rgba(247, 249, 253, 0.12) 0%, transparent 72%, rgba(247, 249, 253, 0.2) 100%);
  }

  .story__content {
    justify-content: center;
    width: min(56vw, 690px);
    padding:
      calc(var(--header-height) + 28px)
      36px
      64px
      clamp(44px, 6.2vw, 96px);
  }

  .story__overline {
    font-size: 0.72rem;
    letter-spacing: 0.26em;
  }

  .story__overline-line {
    width: 38px;
  }

  .story__title {
    max-width: 11.8em;
    margin-top: 18px;
    font-size: clamp(2.8rem, 5.5vw, 4.7rem);
    line-height: 1.22;
    letter-spacing: 0.035em;
  }

  .story__chapters {
    min-height: 13rem;
    margin-top: 26px;
  }

  .chapter-copy__meta {
    font-size: 0.68rem;
  }

  .chapter-copy__title {
    margin-top: 10px;
    font-size: clamp(1.32rem, 2.2vw, 1.8rem);
  }

  .chapter-copy__lead {
    margin-top: 12px;
    font-size: 0.92rem;
  }

  .chapter-copy__cta {
    margin-top: 18px;
    padding-inline: 18px;
  }

  .chapter-dots {
    right: auto;
    bottom: 28px;
    left: 50%;
    width: min(430px, calc(100% - 56px));
    transform: translateX(-50%);
  }

  .motion-toggle {
    bottom: 26px;
    left: 26px;
  }
}

@media (max-width: 767px) {
  .story__motion-field {
    opacity: 0.66;
  }

  .story__orbit {
    left: 68%;
    width: min(92vw, 480px);
  }

  .story__orbit--inner {
    width: min(64vw, 330px);
  }

  .story__beam {
    left: 34%;
    width: 84vw;
  }
}

/* ---------- 10. Desktop ---------- */
@media (min-width: 1024px) {
  .site-header {
    grid-template-columns: minmax(160px, 1fr) auto minmax(130px, 1fr);
    gap: clamp(24px, 4vw, 72px);
    padding-inline: clamp(44px, 6vw, 88px);
  }

  .chapter-nav {
    display: block;
    justify-self: center;
    padding: 4px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 36px rgba(36, 53, 79, 0.1);
    backdrop-filter: blur(18px) saturate(130%);
  }

  .chapter-nav__list {
    display: flex;
    align-items: center;
  }

  .chapter-nav__button {
    min-height: 36px;
    padding: 8px 15px;
    color: var(--color-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition:
      color var(--duration-fast),
      background-color var(--duration-fast),
      box-shadow var(--duration-fast),
      transform var(--duration-fast) var(--ease-out-expo);
  }

  .chapter-nav__button.is-active {
    color: var(--color-light);
    background: var(--scene-accent);
    box-shadow: 0 7px 18px rgba(var(--scene-accent-rgb), 0.26);
  }

  .chapter-nav__button:not(.is-active):hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.62);
  }

  .chapter-rail {
    position: absolute;
    top: 50%;
    right: clamp(38px, 5vw, 74px);
    z-index: var(--z-content);
    display: grid;
    justify-items: end;
    gap: 10px;
    transform: translateY(-50%);
  }

  .chapter-rail__label {
    min-width: 76px;
    padding: 7px 12px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 22px rgba(22, 39, 67, 0.1);
    backdrop-filter: blur(14px);
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
  }

  .chapter-rail__list {
    position: relative;
    display: grid;
    gap: 0;
  }

  .chapter-rail__list::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 50%;
    width: 1px;
    background: var(--color-line-strong);
    transform: translateX(-50%);
  }

  .chapter-rail__button {
    position: relative;
    z-index: 1;
  }

  .chapter-rail__button span {
    display: block;
    width: 7px;
    height: 7px;
    background: rgba(19, 33, 58, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition:
      width var(--duration-fast) var(--ease-out-expo),
      height var(--duration-fast) var(--ease-out-expo),
      background-color var(--duration-fast),
      box-shadow var(--duration-fast);
  }

  .chapter-rail__button.is-active span {
    width: 14px;
    height: 14px;
    background: var(--scene-accent);
    box-shadow: 0 0 0 5px rgba(var(--scene-accent-rgb), 0.12), 0 0 18px rgba(var(--scene-accent-rgb), 0.4);
  }

  .chapter-dots {
    display: none;
  }

  .story__scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 50%;
    z-index: var(--z-content);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-muted);
    font-family: var(--font-en);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    transform: translateX(-50%);
    transition: opacity var(--duration-fast);
    pointer-events: none;
  }

  .story__mouse {
    position: relative;
    display: block;
    width: 18px;
    height: 28px;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
  }

  .story__mouse i {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 2px;
    height: 5px;
    background: var(--scene-accent);
    border-radius: var(--radius-pill);
    transform: translateX(-50%);
    animation: scrollDot 1.8s var(--ease-out-expo) infinite;
  }

  body:not([data-active-scene="0"]) .story__scroll-cue {
    opacity: 0;
  }

  @keyframes scrollDot {
    0% { opacity: 0; transform: translate(-50%, 0); }
    25% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, 9px); }
  }
}

@media (min-width: 1280px) {
  .chapter-nav__button {
    padding-inline: 18px;
    font-size: 0.72rem;
  }

  .story__content {
    width: min(52vw, 760px);
  }
}

/* ---------- 11. Short viewport safeguards ---------- */
@media (max-height: 700px) {
  .story,
  .story__sticky {
    min-height: 540px;
  }

  .story__content {
    padding-top: calc(var(--header-height) + 12px);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .story__overline {
    font-size: 0.6rem;
  }

  .story__title {
    margin-top: 8px;
    font-size: clamp(1.72rem, 7.6vw, 2.6rem);
  }

  .story__chapters {
    min-height: 10.3rem;
    margin-top: 14px;
  }

  .chapter-copy__title {
    margin-top: 5px;
  }

  .chapter-copy__lead {
    margin-top: 6px;
    line-height: 1.65;
  }

  .chapter-copy__cta {
    margin-top: 9px;
  }
}

@media (min-width: 768px) and (max-height: 700px) {
  .story__content {
    padding-bottom: 38px;
  }

  .story__title {
    font-size: clamp(2.25rem, 5vw, 3.45rem);
  }

  .story__chapters {
    min-height: 10.8rem;
  }
}

@media (max-width: 360px) {
  .story__live {
    display: none;
  }

  .chapter-dots {
    gap: 8px;
    padding-inline: 10px;
  }

  .chapter-dots__button {
    width: 34px;
  }

  .chapter-dots__label {
    font-size: 0.68rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .story,
  .story__sticky {
    height: 100svh;
    min-height: 100svh;
  }

  .story__veil {
    background:
      linear-gradient(90deg, rgba(247, 249, 253, 0.98) 0%, rgba(247, 249, 253, 0.9) 34%, rgba(247, 249, 253, 0.22) 66%, transparent 82%),
      linear-gradient(180deg, rgba(247, 249, 253, 0.08), rgba(247, 249, 253, 0.2));
  }

  .story__content {
    justify-content: flex-start;
    width: 62vw;
    padding: 82px 20px 54px 32px;
  }

  .story__overline {
    font-size: 0.54rem;
  }

  .story__title {
    margin-top: 5px;
    font-size: clamp(1.38rem, 4vw, 2rem);
    line-height: 1.16;
  }

  .story__chapters {
    min-height: 7.8rem;
    margin-top: 8px;
  }

  .chapter-copy__meta {
    font-size: 0.54rem;
  }

  .chapter-copy__meta span:last-child {
    margin-top: 1px;
  }

  .chapter-copy__title {
    margin-top: 3px;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .chapter-copy__lead {
    margin-top: 3px;
    font-size: 0.66rem;
    line-height: 1.5;
  }

  .chapter-copy__cta {
    min-height: 34px;
    margin-top: 5px;
    padding: 5px 12px;
    font-size: 0.64rem;
  }

  .chapter-dots {
    bottom: calc(7px + env(safe-area-inset-bottom));
    min-height: 42px;
    width: min(340px, calc(100% - 32px));
    padding-block: 3px;
  }

  .chapter-dots__button {
    height: 34px;
  }

  .motion-toggle {
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: auto;
  }
}

/* ---------- 12. Static / reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) {
    scroll-behavior: auto !important;
  }

  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
