/* ============================================================
   SNAFTY — Immersive Layer (V2)
   Cinematic scenes, world backdrops, expensive motion
   ============================================================ */

/* ---------- intro loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 9999; background: #f2f3f6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transition: transform 0.9s cubic-bezier(0.85, 0, 0.15, 1);
}
#loader.done { transform: translateY(-101%); }
#loader img { height: 44px; animation: loaderPulse 1.6s ease-in-out infinite; }
@keyframes loaderPulse { 0%,100% { opacity: 1; filter: drop-shadow(0 0 18px rgba(240,86,110,0.55)); } 50% { opacity: 0.55; filter: none; } }
#loader .l-count { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.4em; color: var(--text-3); }
#loader .l-bar { width: 180px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
#loader .l-bar::after { content: ""; position: absolute; inset: 0; background: var(--grad-brand);
  transform: translateX(-100%); animation: loaderBar 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes loaderBar { to { transform: translateX(100%); } }

/* ---------- scroll progress ---------- */
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 999;
  transform-origin: left; transform: scaleX(0); background: var(--grad-mix); }

/* ---------- custom cursor ---------- */
@media (pointer: fine) {
  #cursor { position: fixed; z-index: 2000; pointer-events: none; top: 0; left: 0; }
  #cursor .c-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #0d1424;
    transform: translate(-50%, -50%); box-shadow: 0 0 10px rgba(13, 20, 36, 0.35); }
  #cursor .c-ring { position: absolute; width: 42px; height: 42px; border-radius: 50%;
    border: 1.5px solid rgba(240, 86, 110, 0.55); transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s; }
  #cursor.on-link .c-ring { width: 70px; height: 70px; background: rgba(240, 86, 110, 0.12);
    border-color: rgba(245, 164, 92, 0.85); }
}

/* ---------- scenes (world backdrops) ---------- */
.scene { position: relative; overflow: hidden; isolation: isolate; }
.scene > .world, .scene > .world-img, .scene > .world-video {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
}
.scene > .world canvas { width: 100%; height: 100%; display: block; }
.scene > .world-img { background-size: cover; background-position: center; will-change: transform; }
.scene > .world-video { width: 100%; height: 100%; object-fit: cover; }
/* readability veil + edge fades so worlds blend into each other */
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 12%, transparent 88%, var(--bg) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, rgba(20, 30, 60, 0.05) 100%);
}
/* scroll performance: cards/panels that were given inline backdrop blur render it off —
   heavy to re-sample every frame over animated worlds. A more opaque bg keeps legibility. */
.card[style*="backdrop-filter"], .step[style*="backdrop-filter"], .pane[style*="backdrop-filter"],
.scrim[style*="backdrop-filter"], .scrim-tight[style*="backdrop-filter"], .timeline[style*="backdrop-filter"] {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.92) !important;
}
.pane-good[style*="backdrop-filter"] {
  background: linear-gradient(160deg, rgba(240, 86, 110, 0.07), rgba(245, 164, 92, 0.07)) !important;
  border: 1px solid rgba(240, 86, 110, 0.25) !important;
}

/* text legibility on live worlds/videos */
/* keep a subtle halo only on the dark CTA band heading */
.cta-band h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); }
.cta-band.scene::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    radial-gradient(ellipse 62% 70% at 50% 42%, rgba(13, 20, 36, 0.6), transparent 75%);
}
.scene.scene-bright::before {
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 14%, transparent 86%, var(--bg) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 30%, rgba(242, 243, 246, 0.30) 100%);
}

/* glass scrim panels — text always readable on any world */
.scrim {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 20, 36, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(20, 30, 60, 0.10);
  padding: 48px;
}
.scrim-tight { padding: 32px; }
@media (max-width: 640px) { .scrim { padding: 30px 22px; } }

/* chapter markers */
.chapter {
  display: flex; align-items: center; gap: 18px; margin-bottom: 26px;
}
.chapter .ch-num {
  font-family: var(--font-en); font-size: clamp(44px, 6vw, 84px); font-weight: 700; line-height: 1;
  -webkit-text-stroke: 1px rgba(13, 20, 36, 0.20); color: transparent;
}
.chapter .ch-meta { border-left: 2px solid; border-image: var(--grad-brand) 1; padding-left: 16px; }
.chapter .ch-meta .en { font-family: var(--font-en); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; display: block; }
.chapter .ch-meta .jp { font-size: 13px; color: var(--text-2); }

/* display type */
.display {
  font-size: clamp(34px, 5.4vw, 72px); font-weight: 900; line-height: 1.28; letter-spacing: 0.01em;
}
.display .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display .grad-cool { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display .stroke { -webkit-text-stroke: 1.5px rgba(13, 20, 36, 0.65); color: transparent; }

/* universal gradient text — any span.grad/.grad-cool works regardless of context */
span.grad, span.grad-cool { -webkit-background-clip: text; background-clip: text; color: transparent; }
span.grad { background-image: var(--grad-brand); }
span.grad-cool { background-image: var(--grad-cool); }

/* split text (JS wraps chars) */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
[data-split] .c { display: inline-block; transform: translateY(110%) rotateX(-60deg); transform-origin: bottom; will-change: transform; }
/* gradient text + transformed children: re-apply clip down the .w > .c chain or the paint is lost */
[data-split] .grad .w, [data-split] .grad-cool .w,
[data-split] .grad .c, [data-split] .grad-cool .c {
  background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; contain: paint; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; background: rgba(255, 255, 255, 0.6); }
.marquee .mq-track { display: inline-flex; gap: 64px; padding-right: 64px; animation: mq 26s linear infinite; will-change: transform; }
@keyframes mq { to { transform: translateX(-50%); } }
.marquee span { font-family: var(--font-en); font-size: clamp(15px, 2vw, 22px); font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text); display: inline-flex; align-items: center; gap: 64px; }
.marquee span i { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee span em { font-style: normal; -webkit-text-stroke: 1px rgba(13, 20, 36, 0.35); color: transparent; }

/* ---------- horizontal rail: swipe / drag carousel ---------- */
.hrail-wrap { position: relative; }
.hrail {
  display: flex; gap: 28px; padding: 6px 48px 30px; align-items: stretch;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; cursor: grab;
  scrollbar-width: none;
}
.hrail::-webkit-scrollbar { display: none; }
.hrail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hrail.dragging a { pointer-events: none; }
.hrail .rail-card {
  flex: 0 0 clamp(300px, 34vw, 430px); min-height: 470px;
  display: flex; flex-direction: column; scroll-snap-align: center;
}
.hrail .rail-intro {
  flex: 0 0 clamp(280px, 30vw, 380px); display: flex; flex-direction: column; justify-content: center;
  scroll-snap-align: start;
}
/* edge fade hints that there is more to swipe */
.hrail-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 90px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(242, 243, 246, 0.9));
}
.rail-nav { display: flex; gap: 12px; }
.rail-nav button {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font-size: 18px; cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.rail-nav button:hover { border-color: var(--coral); transform: translateY(-2px); background: rgba(240, 86, 110, 0.15); }
@media (max-width: 900px) {
  .hrail { gap: 16px; padding: 6px 20px 24px; }
  .hrail .rail-card { flex: 0 0 min(82vw, 340px); min-height: 430px; }
  .hrail .rail-intro { flex: 0 0 min(82vw, 340px); }
}

/* ---------- big number odometers ---------- */
.big-num {
  font-family: var(--font-en); font-weight: 700; line-height: 1;
  font-size: clamp(64px, 10vw, 150px);
  background: var(--grad-mix); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(240, 86, 110, 0.3));
}

/* ---------- beam divider ---------- */
.beam { height: 1px; max-width: var(--maxw); margin: 0 auto; position: relative; overflow: visible;
  background: linear-gradient(90deg, transparent, rgba(13, 20, 36, 0.14), transparent); }
.beam::after { content: ""; position: absolute; top: -1.5px; left: 0; width: 90px; height: 4px; border-radius: 4px;
  background: var(--grad-brand); filter: blur(1px); animation: beamRun 5s ease-in-out infinite; }
@keyframes beamRun { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 90px); opacity: 0; } }

/* ---------- noise + vignette (cinema finish) ---------- */
/* static film grain — animating it forced a full-screen repaint every step */
#grain { position: fixed; inset: 0; z-index: 998; pointer-events: none; opacity: 0.04; contain: strict;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- hero v2 ---------- */
.hero-v2 { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-v2 #hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-v2 .hero-inner { position: relative; z-index: 2; }
.hero-v2 .hero-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.hero-v2 h1 { font-size: clamp(40px, 7vw, 104px); font-weight: 900; line-height: 1.16; }
.hero-v2 .hero-foot {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  border-top: 1px solid rgba(13, 20, 36, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.7));
  backdrop-filter: blur(8px);
}

/* ============================================================
   BRIGHT HERO — digital-twin office diorama
   ============================================================ */
.hero-light {
  background:
    radial-gradient(ellipse 70% 55% at 68% 62%, rgba(255, 236, 224, 0.85), transparent 70%),
    linear-gradient(180deg, #fdfeff 0%, #f2f6fc 45%, #e7eef9 100%);
}
.hero-light::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 3;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero-light .hero-label {
  color: #c62f48; border-color: rgba(240, 86, 110, 0.35); background: rgba(240, 86, 110, 0.07);
}
.hero-light .hero-label::before { background: var(--coral); box-shadow: 0 0 12px rgba(240, 86, 110, 0.6); }
.hero-light h1 { color: #0b1224; }
.hero-light .hero-sub { color: #223050; font-weight: 500; }
.hero-light .hero-foot {
  border-top: 1px solid rgba(11, 18, 36, 0.08);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 4; /* keep the KPI band above the dark bottom fade */
}
.hero-light .hero-kpis > div { border-color: rgba(11, 18, 36, 0.08); }
.hero-light .hero-kpis .k-label { color: #3c496b; }
.hero-light .btn-ghost { color: #0b1224; border-color: rgba(11, 18, 36, 0.3); }
.hero-light .btn-ghost:hover { border-color: var(--coral); }

/* V9.1 full-bleed video hero (index) */
.hero-full { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-full .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-full .hero-bg video { width: 100%; height: 100%; object-fit: cover; object-position: 76% center; display: block; }
.hero-full .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(248, 250, 253, 0.94) 0%, rgba(248, 250, 253, 0.72) 34%, rgba(248, 250, 253, 0.18) 58%, rgba(248, 250, 253, 0) 72%);
}
.hero-full .hero-copy { max-width: 740px; padding: 150px 0 190px; }
.hero-full h1 { font-size: clamp(32px, 4.2vw, 62px); white-space: nowrap; }
@media (max-width: 760px) { .hero-full h1 { white-space: normal; } }
.hero-full .chip-static { z-index: 2; }
.hero-full .cs-1 { top: 19%; right: 7%; }
.hero-full .cs-2 { top: auto; bottom: 27%; right: 24%; left: auto; }
@media (max-width: 900px) {
  .hero-full .hero-bg video { object-position: 70% center; }
  .hero-full .hero-bg::after {
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.94) 0%, rgba(248, 250, 253, 0.82) 45%, rgba(248, 250, 253, 0.35) 78%, rgba(248, 250, 253, 0.15) 100%);
  }
  .hero-full .hero-copy { padding: 130px 0 160px; }
  .hero-full .cs-1 { top: auto; bottom: 31%; right: 5%; }
  .hero-full .cs-2 { display: none; }
}

/* hero video frame (right column) */
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.hero-grid h1 { font-size: clamp(30px, 3.7vw, 58px); }
.hero-grid .hero-sub br.pc-only { display: none; }
.hero-video-wrap { position: relative; }
.hero-video-frame {
  border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10; background: #eef2f9;
  border: 1px solid rgba(11, 18, 36, 0.08);
  box-shadow: 0 40px 90px rgba(30, 45, 90, 0.22), 0 6px 20px rgba(30, 45, 90, 0.1);
}
.hero-video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip-static {
  position: absolute; display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(11, 18, 36, 0.1);
  border-radius: 10px; padding: 8px 13px; white-space: nowrap;
  box-shadow: 0 12px 32px rgba(30, 45, 90, 0.18);
  animation: acFloat 7s ease-in-out infinite;
}
.chip-static i { width: 7px; height: 7px; border-radius: 50%; flex: none; animation: pulse 1.6s infinite; }
.chip-static b { font-family: var(--font-en); font-size: 9.5px; letter-spacing: 0.12em; color: #5a6884; font-weight: 700; }
.chip-static span { font-size: 12px; font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-1 { top: -18px; right: 26px; }
.cs-2 { bottom: -18px; left: -14px; animation-delay: -3.5s; }
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-video-wrap { order: -1; max-width: 560px; }
  .cs-2 { left: 6px; }
}
@media (max-width: 640px) {
  .chip-static { padding: 6px 10px; }
  .chip-static span { font-size: 10.5px; }
  .cs-1 { top: -14px; right: 8px; }
}

/* diorama task chips (projected from 3D) */
.dio-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.dio-chip {
  position: absolute; top: 0; left: 0; will-change: transform;
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 18, 36, 0.1); border-left: 3px solid var(--c);
  border-radius: 9px; padding: 7px 12px;
  box-shadow: 0 10px 28px rgba(30, 45, 90, 0.16);
  white-space: nowrap; transition: opacity 0.35s;
}
.dio-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none;
  animation: pulse 1.6s infinite; }
.dio-chip b { font-family: var(--font-en); font-size: 9.5px; letter-spacing: 0.12em; color: #5a6884; font-weight: 700; }
.dio-chip span { font-size: 12px; font-weight: 700; color: #16223f; }
.dio-chip.ok span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dio-chip.ok i { animation: none; }
.dio-chip.hide { opacity: 0; }
@media (max-width: 640px) {
  .dio-chip { padding: 5px 9px; }
  .dio-chip b { display: none; }
  .dio-chip span { font-size: 10.5px; }
}

/* header text: dark navy across every page (light theme, all pages) */
.site-header .global-nav > li > a { color: var(--text-3); }
.site-header .global-nav > li > a:hover,
.site-header .global-nav > li > a.active { color: var(--text); }
.site-header .brand-tag { color: var(--text-3); border-left-color: var(--line-strong); }
.site-header .has-drop > a::before { color: var(--text-3); }
.site-header .menu-btn span { background: var(--text); }
@media (max-width: 1080px) {
  .site-header .global-nav > li > a { color: var(--text-2); }
}

/* ---------- hero agent task cards: "AIエージェントが業務をこなしている" を可視化 ---------- */
.agent-cards { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.agent-card {
  position: absolute; width: min(300px, 23vw);
  background: rgba(8, 12, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px;
  padding: 14px 16px 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: acFloat 7s ease-in-out infinite;
}
/* the headline band (y 30–62%) must stay clear — cards live above and below it */
.ac-1 { right: 4%; top: 10%; animation-delay: 0s; }
.ac-2 { right: 23.5%; top: 21%; animation-delay: -2.4s; }
.ac-3 { right: 5%; top: 63%; animation-delay: -4.8s; }
@keyframes acFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.agent-card .ac-head {
  font-family: var(--font-en); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; white-space: nowrap;
}
.agent-card .ac-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84;
  box-shadow: 0 0 10px #3ddc84; animation: pulse 1.6s infinite; flex: none; }
.agent-card .ac-task { font-size: 12.5px; color: #fff; line-height: 1.6; min-height: 40px; }
.agent-card .ac-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 10px; }
.agent-card .ac-bar i { display: block; height: 100%; width: 0%; border-radius: 4px; background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(240, 86, 110, 0.7); transition: width 0.3s linear; }
.agent-card .ac-done {
  font-size: 11.5px; font-weight: 700; margin-top: 9px; opacity: 0; transition: opacity 0.4s;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.agent-card.done .ac-done { opacity: 1; }
.agent-card.done .ac-dot { background: var(--orange); box-shadow: 0 0 10px var(--orange); }
@media (max-width: 1080px) { .agent-cards { display: none; } }

/* orbit ring behind headline */
.hero-ring { position: absolute; z-index: 1; right: -12vw; top: 50%; width: 56vw; aspect-ratio: 1;
  transform: translateY(-50%); border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 0 120px rgba(79, 124, 255, 0.08); }
.hero-ring::before, .hero-ring::after { content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.08); animation: ringSpin 60s linear infinite; }
.hero-ring::after { inset: 22%; border: 1px solid rgba(240, 86, 110, 0.14); animation-duration: 40s; animation-direction: reverse; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ---------- page hero v2 (sub pages) ---------- */
.page-hero.scene { border-bottom: 1px solid var(--line); }
.page-hero .ph-world { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center;
  transform: scale(1.12); will-change: transform; }
.page-hero .ph-scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(5,7,15,0.88) 25%, rgba(5,7,15,0.25) 70%, rgba(5,7,15,0.55) 100%); }

/* floating deco particles (CSS only) */
.float-dots { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.float-dots i { position: absolute; display: block; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(13, 20, 36, 0.30); animation: floatUp linear infinite; }
.float-dots i:nth-child(3n) { background: rgba(240, 86, 110, 0.7); }
.float-dots i:nth-child(3n+1) { background: rgba(240, 86, 110, 0.7); }
@keyframes floatUp { from { transform: translateY(110vh) scale(1); opacity: 0; } 10% { opacity: 1; }
  to { transform: translateY(-10vh) scale(0.4); opacity: 0; } }

/* mobile layout: static KPI band, unbroken hero lines, PC-only breaks off */
@media (max-width: 900px) {
  .hero-v2 { flex-direction: column; justify-content: flex-start; padding-top: calc(var(--header-h) + 96px); }
  .hero-v2 .hero-foot { position: static; margin-top: 48px; background: rgba(255, 255, 255, 0.72); }
  .hero-light { padding-top: calc(var(--header-h) + 44px); }
  .hero-light .hero-foot { position: relative; z-index: 4; background: rgba(255, 255, 255, 0.88); }
  br.pc-only { display: none; }
  .chapter .ch-num { font-size: clamp(38px, 9vw, 60px); }
  .model-stage { height: 360px !important; }
}
@media (max-width: 640px) {
  .section { padding: 72px 20px; }
  .section-tight { padding: 54px 20px; }
  .page-hero { padding-left: 20px; padding-right: 20px; padding-bottom: 64px; }
  .cta-band { padding: 84px 20px; }
  .site-footer { padding: 54px 20px 30px; }
  .hero, .hero-v2 { padding-left: 20px; padding-right: 20px; }
  .hero-v2 .hero-inner { padding: 0 !important; }
  .grid-2, .grid-3, .grid-4 { gap: 16px; }
  .flow { gap: 14px; }
  .btn-lg { padding: 15px 32px; font-size: 15px; }
  .marquee span { font-size: 14px; }
  .hrail { gap: 16px; }
}
@media (max-width: 520px) {
  .hero-v2 h1 { font-size: clamp(23px, 7vw, 34px); }
  .display { font-size: clamp(24px, 7vw, 34px); }
  .page-hero h1 { font-size: clamp(24px, 6.8vw, 34px); }
  .page-hero .lead, .hero-sub { font-size: 14.5px; }
  .scrim { padding: 26px 20px; }
  .big-num { font-size: clamp(52px, 17vw, 84px); }
  .delta .to { font-size: clamp(24px, 8vw, 34px); }
  .compare .pane { padding: 26px 20px; }
  .def-table th, .def-table td { padding: 14px 10px; font-size: 14px; }
  .solution-card .logo-plate { height: 150px; }
}

/* reduced motion: worlds become static, cursor/grain off */
@media (prefers-reduced-motion: reduce) {
  #cursor, #grain { display: none !important; }
  .marquee .mq-track { animation: none; }
}
@media (max-width: 1080px) { #cursor { display: none; } }
