/* Brackenridge Build
   ---------------------------------------------------------------------------
   Follows the Collins Construction reference: full-bleed photography carrying
   the colour, a white/light-grey alternation between panels, one blue for
   action, an ebony footer, and a spectrum rule that appears once under the
   hero. Type is measured off that build — 50/26.5/21.5/17.5/14/12 on a 1.23
   scale, Inter for headings, a geometric humanist sans for everything else.

   Colour tokens are declared per surface rather than per component, which is
   the rule carried forward from the rest of this series.
   --------------------------------------------------------------------------- */

/* ---- fonts -------------------------------------------------------------- */

/* Proxima Nova is a licensed commercial face, so Figtree stands in — the
   closest openly-licensed geometric humanist with a matching x-height. Inter
   is open and is what the reference uses for headings, so nothing to swap. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/figtree.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree fallback';
  src: local('Avenir Next'), local('Helvetica Neue'), local('Arial');
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 99%;
}
@font-face {
  font-family: 'Inter fallback';
  src: local('Helvetica Neue'), local('Arial');
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 100%;
}

/* ---- tokens ------------------------------------------------------------- */

:root {
  --white: #ffffff;
  --paper: #f2f2f2;
  --ink: #212121;
  --ebony: #232b3e;

  /* The reference blue is 5.1:1 under white, so it works as a fill with white
     text and as a link colour on the light surfaces. On ebony it is too close
     to the background, hence the lift. */
  --blue: #1863dc;
  --blue-lift: #7fb0ff;   /* 6.8:1 on --ebony */

  --accent: var(--blue);
  --muted: #5a5a5a;       /* 7.0:1 on white, 6.0:1 on --paper */
  --rule: #dcdcdc;

  --head: 'Inter', 'Inter fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --body: 'Figtree', 'Figtree fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --wrap: 1296px;
  --gutter: 24px;

  /* Measured: 50 / 26.5 / 21.5 / 17.5 / 14 / 12, a 1.23 scale. */
  --t-h1: clamp(2.1rem, 1.35rem + 2.6vw, 3.125rem);
  --t-h2: clamp(1.45rem, 1.24rem + 0.85vw, 1.657rem);
  --t-h3: clamp(1.2rem, 1.11rem + 0.4vw, 1.344rem);
  --t-body: 1.092rem;
  --t-sm: 0.875rem;
  --t-xs: 0.75rem;

  --pad: clamp(56px, 6vw, 96px);
  --radius: 6px;
  --radius-lg: 12px;
}

/* Every context where text sits on a dark surface redeclares the contextual
   tokens — including the ones that set their own background rather than using
   .dark. Listing them together is what stops the light-surface grey appearing
   on the ebony footer, which is exactly what it did on the first pass. */
.dark,
.site-footer,
.hero,
.quote-band,
.card,
.tile {
  --accent: var(--blue-lift);
  --muted: #b8bdc9;       /* 8.1:1 on --ebony */
  --rule: rgba(255, 255, 255, 0.18);
}
.dark { background: var(--ebony); color: var(--white); }

/* ---- reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; }
p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 16px; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 1024px) { .wrap { padding-inline: 72px; } }

.panel { padding-block: var(--pad); }
.panel--paper { background: var(--paper); }
.panel--tight { padding-block: clamp(40px, 4.5vw, 68px); }
.measure { max-width: 62ch; }

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

.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); }
.lead { font-size: 1.2rem; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }

.prose a, .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover, .link:hover { text-decoration-thickness: 2px; }

/* The eyebrow, with the hatched mark the reference puts before every section
   label. Drawn in CSS rather than shipped as an image. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  flex: 0 0 auto;
  width: 26px; height: 14px;
  background: repeating-linear-gradient(115deg, var(--accent) 0 3px, transparent 3px 6px);
}

/* ---- spectrum rule ------------------------------------------------------
   The one flourish the reference allows itself: a six-band spectrum under the
   hero. Decorative, so it is hidden from assistive tech. */
.spectrum { display: flex; height: 6px; }
.spectrum span { flex: 1; }
.spectrum span:nth-child(1) { background: #1863dc; }
.spectrum span:nth-child(2) { background: #17a2b8; }
.spectrum span:nth-child(3) { background: #3aa64b; }
.spectrum span:nth-child(4) { background: #e8b024; }
.spectrum span:nth-child(5) { background: #e2762a; }
.spectrum span:nth-child(6) { background: #cf3b3b; }

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

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  background: var(--blue); color: #fff;
  border: 2px solid var(--blue); border-radius: var(--radius);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.btn:hover { background: transparent; color: var(--blue); }
.dark .btn:hover { color: var(--blue-lift); border-color: var(--blue-lift); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.dark .btn--ghost { color: #fff; border-color: #fff; }
.dark .btn--ghost:hover { background: #fff; color: var(--ebony); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* The circular arrow the reference uses as its "more" affordance. */
.circ {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto;
  border: 2px solid currentColor; border-radius: 50%;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.circ svg { width: 15px; height: 15px; }
.arrow-link { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; text-decoration: none; }
.arrow-link:hover .circ { background: var(--blue); border-color: var(--blue); color: #fff; }

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

/* Over the hero the header is transparent and white; on interior pages it is
   ebony, because there is no photograph behind it to sit on. */
.site-header { position: absolute; inset: 0 0 auto; z-index: 40; color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
body:not(.has-hero) .site-header { position: static; background: var(--ebony); }

.brand { display: inline-flex; flex-direction: column; gap: 5px; text-decoration: none; }
.brand__name { font-family: var(--head); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1; }
.brand__rule { display: flex; height: 3px; width: 100%; }
.brand__rule span { flex: 1; }
.brand__rule span:nth-child(1) { background: #1863dc; }
.brand__rule span:nth-child(2) { background: #3aa64b; }
.brand__rule span:nth-child(3) { background: #e8b024; }
.brand__rule span:nth-child(4) { background: #cf3b3b; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { font-size: 1.092rem; text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: currentColor; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; background: none;
  border: 2px solid currentColor; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle > span { display: grid; gap: 4px; width: 20px; }
.nav-toggle > span > span { height: 2px; background: currentColor; }

.menu { position: fixed; inset: 0; z-index: 60; padding: 20px var(--gutter) 44px; overflow-y: auto; overscroll-behavior: contain; }
.menu[hidden] { display: none; }
.menu__head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-bottom: 30px; }
.menu__close { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; background: none; border: 2px solid currentColor; border-radius: var(--radius); cursor: pointer; }
.menu__nav a {
  display: block; padding: 15px 0;
  font-family: var(--head); font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2rem);
  font-weight: 700; text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.menu__nav a:hover { color: var(--accent); }
body.menu-open { overflow: hidden; }

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 720px;
  padding-block: 140px 56px;
  color: #fff;
  isolation: isolate;
}
.hero--short { min-height: 520px; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Bottom-weighted scrim: the headline sits low, so the gradient is heaviest
   there and the photograph stays legible above it. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20, 24, 34, 0.88) 0%, rgba(20, 24, 34, 0.62) 42%, rgba(20, 24, 34, 0.34) 100%);
}
.hero h1 { font-size: var(--t-h1); max-width: 18ch; }
.hero .lead { margin-top: 18px; max-width: 54ch; }
.hero__crumbs { margin-bottom: 16px; font-size: var(--t-sm); }
.hero__crumbs a { text-decoration: none; }
.hero__crumbs a:hover { text-decoration: underline; }

/* ---- intro band --------------------------------------------------------- */

.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.intro__mark { display: flex; align-items: flex-start; gap: 18px; }
.intro__mark .badge {
  flex: 0 0 auto; width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 2px solid var(--blue); border-radius: 50%; color: var(--blue);
}
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }

/* ---- feature cards ------------------------------------------------------ */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.card {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 420px; padding: 32px;
  border-radius: var(--radius-lg); overflow: hidden;
  color: #fff; text-decoration: none;
  isolation: isolate;
}
.card__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18, 22, 31, 0.9) 0%, rgba(18, 22, 31, 0.5) 45%, rgba(18, 22, 31, 0.55) 100%);
}
.card:hover .card__bg { transform: scale(1.04); }
.card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 40px; }
.card__foot p { margin: 0; max-width: 46ch; font-size: 0.98rem; }
.card:hover .circ { background: var(--blue); border-color: var(--blue); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .card { min-height: 340px; padding: 24px; } }
@media (prefers-reduced-motion: reduce) { .card__bg, .card:hover .card__bg { transition: none; transform: none; } }

/* ---- quote band --------------------------------------------------------- */

.quote-band {
  position: relative; display: flex; align-items: flex-end;
  min-height: 720px; padding-block: 96px 56px; color: #fff; isolation: isolate;
}
.quote-band__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.quote-band::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20, 24, 34, 0.9) 0%, rgba(20, 24, 34, 0.5) 55%, rgba(20, 24, 34, 0.3) 100%);
}
.quote-band .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.quote-band blockquote { margin: 0; max-width: 62ch; font-size: 1.15rem; line-height: 1.55; }
.quote-band footer { margin-top: 16px; font-size: var(--t-sm); }
.quote-band__client {
  padding: 14px 20px; background: #fff; color: var(--ink);
  border-radius: var(--radius); font-family: var(--head); font-weight: 700; font-size: var(--t-sm);
}

/* ---- rails -------------------------------------------------------------- */

.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.rail-nav { display: flex; gap: 10px; }
.rail-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 2px solid var(--ink); border-radius: 50%; cursor: pointer;
}
.rail-btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.rail-btn:disabled { opacity: 0.35; cursor: default; }
.rail-btn svg { width: 15px; height: 15px; }

.rail {
  display: grid; grid-auto-flow: column;
  /* A fixed track, not minmax(0, …) — with a zero minimum the tracks share the
     container instead of overflowing it, and the rail silently stops being a
     rail. */
  grid-auto-columns: min(600px, 84%);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 8px; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
/* Snapping fights a pointer drag, so it stands down until the drag ends and
   then settles the rail on the nearest card. */
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.rail.is-dragging * { pointer-events: none; }
.rail > * { scroll-snap-align: start; }
/* The sectors rail runs one large card at a time, as the reference does. */
.rail--wide { grid-auto-columns: min(1000px, 92%); }
@media (max-width: 700px) { .rail, .rail--wide { grid-auto-columns: 88%; } }

.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 380px; padding: 26px; border-radius: var(--radius-lg); overflow: hidden;
  color: #fff; text-decoration: none; isolation: isolate;
}
.tile__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.tile::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18, 22, 31, 0.9) 0%, rgba(18, 22, 31, 0.25) 60%);
}
.tile__meta { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.tile__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

/* ---- news --------------------------------------------------------------- */

.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
.news article img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.news h3 { margin: 16px 0 8px; font-size: 1.092rem; }
.news a { text-decoration: none; }
.news a:hover h3 { color: var(--accent); }
@media (max-width: 860px) { .news { grid-template-columns: 1fr; } }

/* ---- generic content ---------------------------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 68px); align-items: start; }
.split + .split { margin-top: clamp(36px, 4vw, 60px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.facts div { padding-top: 16px; border-top: 3px solid var(--accent); }
.facts dt { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--head); font-weight: 700; font-size: 1.35rem; }
@media (max-width: 700px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.figure img { width: 100%; border-radius: var(--radius-lg); }
.figure--bleed img { border-radius: 0; max-height: 70vh; object-fit: cover; }

/* ---- forms -------------------------------------------------------------- */

.form { display: grid; gap: 18px; max-width: 620px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); width: 100%; min-height: 48px; padding: 12px 14px;
  background: #fff; border: 1px solid #767676; border-radius: var(--radius);
}
.field textarea { min-height: 150px; resize: vertical; }
.field.invalid input, .field.invalid textarea { border-color: #a11b1b; }
.field .error { margin: 0; font-size: var(--t-sm); color: #8f1919; }
.dark .field .error { color: #ff9d9d; }
.field:not(.invalid) .error { display: none; }
.field--hp { position: absolute; left: -9999px; }
.form-note { font-size: var(--t-sm); color: var(--muted); max-width: 58ch; }

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

.site-footer { background: var(--ebony); color: #fff; padding-top: clamp(48px, 5vw, 76px); }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); padding-bottom: 44px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin-top: 32px; }
.footer-cols h2 { font-size: var(--t-sm); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-lift); margin-bottom: 14px; }
.footer-cols li { padding: 4px 0; font-size: 0.98rem; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { color: var(--blue-lift); }
.socials { display: flex; gap: 8px; margin-top: 20px; }
.socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: var(--radius); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.socials a:hover { background: rgba(255, 255, 255, 0.1); }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding-block: 20px; border-top: 1px solid var(--rule);
  font-size: var(--t-sm); color: var(--muted);
}
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { color: var(--blue-lift); }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---- reveal ------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .rail { scroll-behavior: auto; }
  * { scroll-behavior: auto !important; }
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { min-height: 72px; }
  .hero { min-height: 600px; padding-block: 116px 44px; }
}
