/* Gromator home: the parts only the home page uses. Loads after base.css. */

.k {
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* The engineer-of-record line under the hero lede */
.pe-line {
  margin-top: 12px; font-weight: 650; font-size: clamp(16px, .95rem + .2vw, 18px);
  text-shadow: 0 0 2px var(--paper), 0 0 6px var(--paper), 0 0 10px var(--paper);
}

/* The parcel: built-up tint inside a property line, the screen on it */
.parcel {
  position: relative; margin-top: clamp(48px, 5vw, 72px);
  width: min(100%, 1060px);
  padding: clamp(14px, 2.2vw, 30px);
  background: var(--built);
  border: 1.5px dashed var(--ink);
}

/* ---------- The product screen: a real calc output, cropped, not edited ---------- */
.screen { background: #fff; border: 1px solid var(--ink); font-size: 14px; line-height: 1.45; color: var(--ink); }
.scr-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 14px 18px; border-bottom: 1px solid var(--rule);
}
.scr-title { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; }
.scr-title span { font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.calc-img { display: block; width: 100%; height: auto; }
.calc-cap { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.k { font-size: 11px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }

/* Problem: the legend */
.problem { border-top: 1.5px solid var(--ink); }
.legend { border-top: 1px solid var(--ink); }
.leg-row {
  display: grid; grid-template-columns: 320px minmax(200px, 260px) 1fr;
  grid-template-areas: "sym num txt"; align-items: center; gap: 24px 48px;
  padding: 34px 0; border-bottom: 1px solid var(--ink);
}
.leg-sym { grid-area: sym; }
.leg-num { grid-area: num; font-weight: 700; font-stretch: 118%; font-size: clamp(2.6rem, 1.6rem + 2.4vw, 4rem); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.leg-txt { grid-area: txt; max-width: 46ch; color: var(--ink-2); }
.stations { width: 300px; }
.stations line { stroke: var(--ink); stroke-width: 1.5; }
.stations polygon { fill: var(--ink); }
.scalebar { width: 300px; overflow: visible; }
.scalebar line { stroke: var(--ink); stroke-width: 1.5; }
.scalebar rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.scalebar rect.k { fill: var(--ink); }
.units { display: grid; grid-template-columns: repeat(8, 28px); gap: 5px; }
.units i { display: block; aspect-ratio: 1; border: 1.5px solid var(--ink); background: transparent; }
.units i.on { background: var(--ink); }

/* What it does: legend symbols */
.does { border-top: 1.5px solid var(--ink); }
.symbols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 56px; }
.symbols li { display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start; }
.symbols p { color: var(--ink-2); max-width: 44ch; }
.report { margin-top: 36px; font: italic 18px/1.5 var(--label); color: var(--hydro); max-width: 60ch; }

/* Your plans and data: marginal information */
.data h2 { margin-bottom: clamp(36px, 4vw, 52px); }
.margin-notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 40px; margin-bottom: 40px; }
.margin-notes li { border-top: 1.5px solid var(--ink); padding-top: 16px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }

/* Founder */
.founder { border-top: 1.5px solid var(--ink); }
.founder-in { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 32px 64px; align-items: start; }
.founder-name { font-size: 15px; font-weight: 700; max-width: none; line-height: 1.6; padding-top: 6px; }
.founder-p { font-size: clamp(19px, 1rem + .5vw, 23px); line-height: 1.5; max-width: 40ch; margin-bottom: 22px; }
.founder .map-label { margin-bottom: 0; }

/* ---------- Motion: the parcel lands, two small legend reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .parcel { animation: land .75s var(--ease-out) .26s both; }

  .js .scalebar.wait { clip-path: inset(0 100% 0 0); }
  .scalebar { transition: clip-path .9s var(--ease-in-out); }
  .js .units.wait i.on { background: transparent; }
  .js .units.wait.in i.on { background: var(--ink); }
  .units i.on { transition: background-color .25s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
  .units i.on:nth-child(2) { --d: 70; } .units i.on:nth-child(3) { --d: 135; }
  .units i.on:nth-child(4) { --d: 195; } .units i.on:nth-child(5) { --d: 250; }
  .units i.on:nth-child(6) { --d: 300; } .units i.on:nth-child(7) { --d: 345; }
  .units i.on:nth-child(8) { --d: 385; } .units i.on:nth-child(9) { --d: 420; }
  .units i.on:nth-child(10) { --d: 450; } .units i.on:nth-child(11) { --d: 475; }
  .units i.on:nth-child(12) { --d: 495; } .units i.on:nth-child(13) { --d: 510; }
  .js .reveal.in { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .parcel { animation: fade .3s ease both; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .leg-row { grid-template-columns: 300px 1fr; grid-template-areas: "sym num" "sym txt"; gap: 12px 40px; }
  .margin-notes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .symbols { grid-template-columns: 1fr; }
  .symbols p { max-width: 60ch; }
  .founder-in { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .leg-row { grid-template-columns: 1fr; grid-template-areas: "num" "sym" "txt"; gap: 16px; padding: 28px 0; }
  .margin-notes { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 520px) {
  .scr-bar { padding: 12px 14px; }
  .stations, .scalebar { width: 100%; max-width: 300px; }
  .units { grid-template-columns: repeat(8, 1fr); max-width: 300px; }
}
