/* ==========================================================
   Applied Ballistics — site styles
   Edit colours, fonts and spacing in the :root block below.
   ========================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "AB Display";
  src: url("../fonts/roboto.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "AB Text";
  src: url("../fonts/source-sans-3.woff") format("woff");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "AB Text";
  src: url("../fonts/source-sans-3-italic.woff") format("woff");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --paper: #F1F2F0;       /* page background: cool survey white */
  --tint: #E4E8E6;        /* alternate section background */
  --ink: #1F262B;         /* main text */
  --steel: #55616A;       /* secondary text */
  --rule: #C3CACD;        /* hairlines */
  --red: #A8231B;         /* range red: the single accent */
  --slate: #25313A;       /* dark sections */
  --slate-ink: #E3E8EA;
  --slate-muted: #A7B4BB;
  --slate-rule: #3D4B55;
  --red-on-dark: #E8695E;

  --display: "AB Display", "Roboto Condensed", "Arial Narrow", sans-serif;
  --text: "AB Text", "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 136px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 700; }
h2 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.04;
  font-stretch: 80%;
  letter-spacing: -0.005em;
  max-width: 18ch;
  text-wrap: balance;
}
h3 { font-size: 22px; line-height: 1.2; font-stretch: 85%; font-weight: 650; }
dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.section-dark :focus-visible { outline-color: var(--red-on-dark); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(241, 242, 240, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* Logo */
.brand { display: block; line-height: 0; }
.brand-img { height: 48px; width: auto; }
.footer-logo { width: 200px; height: auto; margin-bottom: 16px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 16px; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--red); }
.nav .nav-cta {
  background: var(--ink); color: var(--paper); padding: 8px 16px;
}
.nav .nav-cta:hover { background: var(--red); color: #fff; }
.menu {
  display: none; font: inherit; font-size: 16px; font-weight: 600;
  background: none; border: 1px solid var(--ink); color: var(--ink);
  padding: 6px 14px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); }
.hero h1 {
  font-size: clamp(68px, 14.5vw, 212px);
  line-height: 0.86;
  font-stretch: 75%;
  font-weight: 800;
  letter-spacing: -0.012em;
  margin-left: -0.04em;
}
.hero-body {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px; align-items: end;
  margin-top: clamp(28px, 4vw, 48px);
}
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; max-width: 36em; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 17px;
  padding: 13px 22px; border: 1px solid transparent; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #8C1C15; }
.btn-quiet { border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }

/* The 50 m range scale: the page's one moment of motion */
.range { position: relative; margin: clamp(56px, 7vw, 96px) 0 0; }
.range-scale { display: block; width: 100%; height: 52px; overflow: visible; }
.range-scale line { stroke: var(--ink); vector-effect: non-scaling-stroke; }
.range-base { stroke-width: 1.5; }
.range-ticks .minor { stroke-width: 1; stroke: var(--steel); }
.range-ticks .mid { stroke-width: 1.25; }
.range-ticks .major { stroke-width: 2; }
.range-flag {
  position: absolute; right: 0; top: -22px; width: 2px; height: 74px; background: var(--red);
}
.range-flag::after {
  content: ""; position: absolute; top: 0; right: 2px;
  border-style: solid; border-width: 9px 22px 9px 0;
  border-color: transparent var(--red) transparent transparent;
}
.range-labels { position: relative; height: 24px; margin-top: 6px; font-size: 15px; font-feature-settings: "tnum"; color: var(--steel); }
.range-labels span { position: absolute; transform: translateX(-50%); }
.range-labels span:nth-child(1) { left: 0; transform: none; }
.range-labels span:nth-child(2) { left: 20%; }
.range-labels span:nth-child(3) { left: 40%; }
.range-labels span:nth-child(4) { left: 60%; }
.range-labels span:nth-child(5) { left: 80%; }
.range-labels span:nth-child(6) { right: 0; transform: none; color: var(--ink); font-weight: 600; }
.range figcaption { margin-top: 14px; font-size: 16px; color: var(--steel); }

@media (prefers-reduced-motion: no-preference) {
  .range-scale { animation: range-draw 1.3s cubic-bezier(.2,.7,.2,1) .2s both; }
  .range-flag { animation: flag-up .45s ease-out 1.4s both; }
}
@keyframes range-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes flag-up { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; scroll-margin-top: 60px; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--slate); color: var(--slate-ink); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 72px; }
.split-head p, .lede-block p { color: var(--steel); max-width: 34em; margin-top: 22px; }
.section-dark .lede-block p { color: var(--slate-muted); }
.sticky { position: sticky; top: 100px; align-self: start; }
.lede-block { margin-bottom: clamp(40px, 5vw, 64px); }
.lede-block h2 { max-width: 22ch; }

/* Ledger: label / description rows divided by hairlines */
.ledger > div { padding: 22px 0; border-top: 1px solid var(--rule); }
.ledger > div:last-child { border-bottom: 1px solid var(--rule); }
.ledger dt { font-family: var(--display); font-stretch: 85%; font-weight: 650; font-size: 22px; line-height: 1.2; }
.ledger dd { color: var(--steel); margin-top: 6px; max-width: 40em; }
.ledger-wide > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; }
.ledger-wide dd { margin-top: 0; }

.pull { margin: clamp(56px, 7vw, 96px) 0 0; padding: 0 0 0 28px; border-left: 4px solid var(--red); max-width: 52em; }
.pull p { font-size: clamp(21px, 2vw, 27px); line-height: 1.4; margin: 0; }

/* Pairs: 2 x 2 on dark */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.pairs > div { padding: 24px 0 28px; border-top: 1px solid var(--slate-rule); }
.pairs dt { font-family: var(--display); font-stretch: 85%; font-weight: 650; font-size: 24px; }
.pairs dd { color: var(--slate-muted); margin-top: 8px; max-width: 32em; }
.note { font-size: 16px; color: var(--steel); margin: 36px 0 0; max-width: 46em; }
.section-dark .note { color: var(--slate-muted); }

/* Photos */
.photos { display: grid; gap: 20px; }
.photos-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photos-two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); }
.photos figure { margin: 0; }
.photos figcaption { font-size: 15px; color: var(--steel); margin-top: 10px; }
.photo {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: #D5DBD9;
}
.photo-tall { aspect-ratio: 3 / 2; }

/* Full-width photo between the opening and storage */
.banner { margin: 0; }
.banner img { display: block; width: 100%; height: clamp(260px, 44vw, 620px); object-fit: cover; object-position: center 55%; }

/* Facility gallery */
.gallery {
  display: grid; gap: 12px; margin-top: clamp(48px, 6vw, 80px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(220px, 27vw, 360px);
  grid-auto-flow: dense;
}
.gallery figure { margin: 0; position: relative; overflow: hidden; background: #0E1215; }
.gallery .g-wide { grid-column: span 3; }
.gallery .g-half { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(10,13,15,.82), rgba(10,13,15,0));
  color: #F1F2F0; font-family: var(--display); font-stretch: 85%; font-weight: 600;
  font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

/* TERP */
.terp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(56px, 7vw, 88px); }
.terp dt { font-family: var(--display); font-stretch: 80%; font-weight: 600; font-size: 22px; line-height: 1; }
.terp dt b { display: block; font-size: clamp(64px, 7vw, 96px); font-weight: 800; font-stretch: 75%; color: var(--red); line-height: .9; margin-bottom: 10px; }
.terp dd { color: var(--steel); margin-top: 10px; font-size: 17px; }

/* Facility checklist */
.checklist li { padding: 18px 0 18px 30px; border-top: 1px solid var(--rule); position: relative; font-size: 19px; font-weight: 600; }
.checklist li:last-child { border-bottom: 1px solid var(--rule); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 27px; width: 12px; height: 2px; background: var(--red); }

/* Steps: a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: 44px; line-height: 1; color: var(--red); margin-bottom: 14px; font-feature-settings: "tnum";
}
.steps p { color: var(--steel); margin-top: 8px; font-size: 17px; }
.sectors { margin: clamp(48px, 6vw, 80px) 0 0; font-size: clamp(19px, 1.6vw, 22px); max-width: 44em; }

/* People */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.monogram {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 26px; letter-spacing: .02em;
}
.people .role { color: var(--red); font-weight: 600; font-size: 16px; line-height: 1.35; margin: 6px 0 12px; }
.people p:last-child { color: var(--steel); font-size: 17px; margin: 0; }

/* Contact */
.contact h2 { max-width: 14ch; }
.contact-email { margin: clamp(36px, 5vw, 56px) 0 12px; }
.contact-email a {
  font-family: var(--display); font-stretch: 80%; font-weight: 600;
  font-size: clamp(26px, 4.4vw, 56px); line-height: 1.1;
  text-decoration-color: var(--red-on-dark); text-decoration-thickness: 3px; text-underline-offset: .18em;
  overflow-wrap: anywhere;
}
.contact-email a:hover { color: #fff; text-decoration-color: #fff; }
.contact-line { font-size: 19px; }

/* Footer */
.footer { background: #1B242B; color: var(--slate-muted); padding: 32px 0; font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer strong { color: var(--slate-ink); font-family: var(--display); font-stretch: 80%; font-size: 18px; }

/* Storage */
.storage-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px 64px; align-items: center; }
.storage-intro { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; margin-top: 24px; max-width: 32em; }
.actions-left { justify-content: flex-start; margin-top: 28px; }
.storage-photo { margin: 0; }
.storage-photo figcaption { font-size: 15px; color: var(--steel); margin-top: 10px; }
.storage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: clamp(48px, 6vw, 80px); }
.storage-grid > div { border-top: 1px solid var(--rule); padding: 22px 0 30px; }
.storage-grid p { color: var(--steel); margin: 8px 0 0; font-size: 17px; }

/* Why-us points and project stages */
.strap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.strap li { border-top: 2px solid var(--ink); padding-top: 12px; font-weight: 600; }
.method { font-family: var(--display); font-stretch: 85%; font-weight: 600; font-size: clamp(18px, 1.8vw, 24px); margin: 0 0 40px; }
.method span { color: var(--red); padding: 0 .35em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid var(--rule); }
  .nav .nav-cta { margin-top: 12px; text-align: center; border: 0; }
  .hero-body, .split { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .sticky { position: static; }
  .people, .terp, .steps, .storage-grid, .strap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storage-head { grid-template-columns: 1fr; }

}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .ledger-wide > div { grid-template-columns: 1fr; }
  .pairs, .photos-three, .photos-two, .people, .steps, .storage-grid { grid-template-columns: 1fr; }
  .brand-img { height: 32px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 8px; }
  .gallery .g-wide, .gallery .g-half, .gallery .g-mobile-wide { grid-column: span 2; }
  .gallery figcaption { font-size: 13px; padding: 32px 12px 10px; }
  .terp { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .range-labels span:nth-child(2), .range-labels span:nth-child(4) { display: none; }
  .range-flag { top: -18px; height: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.storage-photo .photo { object-position: 75% center; }
