/* ============================================================
   Mr. Sealz HQ — "The Bridge"
   Harbor / mission-control station for a two-person DnB op.
   Palette derives from the brand kit: teal-green primary,
   amber accent (a harbor beacon), deep-sea near-black ground.
   ============================================================ */

:root {
  /* deep sea */
  --abyss:      #05100e;
  --deep-1:     #081a15;
  --deep-2:     #0b241d;
  --hairline:   #14352b;

  /* brand */
  --teal:       #0ea87b;   /* primary */
  --teal-bright:#17c793;
  --mint:       #46e3ad;   /* AA text on the abyss */
  --amber:      #ffd9a0;   /* beacon accent */
  --amber-deep: #f0b968;

  /* neutrals (sea fog) */
  --fog:        #6f8a80;
  --fog-bright: #a6c0b6;
  --white:      #eef6f2;

  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-body:    "Barlow", system-ui, -apple-system, sans-serif;

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--abyss);
  color: var(--fog-bright);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Faint depth-contour chart in the far background — the signature texture. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(14,168,123,0.10), transparent 55%),
    radial-gradient(90% 70% at 8% 100%, rgba(255,217,160,0.05), transparent 60%);
}

.chart-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* eyebrows / instrument labels ---------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0;
}
.eyebrow .dot { color: var(--fog); }

/* ---- masthead ---- */
.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.6rem var(--gut);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand img.seal { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(14,168,123,0.4)); }
.brand img.wordmark { height: 20px; width: auto; object-fit: contain; opacity: 0.95; }
.brand .hq {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--abyss);
  background: var(--amber);
  padding: 0.05em 0.5em 0;
  line-height: 1.3;
  border-radius: 2px;
}

.readout {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  align-items: center;
}
.readout b { color: var(--fog-bright); font-weight: 500; }
.readout .live { color: var(--mint); }
.readout .sep { color: var(--hairline); }

/* ---- hero: the brain-state / operating phase ---- */
.bridge {
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--hairline);
}
.bridge .eyebrow { margin-bottom: 1.4rem; }

.phase-now {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 13rem);
  line-height: 0.82;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 0;
  text-transform: uppercase;
}
.phase-now .beacon {
  color: var(--amber);
  text-shadow: 0 0 34px rgba(255,217,160,0.45);
}
.bridge .caption {
  max-width: 44ch;
  margin: 1.5rem 0 0;
  color: var(--fog-bright);
  font-size: 1.05rem;
}

/* phase track — the release cycle rail */
.track {
  margin-top: clamp(2rem, 5vw, 3.2rem);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}
.track::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0; right: 0;
  height: 1px;
  background: var(--hairline);
}
.stop {
  position: relative;
  padding-top: 1.6rem;
  text-align: left;
}
.stop .node {
  position: absolute;
  top: 0; left: 0;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--abyss);
  border: 2px solid var(--hairline);
}
.stop .label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fog);
}
.stop.done .node { border-color: var(--teal); background: var(--teal); }
.stop.done .label { color: var(--fog-bright); }
.stop.current .node {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255,217,160,0.14);
  animation: pulse 2.6s ease-in-out infinite;
}
.stop.current .label { color: var(--amber); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,217,160,0.12); }
  50%      { box-shadow: 0 0 0 9px rgba(255,217,160,0.03); }
}

/* ---- station panels (agent outputs) ---- */
.panels {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3.5rem, 8vw, 5rem);
}
.panels-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 4vw, 2.4rem);
}
.panels-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.04em;
  color: var(--white);
  margin: 0.4rem 0 0;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.panel {
  background: var(--deep-1);
  padding: 1.6rem 1.5rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 190px;
  transition: background 0.25s ease;
}
.panel:hover { background: var(--deep-2); }
.panel .tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.panel .tag .cadence { color: var(--fog); }
.panel h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}
.panel p { margin: 0; color: var(--fog-bright); font-size: 0.94rem; }
.panel .status {
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.panel .status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fog);
  box-shadow: 0 0 0 3px rgba(111,138,128,0.12);
}
.panel.locked .status { color: var(--amber-deep); }
.panel.locked .status::before { background: var(--amber-deep); box-shadow: 0 0 0 3px rgba(240,185,104,0.12); }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem var(--gut) 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer .mark { font-family: var(--font-display); letter-spacing: 0.12em; color: var(--fog-bright); font-size: 1.05rem; }
.footer .mark b { color: var(--white); }
.footer .build {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
}

/* ---- load reveal (the one orchestrated motion moment) ---- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: var(--d, 0s);
  }
  .panels-head { animation: rise 0.7s cubic-bezier(0.2,0.7,0.2,1) both; }
  .panel {
    opacity: 0;
    animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) both;
  }
  .panel:nth-child(1) { animation-delay: 0.02s; }
  .panel:nth-child(2) { animation-delay: 0.08s; }
  .panel:nth-child(3) { animation-delay: 0.14s; }
  .panel:nth-child(4) { animation-delay: 0.20s; }
  .panel:nth-child(5) { animation-delay: 0.26s; }
  .panel:nth-child(6) { animation-delay: 0.32s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- a11y / motion ---- */
a { color: var(--mint); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .stop.current .node { animation: none; }
  * { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .track { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 1rem; }
  .track::before { display: none; }
  .readout { font-size: 0.66rem; gap: 0.7rem; }
}
