/* ==========================================================================
   D03 — Kairon Silicon
   Division page: powers-of-ten zoom hero (wafer → die → transistor),
   process nodes with TRL meters, services + generated wafer map,
   3-step PDK export-control gate, capacity request form.
   Behavior: js/pages/d03-semiconductors.js
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page building blocks (bands, titles, splits, form fields, 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);
}

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

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

/* Two-column split that stacks below 2 × 440px (--narrow: 2 × 420px) */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 48px;
}

.split--narrow {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.split--start { align-items: start; }
.split--end   { align-items: end; }

/* Labelled form field: label text above the control */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.field__control {
  height: 52px;
  padding: 0 12px;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font: 400 16px var(--font-sans);
}

.field__control--text {
  padding: 0 14px;
}

.field__control--area {
  height: auto;
  padding: 12px;
}

.field__control--month {
  font: 400 15px var(--font-mono);
}

/* Input with a trailing unit inside one bordered box */
.field__group {
  display: flex;
  align-items: center;
  height: 52px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
}

.field__group-input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 16px var(--font-mono);
  text-align: right;
  outline: none;
}

.field__unit {
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

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

/* --------------------------------------------------------------------------
   Hero — powers-of-ten zoom (tall scroll track with a sticky stage)
   -------------------------------------------------------------------------- */
.zoom {
  position: relative;
  height: 300vh;
}

.zoom__stage {
  position: sticky;
  top: 100px;
  height: calc(100vh - 100px);
  overflow: hidden;
}

.zoom__visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Each scale layer: --s = scale, --o = opacity (updated on scroll) */
.zoom__layer {
  position: absolute;
  aspect-ratio: 1;
  transform: scale(var(--s));
  opacity: var(--o);
}

.zoom__layer--wafer {
  --s: 1;
  --o: 1;
  width: min(70vh, 64vw);
  right: 6%;
  transition: opacity 250ms;
}

.zoom__layer--die {
  --s: .079;
  --o: 0;
  width: min(62vh, 56vw);
  right: 9%;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(237, 239, 242, .5);
  background: #0F1217;
}

.zoom__layer--transistor {
  --s: .006;
  --o: 0;
  width: min(60vh, 54vw);
  right: 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6%;
}

/* 10⁻¹ m — wafer: colour sheen + 16 × 16 die grid (dies generated in JS) */
.wafer-art__colors {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #7FDBFF, #A58BFF, #E040FB, #FFB020, #3DDC97, #7FDBFF);
  opacity: .55;
}

.wafer-art__dies {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(7, 8, 11, .5);
}

.wafer-art__die {
  background: rgba(7, 8, 11, var(--a));
}

.wafer-art__rim {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(237, 239, 242, .4);
}

/* 10⁻³ m — die floorplan */
.die-art__block--logic {
  grid-row: span 2;
  border: 1px solid rgba(127, 219, 255, .6);
  background: repeating-linear-gradient(90deg, rgba(127, 219, 255, .18) 0 2px, transparent 2px 6px);
}

.die-art__block--cache {
  border: 1px solid rgba(165, 139, 255, .6);
}

.die-art__block--io {
  grid-column: span 2;
  border: 1px solid rgba(255, 176, 32, .5);
  background: repeating-linear-gradient(0deg, rgba(255, 176, 32, .15) 0 2px, transparent 2px 5px);
}

.die-art__block--bus {
  grid-column: span 3;
  border: 1px solid rgba(237, 239, 242, .3);
  background: repeating-linear-gradient(90deg, rgba(237, 239, 242, .08) 0 1px, transparent 1px 4px);
}

/* 10⁻⁸ m — gate-all-around transistor cross-section */
.gaa-art__gate {
  width: 84%;
  height: 9%;
  background: rgba(255, 176, 32, .75);
}

.gaa-art__channel {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 70%;
  height: 52%;
  border: 2px solid rgba(127, 219, 255, .8);
  background: rgba(127, 219, 255, .06);
}

.gaa-art__sheet {
  width: 118%;
  height: 12%;
  background: #EDEFF2;
}

.gaa-art__substrate {
  width: 96%;
  height: 6%;
  background: rgba(165, 139, 255, .6);
}

.zoom__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 8, 11, .85), rgba(7, 8, 11, 0) 62%);
}

.zoom__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vh, 26px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(28px, 5vh, 64px) var(--gutter-site) 28px;
}

.zoom__scale {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.zoom__scale-value {
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.zoom__title {
  margin-top: auto;
  max-width: 10ch;
  font-size: clamp(44px, min(9.4vw, 11.5vh), 156px);
  line-height: .88;
  font-weight: 750;
  font-stretch: 125%;
  letter-spacing: -.045em;
}

.zoom__lead {
  max-width: 520px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-2);
}

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

.zoom__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 10px;
  white-space: nowrap;
  border: 1px solid var(--info);
  border-radius: var(--r-pill);
  color: var(--text);
}

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

.zoom__secondary {
  padding: 0 22px;
}

.zoom__secondary .icon {
  color: #EDEFF2;
}

.zoom__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Process roadmap — node cards with TRL meters
   -------------------------------------------------------------------------- */
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
}

.node-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  background: var(--canvas);
}

.node-card__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.node-card__name {
  font-size: 44px;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -.04em;
  line-height: 1;
}

/* Full-width variant of the shared TRL meter */
.node-card__trl {
  display: grid;
  width: auto;
  gap: 3px;
}

.node-card__facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  font-size: 14px;
}

.node-card__facts dt {
  color: var(--text-2);
}

.node-card__facts dd {
  font-family: var(--font-mono);
  font-size: 13px;
}

.node-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
}

.node-card__status .status-dot {
  --dot-size: 9px;
}

/* --------------------------------------------------------------------------
   Services + wafer map
   -------------------------------------------------------------------------- */
.service-list {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.service-list__item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.service-list__item .icon {
  color: #EDEFF2;
}

.service-list__title {
  font-size: 18px;
}

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

.service-list__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}

.shuttle-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
}

.shuttle-note .icon {
  color: #EDEFF2;
}

.shuttle-note__text {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
}

.shuttle-note__link {
  font-size: 14px;
}

.shuttle-note__link,
.shuttle-note__link:hover {
  color: var(--action-text);
}

.wafer-map {
  border: 1px solid var(--line);
}

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

.wafer-map__title {
  font-weight: 600;
}

.wafer-map__yield {
  font-family: var(--font-mono);
  font-size: 13px;
}

.wafer-map__plot {
  display: block;
  max-width: 420px;
  margin: 0 auto;
}

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

/* --------------------------------------------------------------------------
   PDK gate — locked file list + 3-step export-control form
   -------------------------------------------------------------------------- */
.pdk__lead {
  max-width: 46ch;
  margin-top: 18px;
  color: var(--text-2);
}

.pdk-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.pdk-files__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
}

.pdk-files__item .icon {
  color: #EDEFF2;
}

.pdk-files__name {
  flex: 1;
  font-size: 15px;
}

.pdk-files__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}

.pdk-files__badge {
  padding: 4px 8px;
  white-space: nowrap;
  border: 1px solid var(--warning);
  font-family: var(--font-mono);
  font-size: 10px;
}

.pdk-gate {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-color: var(--warning);
  background: var(--canvas);
}

.gate-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gate-steps__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}

.gate-steps__bar {
  height: 2px;
  background: var(--line-strong);
}

.gate-steps__item.is-reached {
  color: var(--text);
}

.gate-steps__item.is-reached .gate-steps__bar {
  background: var(--text);
}

.gate-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-step__legend {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 600;
}

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

.gate-step__check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}

.gate-step__check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #FFB020;
}

.gate-step__done {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-step__done-title {
  font-size: 22px;
  font-weight: 600;
}

.gate-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.gate-nav__back {
  height: 48px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 500 15px var(--font-sans);
  cursor: pointer;
}

/* Hidden but keeps its space on step 1 so "Continue" stays right-aligned */
.gate-nav__back.is-hidden {
  visibility: hidden;
}

.gate-nav__next {
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-1);
  background: var(--action);
  color: var(--on-action);
  font: 600 16px var(--font-sans);
  font-stretch: 112%;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Capacity CTA
   -------------------------------------------------------------------------- */
.capacity__lead {
  max-width: 44ch;
  margin-top: 18px;
  color: var(--text-2);
}

.capacity-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.capacity-form__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.capacity-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.capacity-form__submit {
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-1);
  background: var(--action);
  color: var(--on-action);
  font: 600 16px var(--font-sans);
  font-stretch: 112%;
  cursor: pointer;
}

.capacity-form__talk {
  font-size: 15px;
}

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