/* Landing-only composition: measured type, open space, and a single 3D focal point. */
body.intro-nerfies { --ink: #14223b; --muted: #5e6b7f; }
.container.intro-nerfies__main { padding-top: 0; width: calc(100% - 96px); max-width: calc(1400 * var(--u)); }
/* The 3D surface always sits to the right of the tagline; both columns scale with
   the screen (the preview re-fits the surface to whatever box it is given). */
.intro-nerfies .landing-hero { min-height: 0; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: clamp(8px, 2vw, 24px); padding: clamp(24px, 3vw, 36px) 0 clamp(24px, 3vw, 40px); align-items: center; }
.intro-nerfies .hero-copy { z-index: 2; }
.intro-nerfies .eyebrow { font-size: calc(11 * var(--u)); letter-spacing: .12em; font-weight: 500; margin-bottom: clamp(14px, 2vw, 24px); }
.intro-nerfies .landing-hero h1 { font-size: clamp(calc(30 * var(--u)),4.6vw,calc(66 * var(--u))); line-height: 1.12; font-weight: 500; letter-spacing: -.055em; margin-bottom: clamp(14px, 2vw, 24px); }
.intro-nerfies .landing-hero h1 em { color: #597299; font-weight: 400; }
.intro-nerfies .hero-description { font-size: clamp(calc(14 * var(--u)), 1.25vw, calc(16 * var(--u))); max-width: calc(440 * var(--u)); line-height: 1.7; }
.intro-nerfies .hero-actions { gap: 12px; margin-top: clamp(18px, 2.4vw, 30px); }
.intro-nerfies .action { border-radius: 6px; padding: 14px 20px; font-size: calc(13 * var(--u)); font-weight: 500; gap: 24px; }
.intro-nerfies .action.primary { background: #182b49; }
.intro-nerfies .action.primary:hover { background: #2a456e; }
.intro-nerfies .hero-note { margin-top: 24px; font-size: calc(11 * var(--u)); color: #7a8595; }
.intro-nerfies .hero-energy { margin: 0 clamp(-28px, -2vw, 0px); transform: translateY(clamp(-28px, -2vw, 0px)); }
/* height follows the column width, so the plot keeps its proportions at any size */
.intro-nerfies .hero-energy iframe { height: auto; aspect-ratio: 1 / 1; min-height: 260px; max-height: 640px; }
.intro-nerfies .hero-energy::before { background: radial-gradient(ellipse,#dde9f533,transparent 65%); inset: 25% 10%; }
.intro-nerfies .discovery-strip { background: white; color: #14223b; border-top: 1px solid #e5eaf1; border-bottom: 1px solid #e5eaf1; padding: 28px 0; }
.intro-nerfies .discovery-strip > div { padding-left: 38px; border-color: #e5eaf1; grid-template-rows: calc(36 * var(--u)) auto; }
.intro-nerfies .discovery-strip > div:first-child { padding-left: 0; }
.intro-nerfies .discovery-strip strong { font: 500 calc(28 * var(--u))/calc(36 * var(--u)) 'Plus Jakarta Sans',sans-serif; letter-spacing: -.04em; }
.intro-nerfies .discovery-strip .count-up { font-variant-numeric: tabular-nums; }
/* rolling model name: each variant slides up out of the slot as the next slides in */
/* smaller than the other figures so the longest name sits comfortably in its column;
   nudged down so its baseline lines up with "2,500,000+" and "One" */
.intro-nerfies .discovery-strip .roll-word { position: relative; top: calc(1.2 * var(--u)); overflow: hidden; font-size: calc(25 * var(--u)); }
.intro-nerfies .discovery-strip .roll-word-line { position: absolute; left: 0; top: 0; font: inherit; }
/* invisible copy of the longest variant keeps the slot (and the column) at its final width */
.intro-nerfies .discovery-strip .roll-word-ghost { display: block; visibility: hidden; font: inherit; }
.intro-nerfies .discovery-strip span { font-size: calc(12 * var(--u)); color: #6b788c; margin-top: 6px; }
@media(min-width:761px) { .intro-nerfies .discovery-strip { grid-template-columns: minmax(0,1fr) minmax(max-content,1fr) minmax(0,1fr); } }
.intro-nerfies .about-box { padding: 56px 0; border-bottom: 1px solid var(--line); }
.intro-nerfies .about-box h2 { margin: 0 0 22px; }
.intro-nerfies .about-box p { margin: 0; color: var(--muted); font-size: calc(15 * var(--u)); line-height: 1.8; }
.intro-nerfies .about-box p + p { margin-top: calc(12 * var(--u)); }
/* copy takes the free width (measures scale with the type unit); the map is a square
   sized from the window: about half its width, never taller than ~3/4 of its height */
.intro-nerfies .map-preview-section { padding: 72px 0; grid-template-columns: minmax(0,1fr) auto; gap: clamp(32px, 4vw, 72px); align-items: center; }
.intro-nerfies .map-preview-copy h2 { max-width: calc(560 * var(--u)); }
.intro-nerfies .map-preview-copy > p:not(.eyebrow) { max-width: calc(460 * var(--u)); font-size: calc(16 * var(--u)); }
.intro-nerfies .map-preview-figure { margin: 0; }
.intro-nerfies .map-preview-figure iframe { display: block; width: clamp(320px, min(48vw, 76vh), calc(760 * var(--u))); height: auto; aspect-ratio: 1 / 1; border: 0; background: transparent; }
.intro-nerfies h2 { font-family: 'Plus Jakarta Sans',sans-serif; font-size: clamp(calc(30 * var(--u)),3.3vw,calc(44 * var(--u))); font-weight: 500; letter-spacing: -.055em; line-height: 1.2; }
.intro-nerfies .research-section { background: #f8fafd; border: 0; border-radius: 12px; }
.intro-nerfies .publication-title { font-size: calc(32 * var(--u)); }
.intro-nerfies__main .phase-heading { font: 600 calc(14 * var(--u))/1.4 'Plus Jakarta Sans',sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin: 0; display: inline; }
.intro-nerfies__main .intro-section h2.section-title { font: 500 clamp(calc(30 * var(--u)),3.3vw,calc(44 * var(--u)))/1.2 'Plus Jakarta Sans',sans-serif; letter-spacing: -.055em; color: var(--ink); text-align: left; margin: 0 0 calc(22 * var(--u)); }
.intro-nerfies__main .intro-split__text > p:last-child { margin-bottom: 0; }
.intro-nerfies__main .phase-list { padding: calc(24 * var(--u)) 0; border-bottom: 1px solid var(--line); }
.intro-nerfies .phase + .phase { border-top: 1px solid var(--line); }
/* summary stays display:block (flex on <summary> is unreliable in older Safari); the chevron is positioned */
.intro-nerfies .phase > summary, .intro-nerfies .phase-row { display: block; position: relative; list-style: none; cursor: pointer; padding: calc(22 * var(--u)) calc(32 * var(--u)) calc(22 * var(--u)) 0; }
.intro-nerfies .phase > summary::-webkit-details-marker { display: none; }
.intro-nerfies .phase > summary::after, .intro-nerfies .phase-row::after { content: ''; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-75%) rotate(45deg); transition: transform .2s ease; }
.intro-nerfies .phase[open] > summary::after { transform: translateY(-25%) rotate(-135deg); }
.intro-nerfies .phase > summary:hover .phase-heading { color: var(--accent); }
.intro-nerfies .phase > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.intro-nerfies__main .phase > .intro-split { padding: calc(4 * var(--u)) 0 calc(48 * var(--u)); }
.intro-nerfies .phase[open] { padding-bottom: calc(40 * var(--u)); }
.intro-nerfies .phase > .phase-body { padding: calc(4 * var(--u)) 0 0; }
.intro-nerfies .phase--upcoming .phase-row { cursor: default; }
.intro-nerfies .phase--upcoming .phase-row::after { border-color: #c9d2de; }
.intro-nerfies .phase--upcoming .phase-heading { color: var(--muted); }
.intro-nerfies .phase-body > p { margin: 0; color: var(--muted); font-size: calc(16 * var(--u)); line-height: 1.85; }
@media(max-width:900px) {
 .intro-nerfies .map-preview-section { grid-template-columns: 1fr; gap: 24px; }
 .intro-nerfies .map-preview-figure iframe { width: min(100%, 76vh); margin: 0 auto; }
 .container.intro-nerfies__main { width: calc(100% - 48px); }
 .intro-nerfies .action { padding: 12px 16px; gap: 14px; }
 .intro-nerfies .discovery-strip > div { padding-left: 0; }
}
@media(max-width:600px) {
 .intro-nerfies .map-preview-section { padding: 60px 0; }
 .intro-nerfies .about-box { padding: 40px 0; }
}

/* "What is BDFE?" figures: a live 3D diamine and an inline energy diagram */
.intro-nerfies__main .bdfe-figures { gap: calc(26 * var(--u)); padding: 0; }
.intro-nerfies__main .bdfe-figures figure { width: 100%; margin: 0; }
/* give this section's figure column more room so the energy diagram reads larger;
   the 3D model keeps its previous size */
@media (min-width: 761px) {
  .intro-nerfies__main .intro-split:has(.bdfe-figures) { grid-template-columns: minmax(0, 1fr) minmax(0, calc(440 * var(--u))); column-gap: calc(48 * var(--u)); }
}
.intro-nerfies__main .bdfe-figures .bdfe-molecule { max-width: calc(360 * var(--u)); }
/* Phase 1 molecule reel: a wider figure column than the default 360 */
@media (min-width: 761px) {
  .intro-nerfies__main .phase > .intro-split:has(> .intro-figure-wrap video) { grid-template-columns: minmax(0, 1fr) minmax(0, min(calc(470 * var(--u)), 46%)); column-gap: calc(48 * var(--u)); }
}
.bdfe-molecule canvas {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  cursor: grab; touch-action: pan-y; user-select: none;
}
.bdfe-molecule canvas.is-dragging { cursor: grabbing; }
.intro-nerfies__main .bdfe-molecule .intro-caption { margin-top: 2px; color: #8a97ab; font-style: normal; }
.bdfe-energy svg { display: block; width: 100%; height: auto; overflow: visible; font-family: "Plus Jakarta Sans", Arial, sans-serif; }
.bdfe-axis-label { font-size: 10px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; fill: #49658b; }
.bdfe-guides line { stroke: #e3e9f2; stroke-width: 1; stroke-dasharray: 2 4; }
.bdfe-levels line { stroke: #152d50; stroke-width: 3; stroke-linecap: round; }
.bdfe-curve { fill: none; stroke: url(#bdfe-curve); stroke-width: 2.2; stroke-linecap: round; }
.bdfe-traveller { fill: #355da0; stroke: #ffffff; stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(83, 123, 187, .55)); }
.bdfe-species { font-size: 15px; font-weight: 600; fill: #152d50; }
.bdfe-sub { font-size: 11px; font-style: italic; fill: #6b788c; }
.bdfe-brackets path { fill: none; stroke: #9fb4d3; stroke-width: 1.3; stroke-linecap: round; }
.bdfe-dg { font-size: 13px; font-style: italic; fill: #49658b; }
.bdfe-formula { font-size: 13px; font-weight: 500; fill: #152d50; }
@media (prefers-reduced-motion: reduce) { .bdfe-traveller { display: none; } }

.square-scheme-section { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr); gap: 40px; align-items: start; padding: 20px 0; }
.square-scheme-copy h3 { font-size: calc(26 * var(--u)); line-height: 1.3; letter-spacing: -.035em; margin: 0 0 22px; }
.square-scheme-copy > p:not(.eyebrow) { color: var(--muted); font-size: calc(14 * var(--u)); line-height: 1.8; }
.square-scheme-copy > p.square-scheme-scroll-hint { display: none; color: var(--accent); font-size: calc(11 * var(--u)); margin-top: 24px; }
.is-scroll-reveal .square-scheme-scroll-hint { display: block !important; }
.square-scheme-scroll-hint span { margin-left: 12px; }
.square-scheme-figure { margin: 0; min-width: 0; }
.square-scheme-figure img { display: block; width: 100%; height: auto; }
.square-scheme-diagram { display: block; width: 100%; height: auto; aspect-ratio: 840 / 610; pointer-events: none; }
/* The single square has no second row, so its drawing is cropped shorter. */
.square-scheme-scroll--single .square-scheme-diagram { aspect-ratio: 840 / 500; }
/* The diagram stays in view while the page scroll supplies its reveal progress. */
.square-scheme-scroll.is-scroll-reveal { min-height: calc(100vh + 1100px); }
/* One square has half the steps, so it needs less scroll to play through. */
.square-scheme-scroll--single.is-scroll-reveal { min-height: calc(100vh + 560px); }
.square-scheme-scroll + .square-scheme-scroll { margin-top: 12px; }
.intro-nerfies .phase-body > p.square-scheme-intro { margin-bottom: calc(28 * var(--u)); }
/* Pin to the top of the viewport rather than centring in it, so tall screens don't open a gap above. */
.is-scroll-reveal .square-scheme-section { position: sticky; top: 104px; }
.is-scroll-reveal .square-scheme-diagram { max-height: calc(100vh - 240px); }
/* square_scheme.js crossfades neighbouring figures so only one square shows at a time. */
.is-scroll-reveal .square-scheme-figure { will-change: opacity; }
.square-scheme-figure figcaption { color: var(--muted); font-size: calc(11 * var(--u)); line-height: 1.7; max-width: 660px; margin: 12px auto 0; }
@media(max-width:760px) { .square-scheme-section { grid-template-columns: 1fr; gap: 8px; } }
