/* ============================================================
   MCEG — Mission Critical Environments Group
   Design language: control-room drawing sheet
   ============================================================ */

:root {
  --ink: #14243f;
  --ink-soft: #2a3b57;
  --console: #0b1523;
  --paper: #edeff2;
  --sheet: #f7f8fa;
  --graphite: #6d7176;
  --rule: #c6cdd5;
  --rule-soft: #dde2e7;
  --signal: #2e7bc4;

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --utility: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--signal); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; max-width: 68ch; }

.lede {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* mono utility label — the drawing-sheet callout */
.tag {
  font-family: var(--utility);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  display: block;
  margin-bottom: 1rem;
}
.tag--rule {
  border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(56px, 9vw, 108px); }
.band--tight { padding-block: clamp(40px, 6vw, 72px); }
.band--sheet { background: var(--sheet); }
.band--dark { background: var(--console); color: #dfe6ee; }
.band--dark h2, .band--dark h3 { color: #fff; }
.band--dark .tag { color: #7f93ab; }
.band--dark .tag--rule { border-color: #22344c; }
.band--dark p { color: #b9c6d4; }
.band--dark a { color: #fff; }

.band--video { position: relative; overflow: hidden; }
.band__bgvideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.band--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 35, 0.82);
}
.band--video .wrap { position: relative; }

.divide { border-top: 1px solid var(--rule); }

.cols {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .cols--2 { grid-template-columns: 1fr 1fr; }
  .cols--side { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .cols--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 239, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.masthead__logo img { height: 34px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  font-family: var(--utility);
  font-size: 0.85rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--signal); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--utility);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--onDark { background: #fff; border-color: #fff; color: var(--console); }
.btn--onDark:hover { background: var(--signal); border-color: var(--signal); color: #fff; }

/* ---------- hero ---------- */

.hero { padding-top: clamp(40px, 6vw, 76px); padding-bottom: clamp(24px, 4vw, 40px); }
.hero h1 { max-width: 16ch; }
.hero__lede { margin-top: 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* ---------- the plan drawing (signature) ---------- */

.plan {
  border: 1px solid var(--rule);
  background: var(--sheet);
  position: relative;
}
.plan__stage { padding: clamp(10px, 2vw, 22px); }
.plan svg { width: 100%; height: auto; display: block; }

.plan__meta {
  border-top: 1px solid var(--rule);
  padding: 10px clamp(12px, 2vw, 22px);
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* drawing element states */
.dwg-base { stroke: var(--rule); fill: none; }
.dwg-room { stroke: var(--ink); stroke-width: 2; fill: none; }
.dwg-layer { opacity: 0; transition: opacity 0.45s ease; }
.dwg-layer.is-active { opacity: 1; }
.dwg-label {
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.09em;
  fill: var(--graphite);
  text-transform: uppercase;
}
.dwg-label--sig { fill: var(--signal); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dwg-layer { transition: none; }
  .pulse { animation: none !important; }
}

.pulse { animation: none; transform-origin: center; }
.dwg-layer.is-active .pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* capability switcher */
.switch { list-style: none; margin: 0; padding: 0; }
.switch li { border-top: 1px solid var(--rule); }
.switch li:last-child { border-bottom: 1px solid var(--rule); }
.switch button {
  width: 100%;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  align-items: baseline;
  gap: 4px;
  text-align: left;
  background: none;
  border: 0;
  padding: 18px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--graphite);
  transition: color 0.2s ease;
}
.switch button:hover { color: var(--ink); }
.switch button[aria-selected="true"] { color: var(--ink); }
.switch__num {
  font-family: var(--utility);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--graphite);
}
.switch button[aria-selected="true"] .switch__num { color: var(--signal); }
.switch__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.switch__desc {
  grid-column: 2;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--graphite);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, margin 0.35s ease;
  margin-top: 0;
}
.switch button[aria-selected="true"] .switch__desc {
  max-height: 8rem;
  margin-top: 8px;
}

/* ---------- content blocks ---------- */

.spec { list-style: none; margin: 0; padding: 0; }
.spec li {
  border-top: 1px solid var(--rule-soft);
  padding: 14px 0;
  display: grid;
  gap: 2px;
}
.spec li:last-child { border-bottom: 1px solid var(--rule-soft); }
.spec__k {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}
.spec__v { font-size: 1rem; }

.card {
  border: 1px solid var(--rule);
  background: var(--sheet);
  padding: clamp(22px, 3vw, 34px);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  font-family: var(--utility);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--signal);
  display: block;
  margin-bottom: 14px;
}

.checklist { list-style: none; margin: 0 0 1.2em; padding: 0; max-width: 62ch; }
.checklist li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.55;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--signal);
}

.stat { border-top: 1px solid var(--rule); padding-top: 14px; }
.stat__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
}
.stat__l {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-top: 10px;
  display: block;
}
.stats { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.pill-row li {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 7px 12px;
  color: var(--ink-soft);
}

.quote {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  border-left: 2px solid var(--signal);
  padding-left: clamp(18px, 3vw, 30px);
  max-width: 30ch;
  margin: 0;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
table.grid th, table.grid td {
  text-align: left;
  padding: 15px 14px 15px 0;
  border-top: 1px solid var(--rule-soft);
  vertical-align: top;
}
table.grid th {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  white-space: nowrap;
  width: 34%;
}

.note {
  font-size: 0.85rem;
  color: var(--graphite);
  border-left: 2px solid var(--rule);
  padding-left: 14px;
  max-width: 60ch;
}

/* ---------- form ---------- */

.form { display: grid; gap: 18px; max-width: 34rem; }
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--signal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 123, 196, 0.16);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- footer ---------- */

.foot {
  background: var(--console);
  color: #9fb0c2;
  padding-block: clamp(44px, 6vw, 72px);
  font-size: 0.92rem;
}
.foot a { color: #dfe6ee; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.foot__head {
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f8298;
  margin-bottom: 14px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot__logo img { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.foot__legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #1e3049;
  font-family: var(--utility);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f7288;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .masthead__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    padding-block: 12px;
  }
  .masthead__logo img { height: 30px; }
  .nav { justify-content: space-between; gap: 6px; flex-wrap: nowrap; }
  .nav a { font-size: 0.66rem; letter-spacing: 0.07em; }
}

@media (max-width: 760px) {
  /* keep drawing callouts legible once the SVG scales down */
  .dwg-label { font-size: 18px; letter-spacing: 0.05em; }
  .plan__meta { font-size: 0.62rem; }
  .switch__name { font-size: 1.15rem; }
  .switch button { grid-template-columns: 2.6rem 1fr; }
}

/* ---------- portrait ---------- */

.portrait { margin: 26px 0 0; max-width: 22rem; }
.portrait img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.portrait figcaption {
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  border-top: 1px solid var(--rule);
  margin-top: -1px;
  padding: 9px 2px;
}
@media (max-width: 859px) {
  .portrait { max-width: 16rem; }
}

/* ---------- fixes & additions ---------- */

/* buttons inside dark bands must beat `.band--dark a` on specificity */
.band--dark .btn--onDark,
.foot .btn--onDark { color: var(--console); }
.band--dark .btn--onDark:hover,
.foot .btn--onDark:hover { color: #fff; }
.band--dark .btn { text-decoration: none; }

/* larger, legible logo lockup */
.masthead__logo img { height: 58px; }
.foot__logo img { height: 64px; }
@media (max-width: 640px) {
  .masthead__logo img { height: 46px; }
}

/* photography slots */
.shot { margin: 0; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.shot--wide { aspect-ratio: 16 / 9; }
.shot--wide img { aspect-ratio: 16 / 9; }
.shot figcaption {
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  border-top: 1px solid var(--rule);
  margin-top: -1px;
  padding: 9px 2px;
}
.band--dark .shot figcaption { color: #7f93ab; border-color: #22344c; }

/* empty-slot state — visible in dev, invisible once a real file is dropped in */
.shot--empty {
  border: 1px dashed var(--rule);
  background: var(--sheet);
  display: grid;
  place-items: center;
  min-height: 240px;
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  text-align: center;
  padding: 20px;
}
