/* ==========================================================================
   D02 — Kairon Fusion
   Division page: FluxField hero, scroll-driven exploded tokamak, telemetry
   + Lawson chart, roadmap, safety cards, offtake CTA with capacity picker.
   Behavior: js/pages/d02-fusion.js
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page building blocks (bands, titles, links, annotations)
   -------------------------------------------------------------------------- */

/* Full-width content band; --surface alternates the background */
.band {
  position: relative;
  padding: clamp(80px, 9vw, 136px) 0;
  border-top: 1px solid var(--line);
}

.band--surface {
  background: var(--surface-1);
}

.band--cta {
  padding: clamp(96px, 11vw, 168px) 0;
}

/* Use with .heading-section.heading-section--lg (60px max); --xl caps at 68px */
.band__title {
  margin-top: 14px;
}

.band__title--xl {
  font-size: clamp(34px, 4.4vw, 68px);
}

/* Closing CTA headline */
.cta-title {
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: .92;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -.04em;
}

/* Bordered text link (secondary action next to a primary button) */
.outline-link {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
}

.outline-link--lg {
  height: 56px;
  padding: 0 22px;
  white-space: nowrap;
}

/* Pause / play control for the hero field animation */
.motion-toggle {
  height: 36px;
  padding: 0 14px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--text);
  cursor: pointer;
}

/* Conversion annotations, shown via the footer pill (<html data-annotations="on">) */
/* Annotation boxes: components/annotation.css */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - 100px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 11, .7), rgba(7, 8, 11, 0) 60%),
    linear-gradient(0deg, rgba(7, 8, 11, .8), rgba(7, 8, 11, 0) 45%);
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vh, 26px);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) var(--gutter-site) 28px;
}

.hero__title {
  margin-top: auto;
  font-size: clamp(52px, min(10vw, 16vh), 168px);
  line-height: .86;
  font-weight: 750;
  font-stretch: 125%;
  letter-spacing: -.045em;
}

.hero__lead {
  max-width: 540px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-2);
  text-wrap: pretty;
}

.hero__proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 10px;
  white-space: nowrap;
  border: 1px solid rgba(61, 220, 151, .5);
  border-radius: var(--r-pill);
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__secondary {
  padding: 0 22px;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Exploded view — tall scroll track with a sticky stage
   -------------------------------------------------------------------------- */
.explode {
  position: relative;
  height: 260vh;
  border-top: 1px solid var(--line);
}

.explode__stage {
  position: sticky;
  top: 100px;
  height: calc(100vh - 100px);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  align-content: center;
  align-items: center;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter-site);
}

.explode__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 480px;
}

/* Layer list (tabs). Buttons keep the browser's default control font,
   as in the original design. */
.layer-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-strong);
}

.layer-list__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 400 13.3333px Arial, sans-serif;
  text-align: left;
  opacity: .5;
  cursor: pointer;
}

.layer-list__item[aria-selected="true"] {
  opacity: 1;
}

.layer-list__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.layer-list__name {
  font-size: 17px;
}

.layer-list__detail {
  display: none;
}

.layer-list__item[aria-selected="true"] .layer-list__detail {
  display: inline;
}

.layer-list__desc {
  font-size: 14px;
  color: var(--text-2);
}

.layer-list__spec {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* Schematic tokamak: concentric rings that separate along the scroll.
   Each ring moves by --k (direction / weight) × --sep (0 … 2.2) × 60px. */
.tokamak {
  --sep: 0;
  position: relative;
  height: min(56vh, 520px);
  display: grid;
  place-items: center;
}

.tokamak__ring {
  position: absolute;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  aspect-ratio: 2.4;
  border-radius: 50%;
  background: transparent;
  transform: translateY(calc(var(--k) * var(--sep) * 60px));
  transition: transform 700ms var(--ease-inertia), opacity 400ms;
}

.tokamak__ring--magnets  { --k: -1.5; width: 92%; border: 10px solid rgba(237, 239, 242, .55); }
.tokamak__ring--vessel   { --k: -0.5; width: 74%; border: 2px solid rgba(127, 219, 255, .7); }
.tokamak__ring--blanket  { --k: 0.5; width: 60%; border: 14px solid rgba(165, 139, 255, .35); }
.tokamak__ring--plasma   { --k: 0; width: 38%; border: 0; background: radial-gradient(closest-side, rgba(224, 64, 251, .9), rgba(123, 60, 255, .4) 60%, transparent); }
.tokamak__ring--divertor { --k: 1.6; width: 30%; border: 3px solid rgba(255, 176, 32, .7); }

.tokamak__label {
  position: absolute;
  right: -8px;
  transform: translateX(100%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  opacity: 0;
}

.tokamak.is-separated .tokamak__label {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Telemetry tiles
   -------------------------------------------------------------------------- */
.telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.telemetry__cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--canvas);
}

.telemetry__label {
  font-size: 10px;
  color: var(--text-3);
}

.telemetry__value {
  font-size: 30px;
}

.telemetry__unit {
  font-size: 13px;
  color: var(--text-2);
}

.telemetry__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   Lawson chart
   -------------------------------------------------------------------------- */
.lawson-chart {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.lawson-chart__head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.lawson-chart__title {
  font-weight: 600;
}

.lawson-chart__link {
  align-self: center;
  font-size: 14px;
}

.lawson-chart__link,
.lawson-chart__link:hover {
  color: var(--action-text);
}

.lawson-chart__plot {
  display: block;
  max-height: 420px;
}

.lawson-chart__caption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Roadmap — horizontal timeline, scrolls sideways on narrow screens
   -------------------------------------------------------------------------- */
.roadmap__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 20px;
}

.roadmap__all {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 15px;
}

/* ol.roadmap: outranks the shared `ol[class]` padding reset */
ol.roadmap {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  margin-top: 48px;
  padding: 8px 0;
  overflow-x: auto;
  background: linear-gradient(var(--line-strong), var(--line-strong)) 0 8px / 100% 1px no-repeat;
}

.roadmap__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 20px 0 0;
}

.roadmap__dot {
  --dot-size: 14px;
  position: absolute;
  top: 1px;
  left: 0;
}

.roadmap__date {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.roadmap__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.roadmap__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

.roadmap__note {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.roadmap__note a,
.roadmap__note a:hover {
  color: var(--text-2);
}

.roadmap__note a {
  border-bottom: 1px solid var(--line-strong);
}

/* --------------------------------------------------------------------------
   Safety and environment
   -------------------------------------------------------------------------- */
.safety__title {
  max-width: 18ch;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
}

.safety-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: var(--canvas);
}

.safety-card .icon {
  color: #EDEFF2;
}

.safety-card__title {
  font-size: 22px;
  font-weight: 600;
  font-stretch: 112%;
  line-height: 1.15;
}

.safety-card__text {
  font-size: 15px;
  color: var(--text-2);
}

.safety-card__source {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}

.safety__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 24px;
}

.safety__case {
  font-weight: 600;
}

.safety__faq {
  font-size: 15px;
}

.safety__faq,
.safety__faq:hover {
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   Offtake CTA — capacity picker + credibility stack
   -------------------------------------------------------------------------- */
.offtake {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 48px;
}

.offtake__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.offtake__lead {
  max-width: 46ch;
  color: var(--text-2);
}

.offtake__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.capacity-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capacity-picker__label {
  font-size: 14px;
  font-weight: 500;
}

.capacity-picker__options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
}

.capacity-picker__btn {
  height: 44px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.capacity-picker__btn[aria-pressed="true"] {
  background: var(--text);
  color: var(--canvas);
}

.credibility {
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface-1);
}

.credibility__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  font-size: 14px;
}

.credibility__item .icon {
  color: #EDEFF2;
}
