/* American Gigawatt
   Set like an American industrial drawing sheet: a drawn frame, printer's rules,
   drafted linework, a title block. Flat spot colors only, no gradients except the
   energized bus, no radii, no shadows. Brand tokens per the Alchemy Industrial
   style guide (teal #007167, amber #F59E0B, Gotham). */

@font-face { font-family: 'Gotham'; src: url('/fonts/Gotham-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('/fonts/Gotham-Book.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('/fonts/Gotham-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('/fonts/Gotham-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('/fonts/Gotham-Black.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --teal: #007167;
  --teal-dark: #00594F;
  --amber: #F59E0B;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --desk: #E2E7E4;
  --paper: #F3F5F4;
  --card: #FFFFFF;
  --hair: rgba(26, 26, 26, 0.2);
  --hair-strong: rgba(26, 26, 26, 0.42);

  --gutter: clamp(1.125rem, 3.6vw, 2.75rem);
  --measure: 58ch;
  --label-col: 8.5rem;
  --font: 'Gotham', 'Helvetica Neue', Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--desk); }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p, h1, h2, ul, dl, dd, dt { margin: 0; }
ul { padding: 0; list-style: none; }

/* ── The sheet: a drawn frame with an inner border, as on a drawing sheet ── */

.sheet {
  max-width: 1180px;
  margin: clamp(0.5rem, 2vw, 1.75rem) auto;
  padding: 9px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}

.sheet-inner { border: 1px solid var(--hair-strong); }

.wrap { padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--card);
  padding: 0.75rem 1rem; font-weight: 500; text-decoration: none;
}
.skip:focus { left: 0; }

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

/* Printer's rules: thick over thin. */
.rule-heavy { height: 6px; background: var(--ink); }
.rule-hair { height: 1.5px; background: var(--ink); margin-top: 3px; }

/* ── Masthead ────────────────────────────────────────────────────────────── */

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem 0.9375rem;
}

.wordmark {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
}
.wordmark-gw { color: var(--teal); }

.origin {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}

/* ── Lead ────────────────────────────────────────────────────────────────── */

.lead { padding-block: clamp(2.25rem, 6vh, 3.5rem) clamp(1.5rem, 3.5vh, 2rem); }

.lead-title {
  font-size: clamp(2rem, 5.6vw, 4.125rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.017em;
  max-width: 19ch;
  margin-bottom: clamp(1rem, 2.2vw, 1.5rem);
}

.lead-text {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 44ch;
}

/* ── One-line diagram: the loads tapping a grid that cannot serve them ──── */

.oneline { padding-block: 0 clamp(2.5rem, 6vh, 3.75rem); }

/* The bus draws itself once, the way a line goes down on a sheet. */
.oneline-bus {
  position: relative;
  height: 4px;
  background: var(--teal);
  transform-origin: left center;
  animation: draw-x 700ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}

@keyframes draw-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.oneline-taps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tap {
  position: relative;
  padding-top: 3rem;
}

/* Amber marks the load: the thing drawing power off the bus. */
.tap-node {
  position: absolute;
  top: -8px;
  left: -6px;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border: 3px solid var(--ink);
}

/* Starts at the node's bottom edge (-8px + 12px) so the line meets it, not crosses it. */
.tap-drop {
  position: absolute;
  top: 4px;
  left: -1px;
  width: 2px;
  height: calc(3rem - 4px);
  background: rgba(0, 113, 103, 0.55);
}

.tap-label {
  display: block;
  padding-left: 0.75rem;
  font-size: clamp(0.6875rem, 1.1vw, 0.8125rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  line-height: 1.35;
}

/* ── Spec blocks: label column, body column ─────────────────────────────── */

.block {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  border-top: 1.5px solid var(--hair);
  padding-block: clamp(1.875rem, 5vh, 2.75rem);
}

.block-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  line-height: 1.5;
  color: var(--teal);
  padding-top: 0.3125rem;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.66;
  max-width: var(--measure);
}

.prose-wide { max-width: 64ch; }

/* Set in two columns with a rule between, the way a printed leaflet would. */
@media (min-width: 62rem) {
  .columns {
    columns: 2;
    column-gap: 2.25rem;
    column-rule: 1px solid var(--hair);
  }
  .columns .prose { max-width: none; }
}

.statement {
  margin-top: clamp(1.375rem, 3vw, 2rem);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.not-list {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  margin-bottom: clamp(1.375rem, 3vw, 1.75rem);
}

.not-list li {
  position: relative;
  align-self: flex-start;
  font-size: clamp(1.125rem, 2.1vw, 1.4375rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

.not-list li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  height: 1.5px;
  background: var(--muted);
  opacity: 0.55;
}

/* ── Join ────────────────────────────────────────────────────────────────── */

.join {
  border-top: 1.5px solid var(--hair);
  padding-block: clamp(2.5rem, 6vh, 3.5rem) clamp(3rem, 8vh, 4.5rem);
}

.belong {
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 20ch;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
}

.card {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--ink);
  border-top: 8px solid var(--amber);
  padding: clamp(1.25rem, 2.6vw, 1.75rem) clamp(1.375rem, 3vw, 2.25rem);
  max-width: 33rem;
}

.card-heading {
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  line-height: 1.3;
}

.card-note {
  margin-top: 0.4375rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34ch;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 3px solid var(--amber);
  padding-bottom: 2px;
  word-break: break-word;
  transition: color 120ms linear, background 120ms linear;
}

.card-link:hover,
.card-link:focus-visible {
  color: var(--ink);
  background: var(--amber);
}

/* ── Colophon and title block ───────────────────────────────────────────── */

.titleblock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--hair);
}

.titleblock-cell {
  padding: 1rem 1.125rem 1rem 1.125rem;
  border-left: 1px solid var(--hair);
}
.titleblock-cell:first-child { border-left: 0; padding-left: 0; }

.titleblock dt {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  line-height: 1.4;
}

.titleblock dd {
  margin-top: 0.3125rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.titleblock a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 113, 103, 0.4);
}
.titleblock a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.colophon-text {
  padding-block: 1rem 1.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}

/* ── Small screens ──────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .sheet { padding: 5px; margin-block: 0.375rem; }

  .block {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
  }
  .block-label { padding-top: 0; }
}

@media (max-width: 600px) {
  .oneline-diagram {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
  }

  .oneline-bus {
    height: auto;
    width: 4px;
    transform-origin: center top;
    animation-name: draw-y;
  }

  .oneline-taps {
    display: block;
    padding-block: 0.5rem;
  }

  .tap {
    display: flex;
    align-items: center;
    padding-top: 0;
    min-height: 2.75rem;
  }

  /* Centred on the 4px bus in the first grid column. */
  .tap-node { top: 50%; left: -8px; transform: translateY(-50%); }

  /* Clears the node's right edge, same reason as the vertical drop above. */
  .tap-drop {
    position: static;
    flex: 0 0 calc(1.375rem - 4px);
    width: calc(1.375rem - 4px);
    height: 2px;
    margin-left: 4px;
    margin-right: 0.875rem;
  }

  .tap-label { padding-left: 0; }

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

  .titleblock-cell {
    border-left: 0;
    padding: 0.8125rem 0;
    border-top: 1px solid var(--hair);
  }
  .titleblock-cell:first-child { border-top: 0; padding-top: 0.9375rem; }
}

@keyframes draw-y {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .oneline-bus { animation: none; }
  .card-link { transition: none; }
}

/* ── Founding-community signup form ─────────────────────────────────────── */
.card-form { margin-top: 1rem; }
.card-form-label {
  display: block;
  font-size: 0.625rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--muted); margin-bottom: 0.5rem;
}
.card-form-row {
  display: flex; max-width: 30rem;
  border: 1.5px solid var(--ink); background: var(--card);
}
.card-form-row:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.card-form-input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  padding: 0.75rem 0.875rem; font-family: var(--font); font-size: 1rem; color: var(--ink);
}
.card-form-input::placeholder { color: var(--muted); }
.card-form-input:focus { outline: none; }
.card-form-btn {
  flex: 0 0 auto; border: 0; border-left: 1.5px solid var(--ink);
  background: var(--ink); color: var(--card);
  font-family: var(--font); font-weight: 700; text-transform: uppercase; letter-spacing: 0.11em;
  font-size: 0.8125rem; padding: 0 1.25rem; cursor: pointer;
  transition: background 120ms linear, color 120ms linear;
}
.card-form-btn:hover, .card-form-btn:focus-visible { background: var(--amber); color: var(--ink); }
.card-form-btn:disabled { opacity: 0.55; cursor: default; }
.card-form-status { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.5; min-height: 1.2em; }
.card-form-status.is-ok { color: var(--teal-dark); font-weight: 500; }
.card-form-status.is-err { color: #B42318; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
