:root {
  --intro-progress: 0;
  --intro-camera-y: 390px;
  --intro-camera-scale: 1.48;
  --intro-opacity: 1;
}

html, body { max-width: 100%; overflow-x: hidden; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.82); backdrop-filter: blur(18px); }
.workspace-jump { text-decoration: none; }
.vertical-intro { position: relative; z-index: 1; margin-top: -1px; }
.intro-scene { position: fixed; inset: 82px 0 0; z-index: -1; overflow: hidden; opacity: var(--intro-opacity); background: radial-gradient(circle at 50% 45%, #fafbfc 0%, #edf1f6 64%, #e7ecf3 100%); transition: opacity .22s linear; pointer-events: none; }
.intro-scene::after { content: ""; position: absolute; inset: 0; z-index: 10; background: linear-gradient(180deg, rgba(247,249,252,.12), rgba(236,241,247,.32)); }
.intro-grid { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(75,94,121,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(75,94,121,.08) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(180deg, transparent 4%, black 24%, black 82%, transparent); }
.intro-ambient { position: absolute; width: 42vw; aspect-ratio: 1; border-radius: 50%; filter: blur(74px); opacity: .13; }
.intro-ambient-source { left: -20vw; top: 24vh; background: #7599ff; transform: translateX(calc(var(--intro-progress) * 16vw)); }
.intro-ambient-destination { right: -21vw; top: 28vh; background: #5bc6da; transform: translateX(calc(var(--intro-progress) * -17vw)); }
.intro-path-world { position: absolute; left: 50%; top: 50%; width: min(760px, 72vw); aspect-ratio: 1 / 1.9; transform: translate(-50%, calc(-50% + var(--intro-camera-y))) scale(var(--intro-camera-scale)); transform-origin: 50% 36%; }
.intro-path-world svg { width: 100%; overflow: visible; }
.intro-path-rail { fill: none; stroke: rgba(80,105,141,.2); stroke-width: 11; }
.intro-path-active { fill: none; stroke: url(#introFlow); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--intro-progress)); filter: url(#introGlow); }
.intro-flow-node circle { fill: rgba(255,255,255,.76); stroke: rgba(64,88,125,.34); stroke-width: 2; }
.intro-flow-node .intro-node-core { fill: var(--blue); stroke: white; stroke-width: 4; }
.intro-flow-node path { fill: none; stroke: var(--blue); stroke-width: 4; }
.intro-flow-node text { fill: #172942; font-family: var(--sans); font-size: 15px; font-weight: 780; text-anchor: start; letter-spacing: -.02em; }
.intro-flow-node text[text-anchor="end"] { text-anchor: end; }
.intro-flow-node .intro-node-role { fill: #768398; font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: .08em; }
.intro-reticle { position: absolute; left: 50%; top: 50%; width: min(470px, 46vw); aspect-ratio: 1.85; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.9); border-radius: 46% 8% 43% 7% / 12% 42% 10% 38%; background: rgba(255,255,255,.09); box-shadow: 0 25px 80px rgba(44,66,96,.06), inset 0 0 48px rgba(255,255,255,.24); backdrop-filter: blur(5px); }
.intro-reticle > i { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%,-50%); border: 1px solid rgba(31,94,255,.5); border-radius: 50%; }
.intro-reticle > i::before, .intro-reticle > i::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(31,94,255,.45); transform: translate(-50%,-50%); }
.intro-reticle > i::before { width: 42px; height: 1px; }
.intro-reticle > i::after { width: 1px; height: 42px; }
.intro-reticle span, .intro-reticle b { position: absolute; bottom: 18px; font-size: 8px; }
.intro-reticle span { left: 22px; color: #708096; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.intro-reticle b { right: 22px; color: #31445f; }
.intro-depth { position: absolute; right: clamp(26px, 5vw, 80px); top: 21%; height: 56%; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 12px; z-index: 12; }
.intro-depth span { color: #6f7f95; font-family: var(--mono); font-size: 8px; letter-spacing: .11em; text-transform: uppercase; writing-mode: vertical-rl; }
.intro-depth i { width: 1px; height: 100%; background: linear-gradient(to bottom, var(--blue) calc(var(--intro-progress) * 100%), var(--line) 0); }
.intro-depth b { color: #344760; font-family: var(--mono); font-size: 10px; }
.intro-step { position: absolute; right: clamp(22px, 4vw, 64px); bottom: 25px; z-index: 12; display: flex; align-items: center; gap: 10px; color: #64758b; font-family: var(--mono); font-size: 9px; }
.intro-step i { width: 56px; height: 1px; background: linear-gradient(90deg, var(--blue) calc(var(--intro-progress) * 100%), var(--line) 0); }

.intro-chapter { position: relative; z-index: 3; min-height: 100svh; display: flex; align-items: center; padding: 80px clamp(22px, 5vw, 80px) 64px; }
.intro-hero { align-items: flex-start; padding-top: 15vh; }
.intro-hero-copy { width: min(790px, 62vw); }
.intro-eyebrow, .intro-card-index { margin: 0 0 18px; color: var(--blue); font-family: var(--mono); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.intro-hero h1 { max-width: none; margin: 0; font-size: clamp(58px, 7.2vw, 116px); line-height: .88; letter-spacing: -.07em; }
.intro-hero-copy > p:not(.intro-eyebrow) { width: min(545px, 76%); margin: 28px 0 0; color: #536277; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.65; }
.intro-actions { display: flex; align-items: center; gap: 26px; margin-top: 32px; }
.intro-primary { min-height: 48px; display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; border: 1px solid var(--blue); border-radius: 6px; background: var(--blue); padding: 0 18px; color: white; font-size: 13px; font-weight: 750; text-decoration: none; transition: background .16s ease, transform .16s ease; }
.intro-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.intro-secondary { color: #4b5c72; font-size: 12px; font-weight: 700; text-decoration: none; }
.intro-secondary:hover { color: var(--blue); }
.intro-card { width: min(430px, 31vw); border: 1px solid rgba(104,122,149,.28); border-radius: 8px; background: rgba(255,255,255,.82); padding: clamp(24px, 3vw, 42px); box-shadow: 0 24px 80px rgba(43,62,90,.055); backdrop-filter: blur(20px); }
.intro-card-left { margin-right: auto; }
.intro-card-right { margin-left: auto; }
.intro-card h2 { margin: 0; font-size: clamp(30px, 3vw, 46px); line-height: 1.02; letter-spacing: -.045em; }
.intro-card > p:not(.intro-card-index) { margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.intro-fact { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; border-block: 1px solid var(--line); padding: 12px 0; font-size: 10px; }
.intro-fact span { color: var(--muted); }
.intro-fact b { font-family: var(--mono); }
.intro-route { display: flex; align-items: center; margin-top: 28px; color: #65758b; font-family: var(--mono); font-size: 9px; }
.intro-route i { flex: 1; height: 1px; margin: 0 8px; background: var(--blue); }
.intro-route b { color: var(--blue); }
.intro-handoff { padding-bottom: 16vh; }
.intro-handoff .intro-primary { margin-top: 28px; }

.workspace-shell { position: relative; z-index: 20; background: var(--canvas); scroll-margin-top: 82px; }
.workspace-shell::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--canvas); border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .intro-path-world { width: min(690px, 88vw); }
  .intro-reticle { width: min(470px, 60vw); }
  .intro-hero-copy { width: min(690px, 80vw); }
  .intro-card { width: min(430px, 54vw); }
}

@media (max-width: 760px) {
  .site-header { top: 0; }
  .workspace-jump { display: none; }
  .intro-scene { inset: 70px 0 0; }
  .intro-path-world { width: 640px; }
  .intro-reticle { top: 44%; width: 76vw; }
  .intro-reticle b { display: none; }
  .intro-depth { right: 15px; top: 22%; height: 50%; }
  .intro-step { right: 18px; bottom: 18px; }
  .intro-chapter { min-height: 100svh; align-items: flex-end; padding: 100px 18px 68px; }
  .intro-hero { align-items: flex-start; padding-top: 14vh; }
  .intro-hero-copy { width: 100%; }
  .intro-hero h1 { font-size: clamp(50px, 15.2vw, 68px); }
  .intro-hero-copy > p:not(.intro-eyebrow) { width: 94%; margin-top: 22px; font-size: 14px; }
  .intro-actions { align-items: flex-start; flex-direction: column; gap: 15px; margin-top: 25px; }
  .intro-card { width: 100%; padding: 24px; }
  .intro-card h2 { font-size: 32px; }
  .workspace-shell { scroll-margin-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-ambient, .intro-path-world { transform: none; }
  .intro-path-world { left: 50%; top: 50%; transform: translate(-50%,-50%); }
  .intro-path-active { stroke-dashoffset: 0; }
  .intro-scene { transition: none; }
}
