/* ==========================================================================
   IDL-01 — Data centers. Page layout only; tokens + components from core.css.
   ========================================================================== */

/* ---------- Shared page helpers ------------------------------------------ */
.dc-rel { position: relative; z-index: 1; }
.dc-head { row-gap: var(--s-5); align-items: end; margin-bottom: clamp(40px, 5.5vw, 88px); }
.dc-head__title { grid-column: 1 / span 7; max-width: 15ch; }
.dc-head__aside { grid-column: 9 / span 4; max-width: 38ch; }
.dc-head__aside.t-lead { max-width: 30ch; }
.dc-head__aside--body { color: var(--tx-2); font-size: var(--t-body); }
.dc-head__aside--body p + p { margin-top: var(--s-4); }
@media (max-width: 1023px) {
  .dc-head__title, .dc-head__aside { grid-column: 1 / -1; }
}

.dc-scope, .dc-sld, .dc-geo { padding-top: calc(var(--section) * 0.62); }

/* ---------- 00 Hero ------------------------------------------------------ */
.dc-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: max(680px, 100svh);
  display: flex; align-items: flex-end;
  background: var(--bg-0);
}
.dc-hero__stage { position: absolute; inset: 0; z-index: 0; }

/* Static ground (fallback, and what shows before the canvas fades in):
   a raised-floor grid in perspective, receding into fog. Never animated. */
.dc-hero__ground { position: absolute; inset: 0; overflow: hidden; background: var(--bg-0); }
.dc-hero__ground::before {
  content: ""; position: absolute; left: -60%; right: -60%; bottom: -6%; height: 78%;
  background-image:
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px),
    linear-gradient(0deg, var(--line-2) 1px, transparent 1px);
  background-size: 64px 64px; background-position: 50% 100%;
  transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 92%);
          mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 92%);
  opacity: 0.75;
}
.dc-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s var(--ease-move) 0.4s; }
.dc-hero.is-live .dc-hero__canvas { opacity: 1; }

/* Scrim: left and bottom, so the H1 and lead sit on near-ground values */
.dc-hero__scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.9) 0%, rgba(10, 12, 16, 0.62) 30%, rgba(10, 12, 16, 0.12) 58%, rgba(10, 12, 16, 0) 72%),
    linear-gradient(0deg, rgba(10, 12, 16, 0.96) 0%, rgba(10, 12, 16, 0.55) 24%, rgba(10, 12, 16, 0) 52%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.6) 0%, rgba(10, 12, 16, 0) 16%); }

/* Viewfinder registration corners */
.dc-hero__frame { position: absolute; inset: calc(var(--header-h) + 16px) var(--margin) 20px; pointer-events: none; }
.dc-hero__frame span { position: absolute; width: 14px; height: 14px; border: 0 solid var(--line-2); }
.dc-hero__frame span:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.dc-hero__frame span:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.dc-hero__frame span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.dc-hero__frame span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* Readout: honest label for the render + pause control (WCAG 2.2.2) */
.dc-hero__readout {
  position: absolute; z-index: 3; top: calc(var(--header-h) + 30px); right: calc(var(--margin) + 22px);
  display: flex; gap: 18px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-3);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-section) linear 1.2s, visibility 0s linear 1.2s;
}
.dc-hero.is-live .dc-hero__readout { opacity: 1; visibility: visible; }
.dc-hero__pause { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--tx-2); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.dc-hero__pause:hover { color: var(--tx-1); }
.dc-hero__pause svg { width: 10px; height: 10px; fill: currentColor; }
.dc-hero__pause .i-play { display: none; }
.dc-hero__pause.is-paused .i-play { display: inline; }
.dc-hero__pause.is-paused .i-pause { display: none; }

.dc-hero__content { position: relative; z-index: 2; padding-top: calc(var(--header-h) + 96px); padding-bottom: clamp(56px, 11svh, 120px); }
.dc-hero__title { max-width: 11.5ch; }
.dc-hero__lead { margin-top: clamp(22px, 2.6vw, 34px); max-width: 44ch; }
.dc-hero__cta { margin-top: clamp(30px, 3.4vw, 44px); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.dc-hero .page-hero__code { margin-bottom: clamp(24px, 3vw, 40px); }

@media (max-width: 767px) {
  .dc-hero { min-height: max(640px, 100svh); }
  .dc-hero__scrim { background:
    linear-gradient(0deg, rgba(10, 12, 16, 0.97) 0%, rgba(10, 12, 16, 0.86) 46%, rgba(10, 12, 16, 0.2) 76%, rgba(10, 12, 16, 0.1) 100%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.6) 0%, rgba(10, 12, 16, 0) 18%); }
  .dc-hero__frame { display: none; }
  .dc-hero__readout { top: calc(var(--header-h) + 8px); right: var(--margin); gap: 12px; }
  .dc-hero__readout .stamp { display: none; }
  .dc-hero__content { padding-bottom: 48px; }
}

/* ---------- 01 Program (title block) ------------------------------------- */
.dc-program { padding-bottom: calc(var(--section) * 0.5); }
.dc-program .section-rule { margin-bottom: clamp(28px, 3vw, 40px); }
.dc-program .tblock.dc-tb { --cols: 12; }
.dc-tb > div { grid-column: span 3; padding: 18px 20px 22px; min-height: 0; gap: 10px; }
.dc-tb > .dc-tb__wide { grid-column: span 6; }
.dc-tb dd { font-size: var(--t-h4); line-height: 1.3; letter-spacing: -0.008em; font-weight: 450; }
.dc-tb dd .status { margin-top: 6px; }
.dc-tb__num { font-size: var(--t-h2); line-height: 0.95; letter-spacing: -0.03em; font-weight: 380; font-stretch: 96%; color: var(--tx-1); }
.dc-tb__unit { font-size: var(--t-small); color: var(--tx-3); font-weight: 420; letter-spacing: 0.01em; margin-left: 4px; }
@media (max-width: 1023px) {
  .dc-tb > div { grid-column: span 6; }
  .dc-tb > .dc-tb__wide { grid-column: span 12; }
}

/* ---------- 02 Scope: two layers ----------------------------------------- */
.dc-scope .colgrid span { opacity: 0.4; }
.dc-scope .colgrid { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); }
.dc-layers { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-8); border-top: 1px solid var(--line-2); }
.dc-layer { grid-column: span 6; position: relative; padding-top: var(--s-6); }
.dc-layer + .dc-layer::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) / -2); width: 1px; background: var(--line-2); }
.dc-layer .t-h3 { margin-top: var(--s-4); }
.dc-layer__desc { margin-top: var(--s-4); max-width: 34ch; color: var(--tx-2); font-size: var(--t-body); }
.dc-layer__k { margin-top: clamp(32px, 4vw, 56px); margin-bottom: var(--s-3); display: flex; gap: 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--tx-3); font-weight: 500; }
.dc-scope-list { list-style: none; padding: 0; border-top: 1px solid var(--line-2); }
.dc-scope-list li { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; padding: 15px 0 16px; border-bottom: 1px solid var(--line-1); color: var(--tx-1); font-size: var(--t-body); line-height: 1.4; }
.dc-scope-list li > span:last-child { grid-column: 2 / -1; }
.dc-scope-list__k { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.dc-note-caption { margin-top: clamp(32px, 4vw, 48px); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--tx-3); }
@media (max-width: 767px) {
  .dc-layers { border-top: 0; }
  .dc-layer { grid-column: 1 / -1; border-top: 1px solid var(--line-2); }
  .dc-layer + .dc-layer::before { display: none; }
  .dc-scope-list li { grid-template-columns: 4em 1fr; column-gap: var(--s-4); }
  .dc-scope-list li > span:last-child { grid-column: auto; }
}

/* ---------- Figures: drawing sheets -------------------------------------- */
.dc-fig { margin: 0; }
.dc-sheet { background: var(--bg-1); }
.dc-sheet__bar, .dc-sheet__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px clamp(16px, 2vw, 24px); }
.dc-sheet__bar { border-bottom: 1px solid var(--line-1); }
.dc-sheet__foot { border-top: 1px solid var(--line-1); }
.dc-sheet__body { padding: clamp(20px, 3vw, 48px) clamp(12px, 2.6vw, 40px); }
.dc-cap { margin-top: var(--s-4); max-width: 88ch; font-size: var(--t-small); line-height: 1.55; color: var(--tx-3); }
.dc-cap__n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-2); margin-right: 10px; font-weight: 500; }
.dc-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-2); }
.dc-legend li { display: inline-flex; align-items: center; gap: 10px; }
.dc-legend svg { width: 28px; height: 8px; overflow: visible; }
.dc-legend path { fill: none; stroke: var(--tx-3); stroke-width: 0.75; vector-effect: non-scaling-stroke; }
.dc-legend .lg-c { stroke-width: 1; }
.dc-legend .lg-d { stroke-dasharray: 5 4; }
.dc-legend .lg-t { stroke-dasharray: 0.01 3.5; stroke-linecap: round; stroke-width: 1.4; }
.dc-legend .lg-h { stroke: var(--ctrl); stroke-dasharray: 4 3; }

/* ---------- 03 Single-line diagram --------------------------------------- */
.sld { display: block; width: 100%; height: auto; overflow: visible; }
.sld--v { display: none; max-width: 440px; margin-inline: auto; }
@media (max-width: 1023px) {
  .sld--h { display: none; }
  .sld--v { display: block; }
}
.sld text { font-family: var(--font-mono); letter-spacing: 0.06em; fill: var(--tx-3); }
.sld .l { font-size: 12px; font-weight: 500; fill: var(--tx-1); }
.sld .s { font-size: 10.5px; font-weight: 400; }
.sld .tag { font-size: 9px; }
.sld .dimt { fill: var(--tx-2); }
.sld .zt { fill: var(--tx-3); letter-spacing: 0.1em; }

.sld .c, .sld .sym, .sld .sym-ln, .sld .sym-bus, .sld .sym-thick, .sld .hid, .sld .dim path, .sld .zone, .sld .glyph { fill: none; vector-effect: non-scaling-stroke; }
.sld .c path { stroke: var(--tx-3); stroke-width: 0.75; }
.sld .sym { fill: var(--bg-1); stroke: var(--tx-2); stroke-width: 0.75; }
.sld .sym.nf { fill: none; }
.sld .sym.thin { stroke: var(--line-2); }
.sld .fill { fill: var(--bg-1); stroke: none; }
.sld .sym-ln { stroke: var(--tx-2); stroke-width: 1.5; }
.sld .sym-bus { stroke: var(--tx-2); stroke-width: 3; }
.sld .sym-thick { stroke: var(--tx-2); stroke-width: 2; }
.sld .glyph { stroke: var(--tx-2); stroke-width: 0.75; }
.sld .arrowf, .sld .dot { fill: var(--tx-2); }
.sld .hid { stroke: var(--ctrl); stroke-width: 0.75; stroke-dasharray: 4 3; }
.sld .dim .ln { stroke: var(--tx-3); stroke-width: 0.75; }
.sld .dim .ext { stroke: var(--line-2); stroke-width: 0.75; }
.sld .zone { stroke: var(--line-2); stroke-width: 0.75; stroke-dasharray: 14 4 2 4; }
/* data + telemetry: user-space dashes so the accent overlay registers exactly */
.sld .data path, .sld .tel path { fill: none; stroke: var(--tx-3); stroke-width: 0.75; }
.sld .data path { stroke-dasharray: 5 4; }
.sld .tel path { stroke-dasharray: 0.01 4; stroke-linecap: round; stroke-width: 1.4; stroke: var(--ctrl); }

/* energising traces */
.sld .tr path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.sld .tr .tr--bus { stroke-width: 3; }
.sld .tr .tr--data { stroke-dasharray: 5 4; stroke-width: 1.25; }
.sld .tr .tr--tel { stroke-dasharray: 0.01 4; stroke-linecap: round; stroke-width: 1.8; }
.sld .mk { fill: none; stroke: #fff; stroke-width: 10; }
.sld .front { fill: var(--accent); opacity: 0; }

/* live (scroll-driven) state — without JS or with reduced motion the diagram is fully energised */
.sld.is-live text.l { fill: var(--tx-3); transition: fill var(--dur-ui) linear; }
.sld.is-live .is-on text.l { fill: var(--tx-1); }
.sld.is-live [data-on] .sym:not(.thin), .sld.is-live [data-on] .sym-ln, .sld.is-live [data-on] .sym-bus, .sld.is-live [data-on] .sym-thick, .sld.is-live [data-on] .glyph { stroke: var(--tx-3); transition: stroke var(--dur-ui) linear; }
.sld.is-live [data-on].is-on .sym:not(.thin), .sld.is-live [data-on].is-on .sym-ln, .sld.is-live [data-on].is-on .sym-bus, .sld.is-live [data-on].is-on .sym-thick, .sld.is-live [data-on].is-on .glyph { stroke: var(--tx-2); }
.sld.is-live [data-on] .arrowf, .sld.is-live [data-on] .dot { fill: var(--tx-3); transition: fill var(--dur-ui) linear; }
.sld.is-live [data-on].is-on .arrowf, .sld.is-live [data-on].is-on .dot { fill: var(--tx-2); }

/* ---------- 04 Geography -------------------------------------------------- */
.dc-geo__note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--tx-3); }
.dc-geo__body { padding: clamp(28px, 3vw, 48px) clamp(16px, 3vw, 48px) clamp(40px, 4vw, 56px) clamp(44px, 4.4vw, 72px); }
.geo__map { position: relative; width: 100%; }
.geo__land, .geo__over { position: absolute; inset: 0; width: 100%; height: 100%; }
.geo__over { overflow: visible; }
.geo__grat { fill: none; stroke: var(--line-1); stroke-width: 0.75; stroke-dasharray: 2 5; }
.geo__reg { fill: none; stroke: var(--tx-2); stroke-linecap: round; }
.geo__ticks { position: absolute; inset: 0; pointer-events: none; }
.geo__tick { position: absolute; font-family: var(--font-mono); font-size: 10px; line-height: 1; letter-spacing: 0.06em; color: var(--tx-3); white-space: nowrap; }
.geo__tick--x { top: calc(100% + 12px); transform: translateX(-50%); }
.geo__tick--y { right: calc(100% + 10px); transform: translateY(-50%); }
.geo__regions, .geo__offices { list-style: none; padding: 0; margin: 0; }
.geo__region {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tx-1);
  padding: 5px 6px 5px 8px; background: none; text-shadow: 0 0 2px var(--bg-1), 0 0 4px var(--bg-1), 0 0 6px var(--bg-1), 0 0 8px var(--bg-1); white-space: nowrap;
}
.geo__office { position: absolute; width: 0; height: 0; }
.geo__node { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--bg-1); box-shadow: inset 0 0 0 1.5px var(--tx-1); }
.geo__oname { position: absolute; top: -9px; left: 14px; display: grid; gap: 3px; padding: 2px 6px 4px; background: none; text-shadow: 0 0 2px var(--bg-1), 0 0 4px var(--bg-1), 0 0 6px var(--bg-1), 0 0 8px var(--bg-1); white-space: nowrap; }
/* London: leader line out to the open Atlantic so the British Isles stay visible */
.geo__office--lead::before { content: ""; position: absolute; top: 0; right: 8px; width: clamp(28px, 9vw, 128px); height: 1px; background: var(--tx-3); }
.geo__office--lead .geo__oname { left: auto; right: calc(clamp(28px, 9vw, 128px) + 12px); text-align: right; }
/* Istanbul: label sits above, over the Black Sea */
.geo__office--up .geo__oname { top: auto; bottom: 10px; left: -4px; }
.geo__city { font-family: var(--font-mono); font-size: 12px; line-height: 1.2; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx-1); }
.geo__code { display: none; font-family: var(--font-mono); font-size: 11px; line-height: 1.2; font-weight: 500; letter-spacing: 0.1em; color: var(--tx-1); }
.geo__ll { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.04em; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.dc-legend .lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.dc-legend .lg-dot--hi { background: var(--tx-3); }
.dc-legend .lg-node { width: 10px; height: 10px; box-shadow: inset 0 0 0 1.5px var(--tx-1); }
@media (max-width: 1023px) {
  .geo__ll { display: none; }
  .geo__oname { top: -8px; }
  .dc-sheet__proj { display: none; }
}
@media (max-width: 767px) {
  .dc-geo__body { padding: 24px 12px 36px 36px; }
  .geo__city { display: none; }
  .geo__code { display: block; }
  .geo__regions { display: none; }
  .geo__tick { font-size: 9px; }
  .geo__tick--x:nth-child(even) { display: none; }
  .geo__node { left: -4px; top: -4px; width: 8px; height: 8px; }
  .geo__oname { left: 10px; padding: 1px 4px 2px; }
  .geo__office--lead .geo__oname { right: calc(clamp(28px, 9vw, 128px) + 8px); }
  .geo__office--up .geo__oname { bottom: 7px; left: -3px; }
}

/* ---------- 05 Notes (paper): ruled rows ------------------------------- */
.dc-notes .dc-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.dc-notes__list { list-style: none; padding: 0; border-top: 1px solid var(--ink-1); }
.dc-note { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; padding: clamp(24px, 3vw, 36px) 0; border-bottom: 1px solid var(--paper-line); }
.dc-note__n { grid-column: 1 / span 1; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 500; }
.dc-note__t { grid-column: 2 / span 6; }
.dc-note__p { grid-column: 8 / span 5; color: var(--ink-2); font-size: var(--t-body); max-width: 40ch; }
@media (max-width: 767px) {
  .dc-note { grid-template-columns: 1fr; row-gap: 10px; }
  .dc-note__n, .dc-note__t, .dc-note__p { grid-column: 1; }
}

/* ---------- CTA ---------------------------------------------------------- */
.dc-cta__title { max-width: 18ch; }

/* Paper polarity for the section-rule index (core's .label .idx is tuned for dark ground) */
.paper .label .idx { color: var(--ink-3); }
