:root {
  --bg: #13212a;
  --bg-2: #1a2b35;
  --panel: rgba(18, 34, 43, 0.84);
  --panel-2: rgba(22, 41, 51, 0.92);
  --ink: #ecf7ff;
  --muted: #9cb2c0;
  --line: rgba(129, 200, 255, 0.2);
  --blue: #4ca6ff;
  --teal: #35d5c0;
  --orange: #ff9b5f;
  --glow: rgba(76, 166, 255, 0.14);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content: 1680px;
  --measure: 55ch;
  --wide: 89ch;
  --s0: 8px;
  --s1: 13px;
  --s2: 21px;
  --s3: 34px;
  --s4: 55px;
  --s5: 89px;
  --s6: 144px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(76, 166, 255, 0.12), transparent 24%),
    radial-gradient(circle at 100% 20%, rgba(53, 213, 192, 0.1), transparent 22%),
    linear-gradient(rgba(76, 166, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 166, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #0f1a21 0%, var(--bg) 100%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%),
    radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.18) 100%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.frame {
  width: min(var(--content), calc(100% - var(--s2)));
  margin: 0 auto;
  padding: var(--s2) 0 var(--s4);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) 4px var(--s2);
}

.brand {
  color: var(--ink);
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.page-flow {
  display: grid;
  gap: var(--s3);
}

.panel {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(18, 34, 43, 0.7);
  box-shadow: 0 18px 50px rgba(3, 9, 14, 0.18);
}

.hero,
.section {
  padding: var(--s3);
}

.hero {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(76, 166, 255, 0.05) 48% 49%, transparent 49% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
  box-shadow: 0 28px 90px rgba(3, 9, 14, 0.34);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 2px solid var(--blue);
  width: var(--s3);
  height: var(--s3);
}

.hero::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.hero::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

.image-frame {
  margin: 0;
  position: relative;
  padding: var(--s1);
  border: 1px solid rgba(129, 200, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(17, 30, 38, 0.74);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.image-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  border: 1px solid rgba(129, 200, 255, 0.12);
}

.image-frame-main {
  margin-bottom: var(--s3);
  padding: var(--s0);
  clip-path: none;
}

.image-frame-main img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  clip-path: none;
  border: 0;
}

.phi-main,
.phi-left,
.split {
  display: grid;
  gap: var(--s3);
  align-items: center;
}

.phi-main {
  grid-template-columns: minmax(0, 1.618fr) minmax(320px, 1fr);
}

.phi-left {
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.618fr);
}

.split {
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1.68fr);
  align-items: start;
}

.copy-block {
  display: grid;
  gap: var(--s2);
  max-width: var(--measure);
}

.split .section-copy {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.618fr);
  gap: var(--s4);
  align-items: start;
}

.split .section-copy h2 {
  grid-column: 1;
  max-width: 12ch;
}

.split .section-copy p {
  grid-column: 2;
  max-width: var(--measure);
}

.centered-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s1);
  width: min(100%, var(--wide));
  margin: 0 auto var(--s3);
}

.band-copy {
  margin-bottom: 0;
}

.tag,
.section-kicker,
.node-label,
.card-index,
.step-number,
.section-meta p {
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Chakra Petch", sans-serif;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.1rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.lead,
.section-copy p,
.band p,
.info-card p,
.step p,
.map-column p,
.node p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.04rem;
}

.section-copy h2,
.section-heading h2,
.band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.action-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-top: var(--s1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--s4);
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(90deg, var(--blue), var(--teal));
  color: #08151d;
  border-color: transparent;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.diagram {
  display: grid;
  gap: var(--s2);
}

.node {
  position: relative;
  min-height: var(--s6);
  padding: var(--s2);
  border: 1px solid rgba(129, 200, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel-2);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 34px rgba(5, 12, 18, 0.26);
}

.node::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(129, 200, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  pointer-events: none;
}

.node h2 {
  margin: var(--s0) 0 var(--s1);
  font-size: 1.55rem;
}

.section-meta {
  align-self: start;
}

.split .support-visual {
  grid-column: 1 / -1;
  width: min(100%, 1120px);
  justify-self: center;
  align-self: center;
  margin-top: var(--s1);
}

.split .support-visual img {
  max-height: none;
  object-fit: contain;
  clip-path: none;
}

.side-visual {
  align-self: center;
}

.side-visual img {
  max-height: 520px;
}

.band {
  background:
    linear-gradient(180deg, rgba(76, 166, 255, 0.08), rgba(53, 213, 192, 0.02)),
    rgba(18, 34, 43, 0.8);
}

.card-grid,
.map-grid {
  display: grid;
  gap: var(--s2);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.map-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.map-column-wide {
  grid-column: span 2;
}

.info-card,
.map-column {
  position: relative;
  padding: var(--s2);
  border: 1px solid rgba(129, 200, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(18, 34, 43, 0.76);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.info-card::before,
.map-column::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(129, 200, 255, 0.14);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  pointer-events: none;
}

.info-card h3,
.map-column h3,
.step h3 {
  margin: var(--s0) 0 var(--s1);
  font-size: 1.4rem;
}

.info-card {
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: start;
  min-height: var(--s6);
}

.map-column a {
  display: inline-block;
  margin-top: var(--s1);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.map-column a:hover {
  color: var(--teal);
}

.process-layout {
  align-items: center;
}

.timeline {
  display: grid;
  gap: var(--s2);
}

.step {
  display: grid;
  grid-template-columns: var(--s5) 1fr;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-top: 1px solid rgba(129, 200, 255, 0.12);
}

.step:first-child {
  border-top: 0;
  padding-top: 0;
}

.read-list {
  width: min(100%, var(--wide));
  margin: 0 auto;
  padding-left: var(--s2);
  color: var(--ink);
}

.read-list li + li {
  margin-top: var(--s1);
}

.read-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.read-list a:hover {
  color: var(--teal);
}

.site-footer {
  margin-top: var(--s3);
  padding: var(--s2) 4px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.machine-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.machine-links a {
  color: inherit;
  text-decoration: none;
}

.machine-links a:hover,
.machine-links a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .phi-main,
  .phi-left,
  .split,
  .split .section-copy {
    grid-template-columns: 1fr;
  }

  .split .section-copy h2,
  .split .section-copy p {
    grid-column: auto;
    max-width: var(--wide);
  }

  .copy-block {
    max-width: var(--wide);
    margin-inline: auto;
    text-align: center;
  }

  .copy-block p {
    margin-inline: auto;
  }

  .action-row,
  .hero-actions {
    justify-content: center;
  }

  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-column-wide {
    grid-column: span 1;
  }

  .side-visual {
    width: min(100%, 760px);
    margin-inline: auto;
  }

  .split .support-visual {
    width: min(100%, 980px);
  }
}

@media (max-width: 760px) {
  .frame {
    width: min(var(--content), calc(100% - var(--s1)));
    padding-top: var(--s1);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-grid,
  .map-grid {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 1fr;
    gap: var(--s0);
    text-align: center;
  }

  .hero,
  .section {
    padding: var(--s2);
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.8rem);
  }

  .button,
  .hero-actions,
  .action-row {
    width: 100%;
  }
}
