/*
 * Argus Autonomy website: one stylesheet for every page.
 *
 *  1. Fonts
 *  2. Design tokens (colours, fonts, spacing): change these to restyle the whole site
 *  3. Base and accessibility helpers
 *  4. Site header and navigation
 *  5. Page headers (homepage hero and inner pages)
 *  6. Buttons
 *  7. Sections, section headings and text
 *  8. Homepage: "What we do" tabs, cards and loop diagram
 *  9. Homepage: "How we deliver" video and stages
 * 10. Contact form (homepage) and contact strip (inner pages)
 * 11. Applications page
 * 12. Company page
 * 13. Privacy notice
 * 14. 404 page
 * 15. Site footer
 * 16. Fade-in on scroll and reduced motion
 *
 * Layout breakpoints used throughout: 1000px (tablet), 860px (mobile menu), 720px, 640px and 560px (phones).
 */

/* ============ 1. Fonts ============ */
/* Geist and Geist Mono, variable weight, Latin character set. Licence: assets/fonts/OFL.txt */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ============ 2. Design tokens ============ */

:root {
  /* Dark surfaces */
  --ink: #0e0d0d; /* page background */
  --raised: #191615; /* panels on dark */
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);
  --fg: #e9e6e2; /* main text on dark */
  --fg-dim: #96918b; /* secondary text on dark */
  --fg-faint: #85807a; /* small labels on dark */

  /* Light ("bone") surfaces */
  --bone: #f1eee9; /* light section background */
  --bone-2: #e6e2dc;
  --card: #ffffff;
  --on-bone: #171413; /* main text on light */
  --dim-bone: #57524c; /* secondary text on light */
  --faint-bone: #6e6962; /* small labels on light */
  --line-bone: rgba(0, 0, 0, 0.12);

  /* Brand accent */
  --tang: #e86629; /* tangerine */
  --tang-deep: #b95120; /* darker tangerine, used where text sits on it */
  --tang-text: #a94a1d; /* tangerine for small text on light backgrounds (meets the 4.5:1 contrast standard) */

  /* Type */
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --wrap: 1180px; /* maximum content width */
  --pad: 40px; /* side padding */
  --sec: 96px; /* vertical padding of each section */
}

@media (max-width: 860px) {
  :root {
    --pad: 22px;
    --sec: 64px;
  }
}

/* ============ 3. Base and accessibility helpers ============ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px; /* keeps anchored sections clear of the sticky header */
}

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* On the orange bands a tangerine focus ring would not show, so it turns white there. */
.contact :focus-visible,
.contact-strip :focus-visible {
  outline-color: #fff;
}

/* Hidden until a keyboard user tabs to it, then lets them jump past the navigation. */
.skip-link {
  position: absolute;
  top: 12px;
  left: -9999px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 2px;
  background: var(--tang);
  color: #160c05;
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
}

/* Small uppercase labels above headings. Small on page headers, large on sections. */
.tag {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tang);
  line-height: 1.4;
}

.tag-small {
  font-size: 11.5px;
}

.section-light .tag {
  color: var(--tang-text);
}

/* ============ 4. Site header and navigation ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 13, 13, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo img {
  height: 38px;
  width: auto;
  display: block;
}

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

nav.main-nav a {
  font-size: 14px;
  color: var(--fg-dim);
  transition: color 0.18s;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--fg);
}

nav.main-nav a.nav-cta {
  font-size: 13.5px;
  padding: 7px 15px;
  border: 1px solid var(--line-hi);
  border-radius: 2px;
  color: var(--fg);
  transition:
    border-color 0.18s,
    background 0.18s;
}

nav.main-nav a.nav-cta:hover {
  border-color: var(--tang);
  background: rgba(232, 102, 41, 0.09);
}

/* Mobile menu button and drop-down (below 860px) */
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
  margin-right: -8px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

.mobile-nav a.nav-cta,
.mobile-nav a[aria-current="page"] {
  color: var(--fg);
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 76px;
  }

  nav.main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-bar {
    height: 64px;
  }

  .logo img {
    height: 32px;
  }

  /* The script adds "is-open" to the header when the menu button is pressed. */
  .site-header.is-open .mobile-nav {
    display: block;
  }
}

/* ============ 5. Page headers ============ */

/* Homepage hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

.hero-copy {
  position: relative;
  padding: calc(var(--sec) + 30px) 0 calc(var(--sec) + 14px);
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.07;
  font-weight: 500;
  letter-spacing: -0.032em;
  margin-top: 22px;
}

.hero .hero-sub {
  margin-top: 28px;
  max-width: 640px;
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--fg-dim);
}

.hero .hero-sub b {
  color: var(--fg);
  font-weight: 400;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .hero-copy {
    padding: calc(var(--sec) + 18px) 0 calc(var(--sec) + 4px);
  }
}

@media (max-width: 640px) {
  .hero-bg {
    display: none;
  }
}

/* Applications and Company page headers */
.page-head {
  border-bottom: 1px solid var(--line);
  padding: calc(var(--sec) * 0.95) 0 calc(var(--sec) * 0.8);
}

.page-head h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.09;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: 20px;
  max-width: 860px;
}

.page-head .page-intro {
  margin-top: 22px;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.62;
  color: var(--fg-dim);
}

/* ============ 6. Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 2px;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s,
    opacity 0.18s;
  cursor: pointer;
  border: 0;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-primary {
  background: var(--tang);
  color: #160c05;
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--tang-deep);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line-hi);
  color: var(--fg);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--fg-dim);
  background: var(--raised);
}

.btn-light {
  background: #fff;
  color: var(--tang-deep);
  font-weight: 500;
}

.btn-light:hover {
  opacity: 0.88;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============ 7. Sections, section headings and text ============ */

/* Every <section> is a full-width band. Dark by default; add "section-light" for the light version. */
section {
  padding: var(--sec) 0;
  border-bottom: 1px solid var(--line);
}

.section-light {
  background: var(--bone);
  color: var(--on-bone);
  border-bottom: 1px solid var(--line-bone);
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.13;
  font-weight: 500;
  letter-spacing: -0.028em;
  margin-top: 16px;
}

.lead {
  margin-top: 16px;
  color: var(--fg-dim);
  font-size: 17px;
  max-width: 640px;
}

.section-light .lead {
  color: var(--dim-bone);
}

/* Running text, such as the About paragraph */
.prose p {
  font-size: 17px;
  line-height: 1.66;
  color: var(--fg-dim);
  max-width: 680px;
}

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

.section-light .prose p {
  color: var(--dim-bone);
}

/* ============ 8. Homepage: "What we do" tabs, cards and loop diagram ============ */

.tab-list {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line-bone);
  margin-bottom: 36px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--faint-bone);
  padding: 13px 20px 14px;
  cursor: pointer;
  transition:
    color 0.18s,
    border-color 0.18s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--dim-bone);
}

.tab[aria-selected="true"] {
  color: var(--on-bone);
  border-bottom-color: var(--tang);
}

.tab-panel[hidden] {
  display: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  background: var(--card);
  padding: 28px 24px 30px;
  border: 1px solid var(--line-bone);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(232, 102, 41, 0.55);
}

.card .card-icon {
  color: var(--tang);
  margin-bottom: 20px;
  display: block;
}

.card .card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.014em;
  margin-bottom: 9px;
  color: var(--on-bone);
}

.card p {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--dim-bone);
}

@media (max-width: 1000px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Diagrams (homepage loop, Applications sequence). Each has a wide and a narrow drawing; CSS shows one. */
.diagram {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line-bone);
}

.diagram.diagram-flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram .diagram-narrow {
  display: none;
}

.diagram-caption {
  font-size: 14px;
  color: var(--faint-bone);
  margin-top: 18px;
}

@media (max-width: 720px) {
  .diagram .diagram-wide {
    display: none;
  }

  .diagram .diagram-narrow {
    display: block;
    max-width: 380px;
    margin: 0 auto;
  }
}

/* Text inside the loop diagram */
.dg-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  fill: var(--faint-bone);
}

.dg-brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  fill: var(--tang-text);
}

.dg-brand-narrow {
  letter-spacing: 0.8px; /* phone version: keeps the label clear of the sensor line */
}

.dg-step {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  fill: var(--on-bone);
}

.dg-platform {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  fill: var(--on-bone);
}

/* ============ 9. Homepage: "How we deliver" video and stages ============ */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--line);
}

.video-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Orange play button over the poster image; the script reveals it and hands over to the video controls. */
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video-play[hidden] {
  display: none;
}

.video-caption {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-faint);
  letter-spacing: 0.05em;
  padding: 12px 2px 36px;
}

/* Stage selector: the orange line fills up to the selected stage (the script sets --stage-progress). */
.stage-tabs {
  display: flex;
  position: relative;
  border-top: 1px solid var(--line);
}

.stage-tabs::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  background: var(--tang);
  width: var(--stage-progress, 25%);
  transition: width 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-tab {
  flex: 1;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  text-align: left;
  padding: 22px 20px 24px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--fg-faint);
  transition:
    color 0.2s,
    background 0.2s;
}

.stage-tab:last-child {
  border-right: 0;
}

.stage-tab:hover {
  background: var(--raised);
}

.stage-tab .stage-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 11px;
}

.stage-tab .stage-title {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.012em;
  display: block;
  line-height: 1.3;
}

.stage-tab[aria-selected="true"] {
  color: var(--fg);
}

.stage-tab[aria-selected="true"] .stage-num {
  color: var(--tang);
}

.stage-panel {
  background: var(--raised);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 38px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
}

.stage-panel[hidden] {
  display: none;
}

.stage-panel .stage-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 12px;
}

.stage-panel h3 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.stage-panel p {
  color: var(--fg-dim);
  font-size: 16px;
  max-width: 560px;
}

.stage-panel .stage-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Text inside the small "Runs on / Tested against" figures */
.stage-fig-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  fill: var(--fg-faint);
}

.stage-fig-text {
  font-family: var(--sans);
  font-size: 11.5px;
  fill: var(--fg);
}

.stage-fig-text-on {
  fill: var(--tang);
}

@media (max-width: 1000px) {
  .stage-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stage-panel .stage-figure {
    max-width: 360px;
  }
}

@media (max-width: 860px) {
  .stage-tabs {
    flex-wrap: wrap;
  }

  .stage-tabs::after {
    display: none;
  }

  .stage-tab {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--line);
  }

  .stage-tab:nth-child(2n) {
    border-right: 0;
  }

  .stage-panel {
    padding: 28px 22px;
  }
}

/* ============ 10. Contact form (homepage) and contact strip (inner pages) ============ */

.contact {
  background: var(--tang-deep);
  color: #fff;
  border-bottom: 0;
}

.contact .tag,
.contact-strip .tag {
  color: #fff;
}

.contact-inner {
  display: grid;
  gap: 30px;
}

form.contact-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

form.contact-form[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.field-wide {
  grid-column: 1 / -1;
}

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

.field label span {
  letter-spacing: 0.06em;
}

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 15.5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 2px;
  padding: 12px 14px;
  transition:
    border-color 0.18s,
    background 0.18s;
  width: 100%;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #fff; /* the white border is the focus indicator */
}

/* Hidden checkbox that only spam bots fill in; Web3Forms rejects submissions where it is ticked. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-note {
  font-size: 13.5px;
  color: #fff;
}

.form-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-message a {
  text-decoration: underline;
}

.form-message {
  font-size: 17px;
  color: #fff;
  padding: 18px 0;
}

.form-message[hidden] {
  display: none;
}

.form-message:focus {
  outline: none; /* receives focus after sending so screen readers announce it */
}

@media (max-width: 860px) {
  form.contact-form {
    grid-template-columns: 1fr;
  }
}

/* Orange "Get in touch" strip at the bottom of inner pages */
.contact-strip {
  background: var(--tang-deep);
  color: #fff;
  padding: 56px 0;
  border-bottom: 0;
}

.contact-strip .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ============ 11. Applications page ============ */

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

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px 48px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.row h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.row p {
  font-size: 15.5px;
  color: var(--fg-dim);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line-hi);
  border-radius: 2px;
  color: var(--fg-dim);
}

/* Defence and security: two white cards with tick lists */
.list-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.list-card {
  background: var(--card);
  border: 1px solid var(--line-bone);
  border-radius: 4px;
  padding: 28px 26px;
}

.list-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  color: var(--on-bone);
}

.tick-list {
  list-style: none;
}

.tick-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  color: var(--dim-bone);
  margin-top: 10px;
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 1.5px;
  background: var(--tang);
}

/* Text inside the close-range sequence diagram */
.seq-step {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  fill: var(--on-bone);
}

.seq-desc {
  font-family: var(--sans);
  font-size: 12.5px;
  fill: var(--dim-bone);
}

.seq-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  fill: var(--faint-bone);
}

.seq-band {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  fill: var(--tang-text);
}

@media (max-width: 860px) {
  .row {
    grid-template-columns: 1fr;
  }

  .list-cards {
    grid-template-columns: 1fr;
  }
}

/* ============ 12. Company page ============ */

.divider {
  height: 1px;
  background: var(--line-bone);
  margin: calc(var(--sec) * 0.8) 0;
}

/* Team. Photos are 640 x 800 JPEGs (4:5) on a #E6E2DC background. */
.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.person .person-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bone-2);
}

.person h3 {
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.014em;
  margin-top: 16px;
}

.person p {
  font-size: 14.5px;
  color: var(--fg-dim);
  margin-top: 4px;
}

.section-light .person p {
  color: var(--dim-bone);
}

@media (max-width: 1000px) {
  .team {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Milestones timeline. Add "milestone-next" for future items (hollow dot, grey date). */
.timeline {
  margin-left: 7px;
  border-left: 1px solid var(--line-hi);
}

.milestone {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 28px;
  padding: 0 0 38px 34px;
}

.milestone:last-child {
  padding-bottom: 4px;
}

.milestone::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--tang);
  box-shadow: 0 0 0 5px var(--ink);
}

.milestone.milestone-next::before {
  background: var(--ink);
  border: 1.5px solid var(--tang);
}

.milestone h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.milestone p {
  font-size: 15.5px;
  color: var(--fg-dim);
  margin-top: 6px;
  max-width: 600px;
}

.milestone .milestone-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tang);
  padding-top: 1px;
}

.milestone.milestone-next .milestone-date {
  color: var(--fg-faint);
}

@media (max-width: 860px) {
  .milestone {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============ 13. Privacy notice ============ */

.legal-head {
  padding: calc(var(--sec) * 0.9) 0 calc(var(--sec) * 0.7);
  border-bottom: 1px solid var(--line);
}

.legal-head h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.legal-head .updated {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 16px;
}

.legal {
  max-width: 760px;
}

.legal h2 {
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 52px 0 14px;
  color: var(--on-bone);
  scroll-margin-top: 24px; /* added to the scroll padding on html, so headings land just below the header */
}

.legal h2:first-of-type {
  margin-top: 36px;
}

.legal h3 {
  font-size: 17.5px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 26px 0 8px;
  color: var(--on-bone);
}

.legal p,
.legal li {
  font-size: 16.5px;
  line-height: 1.66;
  color: var(--dim-bone);
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  margin: 10px 0 14px 22px;
}

.legal li {
  margin-top: 7px;
}

.legal strong {
  color: var(--on-bone);
  font-weight: 600;
}

.legal a {
  color: var(--tang-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ 14. 404 page ============ */

.not-found {
  min-height: calc(100vh - 72px - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: var(--sec) 0;
}

.not-found .not-found-code {
  font-family: var(--mono);
  font-size: clamp(56px, 11vw, 128px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tang);
}

.not-found h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.022em;
  margin-top: 28px;
}

.not-found p.not-found-text {
  margin: 16px auto 0;
  max-width: 520px;
  font-size: 17px;
  color: var(--fg-dim);
}

.not-found .btn {
  margin-top: 36px;
}

/* ============ 15. Site footer ============ */

.site-footer {
  padding: 58px 0 44px;
  background: var(--ink);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-top .logo img {
  height: 38px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.footer-partners {
  display: flex;
  align-items: center;
  gap: 30px;
}

.partner-logo {
  display: block;
  width: auto;
  opacity: 0.8;
}

.partner-logo-city {
  height: 46px;
}

.partner-logo-icure {
  height: 21px;
}

.footer-nav {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 16px;
  font-weight: 400;
}

.footer-col a {
  display: block;
  font-size: 14.5px;
  color: var(--fg-dim);
  margin-bottom: 10px;
  transition: color 0.18s;
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.footer-legal {
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-faint);
  max-width: 760px;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--fg-dim);
}

.footer-links a:hover {
  color: var(--fg);
}

@media (max-width: 860px) {
  .footer-nav {
    gap: 40px;
  }
}

/* ============ 16. Fade-in on scroll and reduced motion ============ */

/* Elements with class "reveal" fade up as they scroll into view; the script adds "is-visible".
   They are only hidden when scripting is available, so the content still shows without JavaScript. */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
  }
}

.reveal {
  transition:
    opacity 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
