/* Hallmark · genre: editorial · macrostructure: Marquee Hero · theme: Brutal
 * enrichment: full-bleed photographic fold (no polish pattern) · nav: N6 Masthead · footer: Ft4 Dense colophon
 * knobs — H1 Marquee: size=xxl, alignment=left-bias, underlay=rule-below
 *         N6 Masthead: issue-line=below-wordmark, wordmark=3xl, rule=double
 *         F3 Spec sheet: columns=3, rules=every-row, numbers=tabular
 *         F6 Fleet grid: ratio=4/3, density=3-up, micro-action=none
 *         Ft4 Colophon: family=sans, layout=single-block
 * audience: private + contractors · use: quote-request form · tone: brutalist
 * fonts: Bricolage Grotesque (display) + IBM Plex Sans (body) + Geist Mono (outlier, 2 slots)
 * slop test 58/58 — contrast: pass (40–41) · nav: N6 · footer: Ft4 · slop: pass (42–45)
 *   honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49)
 *   icons: pass (30) · mobile: pass (34, 49, 50–57) — verified at 320/375/414/768
 * Hallmark · pre-emit critique: P5 H5 E5 S4 R4 V5
 */

/* ============================================================ base */

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

body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal; /* headers are roman — never italic */
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.04; /* all-caps display floor */
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

hr.rule-slab {
  border: 0;
  border-top: var(--rule-slab) solid var(--color-ink);
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  white-space: nowrap;
}
.skip:focus { left: var(--space-xs); top: var(--space-xs); }

/* Focus is instant and never animated. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Placeholder markers — visibly unfinished, so they can't ship by accident. */
.tbd {
  border-bottom: var(--rule-hair) dashed var(--color-accent);
  color: var(--color-muted);
  white-space: nowrap;
}

.placeholder {
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: 62ch;
  border-inline-start: var(--rule-thick) solid var(--color-accent);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-paper-2);
  color: var(--color-ink-2);
  margin-block: var(--space-lg) var(--space-xl);
}
.placeholder strong { font-weight: 600; }

/* ============================================================ N6 masthead */

.mast {
  display: grid;
  justify-items: center;
  gap: var(--space-2xs);
  padding: var(--space-lg) var(--page-gutter) 0;
  text-align: center;
}

.mast__name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 6.5vw, var(--text-3xl));
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-decoration: none;
  overflow-wrap: anywhere;
  min-width: 0;
}

.mast__line {
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.mast__sep { padding-inline: var(--space-2xs); }
.mast__tel { text-decoration: none; }

.mast__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-lg);
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0 0;
}

.mast__nav a {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap; /* labels never wrap */
  padding: var(--space-xs) 0;
  min-height: 44px;
  border-bottom: var(--rule-thick) solid transparent;
  transition: border-color var(--dur-micro) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .mast__nav a:hover { border-bottom-color: var(--color-accent); }
}
.mast__nav a:active { border-bottom-color: var(--color-ink); }
.mast__nav a:focus-visible { border-bottom-color: transparent; }

/* double rule — full-bleed: cancels .mast's page-gutter padding so the rule
   meets the viewport edges and lines up with the full-bleed hero below it. */
.mast__rule {
  justify-self: stretch;
  width: auto;
  border: 0;
  border-top: var(--rule-hair) solid var(--color-rule-2);
  border-bottom: var(--rule-thick) solid var(--color-ink);
  height: var(--space-2xs);
  margin: var(--space-md) calc(var(--page-gutter) * -1) 0;
}

/* ============================================================ H1 marquee hero */

/* Flex, not grid: an abspos child of a grid container gets re-scoped to the grid
   area, which shrink-wraps the background image to the headline's row. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 68dvh;
  display: flex;
  align-items: flex-end;
  /* bottom-heavy: pulls the fold into the next section's rhythm (gate 44a) */
  padding: var(--space-2xl) var(--page-gutter) var(--space-3xl);
  background: var(--color-ink);
  color: var(--color-paper);
}

.hero__img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(to top, var(--overlay-ink-strong), var(--overlay-ink-soft));
}

.hero__display {
  position: relative;
  z-index: 2;
  font-size: var(--text-display);
  letter-spacing: -0.035em;
  max-width: 16ch;
  color: var(--color-paper);
  animation: rise var(--dur-long) var(--ease-out) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================ bands */

.band {
  padding-inline: var(--page-gutter);
  /* Section padding is deliberately uneven — see each modifier. */
}

.band--services { padding-block: var(--space-3xl) var(--space-2xl); }
.band--fleet    { padding-block: var(--space-2xl) var(--space-4xl); }
.band--work     { padding-block: var(--space-3xl); background: var(--color-ink); color: var(--color-paper); }
.band--quote    { padding-block: var(--space-4xl) var(--space-3xl); background: var(--color-paper-2); }

/* S2 · Hanging section head — single column, stacked. No eyebrow, no left-margin label. */
.head {
  display: grid;
  gap: var(--space-md);
  max-width: 46ch;
  margin-bottom: var(--space-xl);
}
.head h2 {
  font-size: var(--text-display-s);
  letter-spacing: -0.03em;
}
.head__lede {
  font-size: var(--text-md);
  line-height: 1.5;
  max-width: 46ch;
  color: var(--color-ink-2);
}
.band--work .head__lede { color: var(--color-paper-3); }

.band__note {
  margin-top: var(--space-xl);
  max-width: 58ch;
  color: var(--color-ink-2);
}

/* Typographic link CTA — C3, knobs: underline=solid, hover=thicken, arrow=→ */
.tlink {
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-accent);
  transition: text-decoration-thickness var(--dur-micro) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tlink:hover { text-decoration-thickness: 4px; }
}
.tlink:active { text-decoration-color: var(--color-ink); }

/* ============================================================ F3 spec sheet */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  text-align: start;
}

.spec thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  padding: 0 var(--space-md) var(--space-xs) 0;
  border-bottom: var(--rule-thick) solid var(--color-ink);
  text-align: start;
}

.spec tbody th,
.spec tbody td {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: baseline;
  text-align: start;
}

.spec tbody th {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-size: var(--text-md);
  width: 30%;
}

.spec tbody td { color: var(--color-ink-2); }

.spec__who {
  font-family: var(--font-mono); /* outlier: technical data role */
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
  width: 22%;
}

/* Below 60rem the table becomes stacked blocks — a table of 3 columns is not a phone layout. */
@media (max-width: 60rem) {
  .spec thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec tbody tr {
    display: grid;
    gap: var(--space-2xs);
    padding-block: var(--space-md);
    border-bottom: var(--rule-hair) solid var(--color-rule);
  }
  .spec tbody th,
  .spec tbody td {
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .spec__who { white-space: normal; }
}

/* ============================================================ F6 fleet grid */

.fleet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl) var(--space-lg);
}

.fleet__item { display: grid; gap: var(--space-xs); align-content: start; }

.fleet__media {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-paper-3);
  border: var(--rule-thick) solid var(--color-ink);
}
.fleet__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-long) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .fleet__item:hover .fleet__media img { transform: scale(1.02); }
}

.fleet__item h3 {
  font-size: var(--text-md);
  margin-top: var(--space-2xs);
}
.fleet__item p { color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.5; }

.fleet__spec {
  font-family: var(--font-mono); /* outlier: technical data role */
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}
.fleet__spec span {
  text-transform: uppercase;
  color: var(--color-neutral);
  padding-inline-end: var(--space-3xs);
}

@media (max-width: 60rem) { .fleet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .fleet { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ gallery */

.placeholder--onink {
  background: var(--color-ink-2);
  color: var(--color-paper-3);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-lg);
}

.gallery__fig { grid-column: span 3; margin: 0; }
.gallery__fig--wide { grid-column: span 3; }

/* Every figure shares one media height, so the span only varies the width.
   Matching aspect-ratios per span would leave a hole beside the wide figure. */
.gallery__media {
  height: clamp(12rem, 20vw, 19rem);
  overflow: hidden;
  border: var(--rule-thick) solid var(--color-paper);
}
.gallery__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__fig figcaption {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-paper-3);
  padding-top: var(--space-xs);
}

@media (min-width: 60rem) {
  .gallery__fig { grid-column: span 2; }
  .gallery__fig--wide { grid-column: span 4; }
}
@media (max-width: 40rem) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery__fig,
  .gallery__fig--wide { grid-column: span 1; }
}

/* ============================================================ quote form */

.quote { max-width: 62rem; }

.quote__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}
.field--wide { grid-column: 1 / -1; }

@media (max-width: 40rem) {
  .quote__grid { grid-template-columns: minmax(0, 1fr); }
  .field--wide { grid-column: auto; }
}

.field { display: grid; gap: var(--space-2xs); }

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Border width is 1px in EVERY state — no layout shift on focus or error. */
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-neutral);
  outline: 2px solid transparent; /* reserved focus slot */
  outline-offset: 1px;
  border-radius: var(--radius-none);
  padding: var(--space-sm) var(--space-md);
  min-height: 48px;
  width: 100%;
  transition: background-color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}

.field ::placeholder { color: var(--color-neutral); }

@media (hover: hover) and (pointer: fine) {
  .field input:hover,
  .field select:hover,
  .field textarea:hover { background: var(--color-paper-2); }
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-color: var(--color-focus);
  border-color: var(--color-ink-2);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field [aria-invalid="true"] { border-color: var(--color-error); }

/* Helper reserves one line so an error never pushes the page down. */
.field__help {
  min-height: 1lh;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-muted);
}
.field__help[data-state="error"] { color: var(--color-error); font-weight: 600; }

.quote__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
}

.btn {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-base);
  white-space: nowrap; /* the label never wraps */
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-sm) var(--space-xl);
  color: var(--color-accent-ink);
  background: var(--color-accent);
  border: var(--rule-thick) solid var(--color-ink);
  border-radius: var(--radius-none);
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn__spinner { display: none; }
.btn[data-state="loading"] .btn__spinner {
  display: block;
  width: 1em;
  height: 1em;
  border: 2px solid var(--color-accent-ink);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.quote__status {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  max-width: 46ch;
}
.quote__status[data-state="error"] { color: var(--color-error); }
.quote__status[data-state="success"] { color: var(--color-success); }
.quote__status[data-state="notice"] { color: var(--color-ink-2); }

/* ============================================================ Ft4 colophon */

.colophon { margin-top: var(--space-2xl); }

.colophon p {
  padding: var(--space-xl) var(--page-gutter) var(--space-2xl);
  max-width: 72ch;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-ink-2);
}
.colophon strong {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

/* ============================================================ reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .hero__display { animation: none; }
  .fleet__item:hover .fleet__media img { transform: none; }
  .btn:hover { transform: none; }
  .btn[data-state="loading"] .btn__spinner {
    animation-iteration-count: infinite !important;
    animation-duration: 1200ms !important;
  }
}
