﻿/* =========================================================
   BINTAN 200MW AI DATA CENTER
   pages.css : page-specific composition
   ========================================================= */

/* =========================================================
   SHARED PAGE HEADER (interior pages)
   ========================================================= */
.pagehead {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}
.pagehead__video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pagehead__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pagehead--video .pagehead__meta,
.pagehead--video h1,
.pagehead--video .lead,
.pagehead--video .subtabs a {
  color: var(--white);
}
.pagehead__inner {
  position: relative;
  z-index: 1;
  padding-left: clamp(2rem, 5vw, 4rem);
}
.pagehead__meta {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
}
.pagehead h1 { max-width: 22ch; }
.pagehead .lead { margin-top: var(--s2); }

/* Sub tabs (Power & Water, campus parts, rack stages) */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: auto;
  max-width: 100%;
  border: 0;
  background: transparent;
}
.subtabs a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--blue);
  background: var(--blue);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.subtabs a:hover { background: var(--blue-hover); color: var(--white); border-color: var(--blue-hover); }
/* Active tab: red, matching the current-page marker in the main nav */
.subtabs a.is-active,
.subtabs a[aria-current] { background: var(--red); color: var(--white); border-color: var(--red); }
.subtabs a.is-active:hover,
.subtabs a[aria-current]:hover { background: var(--red-hover); border-color: var(--red-hover); }

/* =========================================================
   INDEX - COVER
   ========================================================= */
.cover { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.cover__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.cover__copy { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.cover__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}
.cover__title .mark-red { color: var(--red); }
.cover__figure {
  min-width: 0;
}
.cover__figure .figure {
  position: relative;
  padding-left: 0;
  padding-right: 0;
}
.cover__figure .figure svg {
  position: relative;
  width: 145%;
  height: auto;
  max-width: none;
  overflow: visible;
  top: 2rem;
  left: -5rem;
}
.cover__figure .figcaption {
  position: relative;
  top: 3rem;
  left: 5rem;
}
.cover__proposition {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: var(--s2) 0;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.cover__proposition b { color: var(--red); }
.hand-underline { display: block; width: min(320px, 60%); margin-top: 0.35rem; }

@media (max-width: 900px) {
  .cover__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   LOCATION
   ========================================================= */

.latency-scale { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); background: var(--paper); }
.latency-scale__row {
  display: grid;
  grid-template-columns: 8rem 1fr 5.5rem;
  align-items: center;
  gap: var(--s2);
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.latency-scale__row:last-child { border-bottom: 0; }
.latency-scale__bar { height: 10px; background: var(--blue-wash); position: relative; }
.latency-scale__bar span { position: absolute; inset: 0 auto 0 0; background: var(--blue); display: block; z-index: 1; }
.latency-scale__bar span.is-red { background: var(--red); }
.latency-scale__name { font-family: var(--font-mono); font-size: 0.875rem; }
.latency-scale__val { font-family: var(--font-mono); font-size: 0.875rem; text-align: right; color: var(--blue); }
@media (max-width: 560px) {
  .latency-scale__row { grid-template-columns: 6.5rem 1fr 4.5rem; padding: 0.5rem; }
}

/* =========================================================
   CAMPUS - interactive isometric
   ========================================================= */
.campus-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  align-items: start;
}

.iso-part { cursor: pointer; transition: opacity 0.18s ease; }
.iso-part:hover .iso-hit { fill: var(--yellow); fill-opacity: 0.22; }
.iso-part:focus { outline: none; }
.iso-part:focus-visible .iso-hit { stroke: var(--red); stroke-width: 2; }
.iso-part.is-active .iso-hit { fill: var(--red); fill-opacity: 0.18; }
.iso-hit { fill: transparent; transition: fill 0.18s ease; }

.info-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 14rem;
}
.info-panel h3 { margin: 0; }
.info-panel .label { color: var(--red); }
.info-panel__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s2);
  margin-top: 0.25rem;
}
.info-panel__stat {
  border-top: 1px solid var(--line);
  padding-top: 0.4rem;
}
.info-panel__stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--blue);
}
.info-panel__stat span { font-size: 0.875rem; color: var(--ink-3); font-family: var(--font-mono); }

/* Skeleton (predictable layout placeholder, no spinner) */
.skeleton { display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton__line { height: 0.85rem; background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi) 37%, var(--skeleton) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; }
.skeleton__line--w60 { width: 60%; }
.skeleton__line--w80 { width: 80%; }
.skeleton__line--big { height: 2.2rem; width: 45%; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton__line { animation: none; } }

/* =========================================================
   DIAGRAM ATOM: flow node list
   ========================================================= */
.flowchain {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.flowchain__node {
  flex: 1 1 8rem;
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.flowchain__node:last-child { border-right: 0; }
.flowchain__node b { font-family: var(--font-mono); font-size: 0.95rem; color: var(--blue); }
.flowchain__node span { font-size: 0.875rem; color: var(--ink-3); }
.flowchain__arrow { align-self: center; font-family: var(--font-mono); color: var(--red); padding: 0 0.4rem; }
@media (max-width: 560px) {
  .flowchain { flex-direction: column; }
  .flowchain__node { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

/* =========================================================
   GB300 - generation slider
   ========================================================= */
.gen-control { display: flex; flex-direction: column; gap: var(--s2); }
.gen-readout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.gen-readout > div { background: var(--paper); padding: 0.9rem 1rem; min-width: 0; }
.gen-readout b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: var(--blue);
}
.gen-readout span { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
@media (max-width: 560px) { .gen-readout { grid-template-columns: repeat(2, 1fr); } }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--line);
  border: none;
}
input[type="range"]::-moz-range-track { height: 4px; background: var(--line); border: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 26px;
  margin-top: -11px;
  background: var(--blue);
  border: none;
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 26px; border-radius: 0; background: var(--blue); border: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--red); outline-offset: 2px; }
input[type="range"].is-dragging::-webkit-slider-thumb { background: var(--red); }
input[type="range"].is-dragging::-moz-range-thumb { background: var(--red); }
.gen-ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-3); }

.rack-label { cursor: pointer; }
.rack-label .iso-hit { fill: transparent; transition: fill 0.18s ease; }
.rack-label:hover .iso-hit { fill: var(--yellow); fill-opacity: 0.18; }
.rack-label:focus-visible { outline: none; }
.rack-label:focus-visible .iso-hit { stroke: var(--red); stroke-width: 2; }
.rack-label.is-active .iso-hit { fill: var(--red); fill-opacity: 0.14; }
.rack-label text { pointer-events: none; }

/* =========================================================
   DELIVERY - timeline
   One logical row per milestone: icon, date and body live in
   the same grid row, so they can never drift apart at any zoom.
   The spine is the ol's own border-left - continuous, not segmented.
   ========================================================= */
.timeline { border-left: 2px solid var(--blue); margin-left: 1.5rem; padding-left: 0; list-style: none; }
.timeline__item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--s3);
  padding: 0 0 var(--s4) var(--s4);
  position: relative;
}
.timeline__icon {
  position: absolute;
  left: -0.9375rem;         /* centres the 1.75rem icon on the 2px spine */
  top: -0.1875rem;          /* centres on the date line */
  width: 1.75rem;
  height: 1.75rem;
  z-index: 1;
}
.timeline__date {
  align-self: start;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timeline__item.is-key .timeline__date { color: var(--red); }
.timeline__body { min-width: 0; }
.timeline__body h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.timeline__body p { margin: 0; font-size: 0.9688rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .timeline__item { grid-template-columns: 1fr; gap: 0.5rem; padding-left: var(--s3); }
}

/* Delivery tier compare */

.tier--rec { border: 2px solid var(--blue); }
.tier__flag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  padding: 0.2rem 0.5rem;
}

.tier__months { font-family: var(--font-mono); font-size: 1.4rem; color: var(--red); }

/* =========================================================
   CONTACT - contact sheet
   ========================================================= */
.contactsheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.field {
  background: var(--paper);
  padding: clamp(0.75rem, 2vw, 1.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.field--full { grid-column: 1 / -1; }
.choices { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.35rem; }
.field .choice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
}
.field .choice input { width: auto; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.field input, .field textarea, .field select {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.6rem 0.65rem;
  width: 100%;
  border-radius: 0;
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.field textarea { resize: vertical; min-height: 7rem; }
.formnote { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-3); }
.formstatus { font-family: var(--font-mono); font-size: 0.875rem; padding: 0.6rem 0; }
.formstatus.is-ok { color: var(--blue); }
.formstatus.is-err { color: var(--red); }
@media (max-width: 560px) { .contactsheet { grid-template-columns: 1fr; } }

/* Contact direct block */
.contactcard {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: var(--paper);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contactcard a { font-family: var(--font-mono); }

/* =========================================================
   COMPARISON TABLE (why bintan)
   ========================================================= */
.cmp { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.cmp th, .cmp td { border: 1px solid var(--line); padding: 0.7rem 0.75rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--blue); color: var(--white); font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cmp tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cmp td.is-us { background: var(--yellow-wash); }
.cmp td.is-us strong { color: var(--blue); }
.cmp td b { font-family: var(--font-mono); }
.tablewrap--cmp { overflow-x: auto; }

/* =========================================================
   TIMELINE MILESTONE markers (delivery) SVG wrapper
   ========================================================= */
.milestones { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(4, 1fr); }
.milestones > div { background: var(--paper); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.milestones b { font-family: var(--font-mono); color: var(--red); }
@media (max-width: 760px) { .milestones { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .milestones { grid-template-columns: 1fr; } }

/* =========================================================
   PHOTO FIGURES (rendered views)
   ========================================================= */
.figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--blue-wash);
}
.img-figure { border-top: 3px solid var(--blue); }
.img-figure img { border: 1px solid var(--line); }
.img-figure .figcaption {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

/* =========================================================
   SERVICE — INLINE RACK FLOW
   ========================================================= */
.rf-inline {
  margin: 2rem 0 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.rf-inline__head,
.rf-inline__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1rem 1.25rem;
}
.rf-inline__head { border-bottom: 1px solid var(--line); }
.rf-inline__head h3 { margin: 0; color: var(--blue); }
.rf-inline__head p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.rf-inline__frame {
  display: block;
  width: 100%;
  height: clamp(580px, 65vw, 820px);
  border: 0;
  background: var(--viewer-bg);
}
.rf-inline__caption {
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}
@media (max-width: 760px) {
  /* Fill most of the viewport but keep room for the toolbar panels */
  .rf-inline__frame { height: clamp(480px, calc(100vh - var(--nav-h) - 6rem), 760px); }
  .rf-inline__head,
  .rf-inline__caption { padding: 0.875rem; }
}

/* =========================================================
   B300 - rack telemetry snapshot
   ========================================================= */
.telemetry { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.telemetry__card { border: 1px solid var(--line); background: var(--paper); min-width: 0; }
.telemetry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}
.telemetry__head b { font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.06em; }
.telemetry__head span { font-size: 0.875rem; color: var(--ink-3); }
.telemetry__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.telemetry__grid > div { background: var(--paper); padding: 0.75rem; min-width: 0; }
.telemetry__grid b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--blue);
}
.telemetry__grid span {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
@media (max-width: 760px) { .telemetry { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .telemetry__grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   MISC
   ========================================================= */
.statline { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s3); }
.statline > div { display: flex; flex-direction: column; gap: 0.5rem; }
.statline b { font-family: var(--font-mono); font-size: clamp(1.3rem, 3vw, 2rem); color: var(--blue); }
.statline span { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  padding: 0.3rem 0.6rem;
}

/* =========================================================
   LOCATION MAP
   ========================================================= */
.map-figure { position: relative; }
.map-canvas { position: relative; width: 100%; min-height: 400px; border: 1px solid var(--blue-wash); }
.map-canvas iframe { display: block; width: 100%; min-height: 400px; border: 0; }
.map-reset {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.map-reset:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
