/* ==========================================================================
   GreySquare — commercial fitouts & construction
   Design system: the square module. Strict grid, hairline rules, no radii.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  --ink:        #1c1c1c;
  --grey:       #6e7175;
  --line:       #c8cacc;
  --paper:      #f2f2f0;
  --white:      #ffffff;
  --marker:     #e4572e;

  /* Inverted bands (.band--ink, .footer) — dark sections that structure the
     page. Held as tokens so the banding is defined in one place. */
  --band-bg:      var(--ink);
  --band-fg:      var(--paper);
  --band-grey:    #a9acb0;
  --band-label:   #9a9da1;
  --band-line:    #33363a;
  --band-link:    #d4d5d3;
  --band-faint:   #8c8f93;

  /* Hatch placeholders standing in for photography. */
  --hatch-bg:     #e6e6e3;
  --hatch-line:   #dcdcd9;
  --hatch-text:   #a2a29e;

  /* Text sitting on an --ink fill (solid buttons, skip link). */
  --on-ink:       #ffffff;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Square module — everything snaps to multiples of this */
  --unit: 8px;
  --gutter: 24px;
  --page-max: 1320px;

  --header-h: 76px;

  color-scheme: light;
}

/* --- Reset -------------------------------------------------------------- */

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

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

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

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

a { color: inherit; }

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

p { margin: 0; text-wrap: pretty; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

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

/* --- Utility layer ------------------------------------------------------ */

/* Mono labels: project codes, sector tags, tender dates. The trade lives in
   reference numbers, so the utility face does real work here. */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

.label--marker { color: var(--marker); }

/* A step up from the 11px utility size, for eyebrows carrying a section
   heading rather than a field name. Tracking eases off as the size grows. */
.label--lead {
  font-size: 15px;
  letter-spacing: 0.12em;
}

.shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--on-ink);
  padding: 12px 20px;
  z-index: 200;
}

.skip-link:focus { left: 0; }

/* --- Header ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
}

/* The mark is the name: a grey square. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* The logo lockup carries the wordmark inside the SVG, so it replaces both the
   old .brand__mark square and the .brand__name text. Height-constrained so the
   masthead row height stays put; width follows the 279:301 aspect.

   The artwork is dark ink on transparent. Referenced via <img> it cannot
   inherit currentColor (that only works for inline SVG), so the dark footer
   band inverts it instead. */
.brand__logo {
  height: 50px;
  width: auto;
  display: block;
}

.footer__brand .brand__logo { filter: invert(1); }

.brand__mark {
  width: 30px;
  height: 30px;
  background: var(--ink);
  position: relative;
  flex: none;
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: var(--marker);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.brand__name span { color: var(--grey); }

/* Groups the nav with the controls to its right so the masthead stays a simple
   two-part flex: brand on the left, everything else on the right. */
.masthead__end {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grey);
  transition: color 0.15s ease;
}

.nav__link:hover { color: var(--ink); }

.nav__link[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--marker);
}

/* Borderless — the bars are the control. The 44px box is kept as the touch
   target, not drawn. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* The border used to carry focus; with it gone the ring needs pulling in so it
   frames the bars rather than the empty touch target. */
.nav-toggle:focus-visible { outline-offset: -8px; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { background: var(--marker); border-color: var(--marker); color: #ffffff; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

/* --- Section furniture -------------------------------------------------- */

.band { padding-block: 96px; border-top: 1px solid var(--line); }

.band--tight { padding-block: 64px; }

/* Drops the bottom padding where a band butts against the footer and the two
   share a background — otherwise the padding stacks and reads as a gap. */
.band--flush { padding-bottom: 0; }

/* No dividing rule — the band keeps its standard spacing. */
.band--plain { border-top: 0; }

/* Consecutive plain bands share a background and have no rule between them, so
   both paddings stack into one gap: 96 + 96 = 192px, which reads as the page
   having ended. Trim BOTH sides of the join — cutting only the top leaves the
   96px bottom padding dominating and the gap barely changes. A plain band
   followed by another keeps 32px below it, and the next starts 32px in, for a
   64px join: enough to separate two services, not enough to strand them.
   The last plain band in a run keeps its full 96px before the footer. */
.band--plain:has(+ .band--plain) { padding-bottom: 32px; }

.band--plain + .band--plain { padding-top: 32px; }

/* A page header carrying only an eyebrow. It has no bottom padding of its own,
   so the distance down to the first section is set by that section's top
   padding alone rather than the two stacking. */
.band--header { padding-bottom: 0; }

/* Pairs with .band--header: trims the top padding to 64px so the header sits
   as close to the first section as the eyebrow previously did. Needs to beat
   the .band--plain + .band--plain rule above, which is more specific, so it
   carries the adjacency too rather than relying on source order. */
.band--flush-top,
.band--plain + .band--plain.band--flush-top { padding-top: 64px; }

.band--ink {
  background: var(--band-bg);
  color: var(--band-fg);
  border-top-color: var(--band-bg);
}

.band--ink .label { color: var(--band-label); }

.band__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.band__title {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 18ch;
}

.band__lead {
  color: var(--grey);
  max-width: 56ch;
  font-size: 17px;
}

.band--ink .band__lead { color: var(--band-grey); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  border-bottom: 1px solid var(--line);
  padding-block: 88px 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: end;
}

/* The original hero sat its short lead flush with the base of the image.
   A full copy block is taller than the square frame, so it aligns to the top
   instead and the image tracks the heading. */
.hero__grid--top { align-items: start; }

.hero__title {
  font-size: clamp(46px, 8.5vw, 104px);
  margin-block: 22px 28px;
}

.hero__title em {
  font-style: normal;
  color: var(--grey);
}

.hero__lead {
  color: var(--grey);
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero image. Square, holding the module the plate used to carry. The caption
   overlays the bottom-right corner in the mono utility face, set as a drawing
   annotation rather than a title. */
.hero-figure {
  position: relative;
  margin: 0;
}

/* The frame carries the ratio and the placeholder fill, so the caption below
   it stays outside the image box. */
.hero-figure__frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--hatch-bg);
  background-image: repeating-linear-gradient(
    45deg,
    var(--hatch-line) 0 1px,
    transparent 1px 9px
  );
  overflow: hidden;
}

/* A real <img> drops in and fills the frame; the placeholder sits behind it.
   <picture> is included because it, not the <img>, becomes the grid item when
   one wraps the image — without it the photo letterboxes inside the frame. */
.hero-figure picture,
.hero-figure img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-figure__placeholder {
  grid-area: 1 / 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hatch-text);
}

/* Same mono utility face as the hero eyebrow. Sits on a paper block so it stays
   legible over whatever photograph lands behind it. */
.hero-figure__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  max-width: 78%;
  padding: 12px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0 40px;
  margin-top: 72px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.hero__stat { display: flex; align-items: baseline; gap: 10px; }

.hero__stat b {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

/* --- Capability list ---------------------------------------------------- */

.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.caps__item {
  background: var(--paper);
  padding: 34px 30px 38px;
}

.caps__item h3 {
  font-size: 21px;
  margin-block: 14px 12px;
}

.caps__item p { color: var(--grey); font-size: 15px; }

/* --- Projects ----------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.filters__btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.filters__btn:hover { color: var(--ink); border-color: var(--grey); }

.filters__btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.project {
  background: var(--paper);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project[hidden] { display: none; }

/* Placeholder plate stands in for photography until real assets land. */
.project__figure {
  aspect-ratio: 4 / 3;
  background: var(--hatch-bg);
  background-image: repeating-linear-gradient(
    45deg,
    var(--hatch-line) 0 1px,
    transparent 1px 9px
  );
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
}

.project__figure span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hatch-text);
}

.project__body { padding: 24px 26px 30px; flex: 1; }

.project__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.project__body h3 { font-size: 20px; margin-bottom: 10px; }

.project__body p { color: var(--grey); font-size: 15px; }

.project__specs {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.project__specs div { display: grid; gap: 3px; }

.project__specs b {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
}

/* --- Split content ------------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.split--narrow { grid-template-columns: 0.85fr 1fr; }

.prose p + p { margin-top: 18px; }

.prose p { color: var(--grey); font-size: 17px; }

/* --grey is tuned against paper and goes muddy on an ink band. */
.band--ink .prose p { color: var(--band-grey); }

/* --- Services ------------------------------------------------------------
   One service per band, alternating light and ink. The title sits in the
   left column against a measure-capped copy column, echoing the .ledger
   label/content split without the numbering — these are not a sequence. */
.service {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.service__title {
  font-size: clamp(26px, 3vw, 38px);
  max-width: 14ch;
}


.prose p.prose__intro {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.5;
}

/* --- Ledger: values, credentials, process ------------------------------- */

.ledger { border-top: 1px solid var(--line); }

.band--ink .ledger { border-top-color: var(--band-line); }

.ledger__row {
  display: grid;
  /* Label column sized for the longest word used here ("CAPACITY"), not just
     the 01/02 numerals, so long labels never collide with the value. */
  grid-template-columns: 92px 1fr 1.4fr;
  gap: 28px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.band--ink .ledger__row { border-bottom-color: var(--band-line); }

.ledger__row h3 { font-size: 20px; }

.ledger__row p { color: var(--grey); font-size: 15px; }

.band--ink .ledger__row p { color: var(--band-grey); }

/* --- Team --------------------------------------------------------------- */

.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.team__card { background: var(--paper); padding: 26px 24px 30px; }

.team__avatar {
  width: 100%;
  aspect-ratio: 1;
  background: var(--hatch-bg);
  background-image: repeating-linear-gradient(
    45deg,
    var(--hatch-line) 0 1px,
    transparent 1px 9px
  );
  margin-bottom: 20px;
}

.team__card h3 { font-size: 18px; margin-bottom: 4px; }

/* --- Tenders ------------------------------------------------------------ */

.tender-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tender-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 400;
  padding: 0 16px 14px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.tender-table td {
  padding: 22px 16px 22px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 15px;
  color: var(--grey);
}

.tender-table td:first-child { padding-left: 0; }

.tender-table .t-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.tender-table .t-ref { font-family: var(--font-mono); font-size: 11px; color: var(--grey); }

.tender-table .t-close { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; }

.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--open { border-color: var(--marker); color: var(--marker); }

.pill--closing { border-color: var(--ink); color: var(--ink); }

.pill--closed { color: var(--grey); }

.table-scroll { overflow-x: auto; }

/* --- Forms -------------------------------------------------------------- */

/* position:relative contains the offscreen honeypot — without it the trap
   resolves against the page and can widen the document. */
.form { display: grid; gap: 20px; position: relative; }

.field { display: grid; gap: 8px; }

.field > label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--grey);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: 2px solid var(--marker);
  outline-offset: 1px;
}

/* Native select chrome ignores the padding above and sizes itself, so it came
   out a different height to the inputs and drew its own cramped arrow tight to
   the edge. Strip the appearance and draw the caret as a square-grid chevron:
   two hairlines, sharp corners, sized off the mono utility layer.

   Only the closed control is ours — the open option list is drawn by the OS and
   cannot be styled without replacing <select> with a JS widget, which is not
   worth the accessibility cost here. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  /* Room on the right for the caret so long options never run under it. */
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% + 1px),
    calc(100% - 17px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Firefox keeps a focus ring inside the control; the outline above is ours. */
.field select:-moz-focusring { color: transparent; text-shadow: 0 0 0 var(--ink); }

/* The empty "Select one" state reads as placeholder, not as a chosen value. */
.field select:has(option[value=""]:checked) { color: var(--grey); }

.field textarea { resize: vertical; min-height: 130px; }

.form__note { font-size: 13px; color: var(--grey); }

.form__status {
  padding: 14px 16px;
  border: 1px solid var(--marker);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
}

.form__status[hidden] { display: none; }

/* Sending and success are quieter than the default marker border — a hairline
   rule, so a sent form does not read as an alert. Failure keeps the marker. */
.form__status--pending { border-color: var(--line); color: var(--grey); }
.form__status--ok { border-color: var(--ink); }

/* Honeypot. Taken out of flow rather than display:none — bots ignore hidden
   inputs, and a real person never reaches it (offscreen, aria-hidden,
   tabindex -1). Must not shrink the form grid, hence position:absolute. */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Contact details ----------------------------------------------------
   The contact page is a single column running the full width of the shell. */

/* Phone and email sit above the form, side by side — two short values that
   would waste a row each if stacked. */
.contact-direct {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.contact-direct__item { display: grid; gap: 6px; }

.contact-direct__item a { text-decoration: none; }

.contact-direct__item a:hover { color: var(--marker); }

.contact-list__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- CTA ---------------------------------------------------------------- */

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta__title { font-size: clamp(28px, 4vw, 44px); max-width: 20ch; }

/* --- Footer ------------------------------------------------------------- */

.footer {
  background: var(--band-bg);
  color: var(--band-fg);
  padding-block: 64px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--band-line);
}

.footer__grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--band-label);
  margin-bottom: 18px;
}

.footer__links { display: grid; gap: 10px; }

.footer__links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--band-link);
  transition: color 0.15s ease;
}

.footer__links a:hover { color: var(--marker); }

.footer__brand .brand__mark { background: var(--band-fg); }

.footer__brand .brand__name { color: var(--band-fg); }

.footer__brand .brand__name span { color: var(--band-label); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
}

.footer__base .label { color: var(--band-faint); }

/* --- Motion ------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }

  .service { grid-template-columns: 1fr; gap: 24px; }
  .hero-figure__frame { max-width: 460px; }
  .caps,
  .projects { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split--narrow { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; }

  /* Tighter vertical rhythm — desktop padding reads as dead space on a phone. */
  .band { padding-block: 52px; }

  .band--tight { padding-block: 40px; }

  /* The stacked-gap problem is worse on a phone: a short viewport turns the
     doubled padding into a screen of nothing between each service. */
  .band--plain:has(+ .band--plain) { padding-bottom: 20px; }

  .band--plain + .band--plain { padding-top: 20px; }

  /* Both of these carry desktop values that are larger than the 52px mobile
     base, so without an override the page header sits further from the first
     service on a phone than on a desktop. */
  .band--header { padding-bottom: 0; }

  .band--flush-top,
  .band--plain + .band--plain.band--flush-top { padding-top: 36px; }

  /* .band--tight above is a padding-block shorthand, so it resets both sides
     and undoes the flush rule's padding-bottom: 0. Restate it — without this
     the CTA band keeps 40px below the button and it stacks with the footer's
     64px top padding into a gap on mobile only. */
  .band--flush { padding-bottom: 0; }

  .band__head { margin-bottom: 32px; }

  .hero { padding-block: 40px 0; }

  /* Pull the display face in. clamp() alone still runs large next to body copy
     at this width, and the tracking needs to loosen as the size drops. */
  .hero__title {
    font-size: clamp(38px, 12vw, 52px);
    letter-spacing: -0.025em;
    margin-block: 16px 20px;
  }

  .hero__lead { font-size: 16px; margin-bottom: 26px; }

  .band__title { font-size: clamp(26px, 7.5vw, 34px); letter-spacing: -0.025em; }

  .band__lead { font-size: 16px; }

  .hero__actions { gap: 10px; }

  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }

  .hero__strip { margin-top: 48px; gap: 14px 24px; }

  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    /* The panel is a child of .masthead, so its z-index is trapped in the
       header's stacking context and it cannot slide behind the header's own
       background — a transform would drag it up over the branding.
       Instead the panel stays put and the reveal is a clip that sweeps down
       from the header line, so nothing is ever painted above it.
       The negative bottom inset leaves the panel's lower edge unclipped. */
    clip-path: inset(0 0 100% 0);

    /* visibility keeps the links out of the tab order when closed; deferred
       so the close animation stays visible. */
    visibility: hidden;
    transition:
      clip-path 0.25s ease,
      visibility 0s linear 0.25s;
  }

  .nav.is-open {
    clip-path: inset(0 0 -100vh 0);
    visibility: visible;
    transition: clip-path 0.25s ease, visibility 0s;
  }

  /* No dividers between items — the left marker bar is the only indicator,
     so every link is padded to align with the active one. */
  .nav__link {
    padding: 14px 0 14px 12px;
    font-size: 13px;
  }

  .nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--marker); }

  .caps,
  .projects,
  .team { grid-template-columns: 1fr; }

  .caps__item { padding: 26px 22px 30px; }

  .ledger__row { grid-template-columns: 1fr; gap: 8px; padding-block: 22px; }

  /* The email address is long enough to overflow half a phone width. */
  .contact-direct { grid-template-columns: 1fr; gap: 22px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  .hero-figure__frame { max-width: none; }

  .hero-figure__caption { padding: 10px 14px; font-size: 10px; }

  /* Team is supporting content on a phone: two up keeps it scannable rather
     than four full-width cards to scroll past. */
  .team { grid-template-columns: 1fr 1fr; }

  .team__card { padding: 18px 16px 22px; }

  .team__card h3 { font-size: 16px; }

  /* --- Tenders: table becomes stacked cards ---------------------------
     Six columns cannot work on a phone. Each row becomes a card and each
     cell carries its column name from data-label, so nothing is lost. */

  .table-scroll { overflow-x: visible; }

  .tender-table thead { position: absolute; left: -9999px; }

  .tender-table,
  .tender-table tbody,
  .tender-table tr,
  .tender-table td { display: block; width: 100%; }

  .tender-table tr {
    border: 1px solid var(--line);
    padding: 20px;
    margin-bottom: -1px;
    background: var(--white);
  }

  .tender-table td {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 0;
  }

  .tender-table td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--grey);
  }

  /* The package name heads the card, so it needs no repeated label. */
  .tender-table td[data-label="Package"] {
    display: block;
    padding-top: 0;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .tender-table td[data-label="Package"]::before { content: none; }

  .tender-table .t-name { font-size: 19px; }

  .tender-table .t-close br { display: none; }

  /* Grid stretches children by default; the pill should hug its label. */
  .tender-table .pill { justify-self: start; }
}
