:root {
  --color-base: #ffffff;
  --color-text: #ffffff;
  --color-background: #00496c;
  --color-primary: #106288;
  --color-accent: #e20613;
  --color-surface: #0b2435;
  --color-muted: #6f8f9f;

  --font-family: "Inter", sans-serif;
  --font-family-caps: "Acumin", sans-serif;

  /* Fluid type scale — clamp(min, preferred, max) so sizes flex with the viewport */
  --font-size-2xs:     clamp(0.6875rem, 0.667rem + 0.10vw, 0.75rem);   /* 11 → 12 */
  --font-size-xs:      clamp(0.75rem,   0.729rem + 0.10vw, 0.8125rem); /* 12 → 13 */
  --font-size-small:   clamp(0.8125rem, 0.792rem + 0.10vw, 0.875rem);  /* 13 → 14 */
  --font-size-medium:  clamp(0.9375rem, 0.917rem + 0.10vw, 1rem);      /* 15 → 16 */
  --font-size-large:   clamp(1.0625rem, 1rem + 0.31vw, 1.25rem);       /* 17 → 20 */
  --font-size-xlarge:  clamp(1.25rem,   1.125rem + 0.63vw, 1.625rem);  /* 20 → 26 */
  --font-size-xxlarge: clamp(1.5rem,    1.25rem + 1.25vw, 2.25rem);    /* 24 → 36 */
  --font-size-3xlarge: clamp(1.875rem,  1.5rem + 1.88vw, 3rem);        /* 30 → 48 */
  --font-size-display: clamp(2.25rem,   1.667rem + 2.92vw, 4rem);      /* 36 → 64 */

  --radius-small: 8px;
  --radius-medium: 16px;
  --radius-large: 24px;
  --radius-pill: 999px;

  /* Spacing scale — fine-grained, consistent steps */
  --spacing-3xs: 4px;
  --spacing-2xs: 8px;
  --spacing-tiny: 10px;
  --spacing-xsmall: 20px;
  --spacing-small: 30px;
  --spacing-regular: 40px;
  --spacing-medium: 50px;
  --spacing-large: 60px;
  --spacing-xlarge: 90px;
  --spacing-xxlarge: 120px;
  --spacing-3xlarge: 160px;
  --spacing-4xlarge: 200px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--color-background);
  color: var(--color-text);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

.site-header {
  padding: var(--spacing-regular) 0;
}

.site-logo img {
  height: 48px;
}

.site-tagline {
  margin: 0;
  font-size: var(--font-size-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.site-main {
  padding: var(--spacing-xlarge) 0;
}

/* Lay the style-guide sections out as a stack with clear gaps between each box */
.style-guide-page .container {
  display: grid;
  gap: var(--spacing-large);
}

.style-guide {
  display: grid;
  gap: var(--spacing-small);
}

.style-section {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-large);
  padding: var(--spacing-large);
}

.style-section h2 {
  margin-top: 0;
  font-size: var(--font-size-xlarge);
  font-weight: 600;
}

.token-grid {
  display: grid;
  gap: var(--spacing-large);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.token-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-medium);
  padding: var(--spacing-small);
}

.token-swatch {
  height: 80px;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255,255,255,0.1);
}

.button-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2xs);
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-medium);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.button-demo:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--color-primary);
  color: var(--color-base);
  border: none;
}

.button-primary:hover {
  background: #0e5279;
}

.button-secondary {
  background: transparent;
  color: var(--color-base);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.button-secondary:hover {
  border-color: var(--color-base);
}

.button-accent {
  background: var(--color-accent);
  color: var(--color-base);
}

.button-accent:hover {
  background: #b60d0f;
}

/* Letter-stagger label + arrow (driven by GSAP, with a graceful no-JS fallback) */
.button-demo .btn-label {
  display: inline-flex;
  white-space: nowrap;
}

.button-demo .btn-char {
  display: inline-block;
  overflow: hidden;
  height: 1.3em;
  line-height: 1.3;
  vertical-align: top;
}

/* Preserve word spacing for the space characters */
.button-demo .btn-char.is-space {
  width: 0.3em;
}

.button-demo .btn-char-inner {
  display: block;
}

.button-demo .btn-char-inner > span {
  display: block;
  height: 1.3em;
  line-height: 1.3;
}

.button-demo .btn-arrow {
  display: inline-flex;
  will-change: transform;
}

/* No-JS / reduced-motion fallback: simple arrow nudge on hover */
.button-demo .btn-arrow svg {
  display: block;
  transition: transform 220ms ease;
}

.no-gsap .button-demo:hover .btn-arrow svg {
  transform: translateX(4px);
}

.headline-display {
  font-family: var(--font-family-caps);
  font-size: var(--font-size-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 var(--spacing-small) 0;
}

.headline-large {
  font-size: var(--font-size-xxlarge);
  font-weight: 600;
}

.typography-sample {
  display: grid;
  gap: var(--spacing-small);
}

.typography-sample p {
  margin: 0;
}

/* Type scale showcase */
.type-scale {
  display: grid;
  gap: var(--spacing-small);
}

.type-row {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-regular);
  padding-bottom: var(--spacing-2xs);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.type-row .type-meta {
  flex: 0 0 7rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  line-height: 1.4;
}

.type-row .type-meta span {
  display: block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.type-row .type-sample {
  margin: 0;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Spacing scale showcase */
.spacing-scale {
  display: grid;
  gap: var(--spacing-2xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.spacing-scale li {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
}

.spacing-scale .spacing-name {
  flex: 0 0 6rem;
  font-size: var(--font-size-small);
  color: var(--color-muted);
}

.spacing-scale .spacing-bar {
  height: 14px;
  background: var(--color-accent);
  border-radius: var(--radius-small);
}

.spacing-scale .spacing-val {
  font-size: var(--font-size-small);
}

.footer-inner {
  padding: var(--spacing-large) 0;
  text-align: center;
  color: rgba(255,255,255,0.72);
}

/* =========================================================================
   LANDING PAGE
   ========================================================================= */

.altis-landing-page {
  --color-highlight: #2ec0f9;
}

.landing-main {
  position: relative;
  overflow-x: clip;
}

/* --- Header overlay --- */
.landing-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding: var(--spacing-xlarge) 0 var(--spacing-regular);
}

.landing-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-regular);
}

.landing-header__logo img {
  display: block;
  height: clamp(67px, 6.9vw, 90px);
  width: auto;
}

.landing-header__contact {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--font-size-xs);
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--color-background);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none; /* decorative background — never interactive */
}

/* Some mobile browsers (notably iOS Safari, esp. in Low Power Mode) overlay a
   native play button on a background video. Hide the webkit media controls so
   the decorative video never shows playback UI.

   IMPORTANT: each pseudo-element gets its OWN rule. If these are grouped into a
   single comma-separated selector list, an unknown pseudo (e.g. the Blink-only
   ::-webkit-media-controls-overlay-play-button) invalidates the whole list in
   Safari, so NONE of the rules apply and the play button reappears. */
.hero__video::-webkit-media-controls {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
}
.hero__video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
}
.hero__video::-webkit-media-controls-play-button {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
}
.hero__video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
}
.hero__video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 73, 108, 0.55) 0%, rgba(0, 73, 108, 0.15) 45%, rgba(0, 73, 108, 0.35) 100%),
    linear-gradient(0deg, rgba(0, 40, 60, 0.55) 0%, rgba(0, 40, 60, 0) 40%);
}

/* Solid colour wash that fades in over the video as the hero scrolls away.
   Sits above the video + veil but below the spiral/headings (z-index 2+). */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--color-background);
  opacity: 0;
  pointer-events: none;
}

.hero__spiral {
  position: absolute;
  top: 64%;
  left: 0;
  transform: translate(-50%, -50%);
  width: min(1066px, 91vw);
  height: auto;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

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

.hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  width: min(1280px, 100% - 2rem);
}

.hero__content {
  --hero-gap: clamp(36px, 5vw, 78px);
  --hero-line: clamp(170px, 19vw, 262px);
  position: relative;
  display: grid;
  grid-template-columns: max-content var(--hero-gap) max-content;
  grid-template-rows: max-content var(--hero-gap) max-content;
  margin-left: auto;
  margin-right: clamp(0px, 4vw, 80px);
}

.hero__heading {
  margin: 0;
  line-height: 1.04;
}

.hero__heading--top {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: end;
  text-align: right;
}

.hero__heading--bottom {
  grid-column: 3;
  grid-row: 3;
  justify-self: start;
  align-self: start;
  text-align: left;
}

/* The red cross sits in the gap cell between the two headings; both arms
   are the same length and centred on the crossing point. */
.hero__cross {
  grid-column: 2;
  grid-row: 2;
  position: relative;
}

.hero__mask {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.06em;
  margin: -0.04em -0.06em;
}

.hero__word {
  display: block;
  /* Slightly larger than the global 3xlarge scale — the hero headline leads. */
  font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.5rem); /* 34 → 56 */
  line-height: 1.08;
}

.hero__word--strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__word--italic {
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.hero__line {
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-accent);
}

.hero__line--v {
  width: 2px;
  height: var(--hero-line);
  margin-top: calc(var(--hero-line) / -2);
  margin-left: -1px;
  transform-origin: top center;
}

.hero__line--h {
  height: 2px;
  width: var(--hero-line);
  margin-left: calc(var(--hero-line) / -2);
  margin-top: -1px;
  transform-origin: left center;
}

/* Hero scroll cue */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--spacing-xlarge);
  transform: translateX(-50%);
  z-index: 5;
  width: 42px;
  color: var(--color-accent);
  text-decoration: none;
}

/* Shared scroll-down cue: open red ring + white shaft + bobbing chevron. */
.cue-arrow {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.cue-arrow__head {
  transform-box: fill-box;
  transform-origin: center;
  animation: cue-arrow-down 1.8s ease-in-out infinite;
}

@keyframes cue-arrow-down {
  0%   { transform: translateY(-4px); opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateY(7px); opacity: 0; }
}

/* --- Mission --- */
.mission {
  position: relative;
  z-index: 1;
  background: var(--color-background);
  padding: clamp(96px, 16vh, 200px) 0;
  overflow: hidden;
}

/* Tiled logo watermark across the bottom, fading up into the background. */
.mission::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(300px, 32vw, 400px); /* ~8–10 rows of the tile */
  background: url("../images/pattern-logo.svg") repeat;
  background-size: 42px auto;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
}

.mission__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-xlarge);
}

.mission__statement {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.35rem);
  line-height: 1.26;
  letter-spacing: -0.01em;
  max-width: min(1060px, 92vw);
  text-wrap: balance;
}

/* Lines are produced at runtime by GSAP SplitText (no hardcoded spans), so the
   sentence wraps naturally at any width while still animating line-by-line. */

.mission__person {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission__name {
  margin: 0;
  font-weight: 700;
  font-size: var(--font-size-large);
}

.mission__role {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-highlight);
}

/* Mission scroll cue (uses the shared .cue-arrow svg) */
.scroll-cue {
  color: var(--color-accent);
  width: 44px;
  display: inline-block;
  text-decoration: none;
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact {
  position: relative;
  z-index: 1;
  background: var(--color-primary);
  /* Extra bottom room so the form can offset up into it without hitting the boxes. */
  padding: clamp(170px, 18vh, 260px) 0 clamp(170px, 18vh, 260px);
}

.contact__title {
  margin: 0 0 50px 0;
  text-align: center;
  font-size: var(--font-size-3xlarge);
  font-weight: 700;
}

/* Fixed aspect-ratio canvas: width + height always scale together, so every
   percentage-positioned child holds its place at any viewport size. */
.contact__stage {
  position: relative;
  width: min(1500px, 94vw);
  aspect-ratio: 4;
  /* Floor so the short (aspect-4) stage never collapses below what the
     centre-anchored boxes need, which would push them past the edges. */
  min-height: 340px;
  margin: 0 auto;
}

/* --- Maps ---
   The map image and its radar live together in a holder sized to the map
   image. The holder sits inside the contact box (absolute). Because the radar
   is positioned as a % of this holder, it maps directly onto the map image and
   stays locked to it at every scale — the map and radar always move as one. */
.contact-map-holder {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.contact-map-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Position + size of each map within its box (tweak to move/scale the map). */
.contact-map-holder--gb {
  left: 54.3%;
  bottom: 10%;
  width: 45.6%;
}

.contact-map-holder--gb .contact-map-img {
  /* Top of the UK fades into the background */
  -webkit-mask-image: linear-gradient(to bottom, transparent 30%, #000 60%);
  mask-image: linear-gradient(to bottom, transparent 30%, #000 60%);
}

.contact-map-holder--fr {
  left: -3.4%;
  top: 0%;
  width: 50%;
}

.contact-map-holder--fr .contact-map-img {
  /* Bottom of France fades into the background */
  -webkit-mask-image: linear-gradient(to top, transparent 40%, #000 80%);
  mask-image: linear-gradient(to top, transparent 40%, #000 80%);
}

/* --- Radar ripple points ---
   Positioned as a % of the map holder = the city's location ON the map.
   These never need to change with viewport size. */
.radar {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
}

.radar--london { right: 18%; bottom: 9%; }
.radar--jersey { left: 21%; top: 21%; }

/* Solid centre dot */
.radar::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--color-accent);
  border-radius: 50%;
}

.radar > span {
  position: absolute;
  inset: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 1.5px solid var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  animation: radar-ripple 2.6s ease-out infinite;
}

.radar > span:nth-child(2) { animation-delay: 0.87s; }
.radar > span:nth-child(3) { animation-delay: 1.74s; }

@keyframes radar-ripple {
  0%   { transform: scale(0.18); opacity: 0.9; }
  60%  { opacity: 0.35; }
  100% { transform: scale(1); opacity: 0; }
}

/* --- Contact boxes --- */
.contact-box {
  position: absolute;
  z-index: 2;
  /* Shared min-height so London matches the taller Jersey box */
  min-height: clamp(172px, 12vw, 190px);
}

/* Boxes anchor to the vertical centre — London above it, Jersey below it —
   so they never overflow or collide as the stage flattens. */
.contact-box--london {
  left: 10%;
  bottom: 27%;
  width: 46%;
}

.contact-box--jersey {
  right: 10.5%;
  top: 64%;
  width: 44%;
}

/* Border = four real 1px edges so it stays perfectly crisp at any size and
   resolves to a full box once drawn. Each edge scales in from a corner to
   create the directional draw (sequenced by GSAP). */
.contact-box__border {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact-box__edge {
  position: absolute;
  background: #2ec0f9;
}

.contact-box__edge--t,
.contact-box__edge--b {
  left: 0;
  right: 0;
  height: 1px;
}

.contact-box__edge--l,
.contact-box__edge--r {
  top: 0;
  bottom: 0;
  width: 1px;
}

.contact-box__edge--t { top: 0; }
.contact-box__edge--b { bottom: 0; }
.contact-box__edge--l { left: 0; }
.contact-box__edge--r { right: 0; }

/* London draws clockwise from bottom-left: left(up) → top(→) → right(down) → bottom(←) */
.contact-box--london .contact-box__edge--l { transform-origin: bottom; }
.contact-box--london .contact-box__edge--t { transform-origin: left; }
.contact-box--london .contact-box__edge--r { transform-origin: top; }
.contact-box--london .contact-box__edge--b { transform-origin: right; }

/* Jersey draws counter-clockwise from bottom-right: right(up) → top(←) → left(down) → bottom(→) */
.contact-box--jersey .contact-box__edge--r { transform-origin: bottom; }
.contact-box--jersey .contact-box__edge--t { transform-origin: right; }
.contact-box--jersey .contact-box__edge--l { transform-origin: top; }
.contact-box--jersey .contact-box__edge--b { transform-origin: left; }

.contact-box__body {
  padding: clamp(16px, 1.5vw, 28px);
  padding-bottom: clamp(30px, 2.6vw, 44px);
  z-index: 2;
    position: relative;
}

.contact-box--jersey .contact-box__body {
  text-align: right;
  z-index: 2;
    position: relative;
}

.contact-box__city {
  margin: 0;
  font-weight: 700;
  font-size: var(--font-size-xlarge);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  line-height: 1;
}

.contact-box--jersey .contact-box__city {
  /* balance the trailing letter-spacing on right-aligned text */
  margin-right: -0.3em;
}

.contact-box__addr {
  margin: var(--spacing-tiny) 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.contact-box__phone {
  margin: var(--spacing-tiny) 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
}

.email-btn {
  position: absolute;
  bottom: 0;
  display: inline-block;
  padding: 9px 15px;
  background: var(--color-accent);
  color: var(--color-base);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(50%);
  transition: background-color 200ms ease;
}

.email-btn:hover { background: var(--color-background); }

.contact-box--london .email-btn { left: clamp(16px, 1.5vw, 28px); }
.contact-box--jersey .email-btn { right: clamp(16px, 1.5vw, 28px); }

/* Stack the cards on small screens */
@media (max-width: 860px) {
  .contact { padding: clamp(64px, 8vh, 110px) 0; }
  .contact__stage {
    aspect-ratio: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
  }
  .contact-map { display: none; }
  .contact-box {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    min-height: 160px;
  }
  .contact-box__body { width: 60%; }
  .contact-box--jersey .contact-box__body { text-align: left; }
  .contact-box--jersey .contact-box__city { margin-right: 0; }
  .contact-box--jersey .email-btn { right: auto; left: clamp(20px, 2vw, 36px); }

  .contact-map-holder--fr {
    right: -15%;
    left: auto;
  }
}

/* =========================================================================
   DESKTOP — full-viewport snap panels (paired with Lenis snap in JS)
   ========================================================================= */
@media (min-width: 1025px) {
  .mission {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centring handles the spacing, so the big padding can shrink. */
    padding: var(--spacing-xlarge) 0 var(--spacing-medium) 0;
  }
}

/* =========================================================================
   GET IN TOUCH — FORM
   ========================================================================= */
.form-section {
  position: relative;
  z-index: 4;
  /* Pull the form card up so it offsets into the contact section above. */
  margin-top: 0;
  padding: clamp(8px, 2vw, 28px) 0 clamp(80px, 10vh, 150px);
  background: linear-gradient(0deg, #00496c 35%, #106288 35%);
}

.form-section__spiral {
  position: absolute;
  right: -20%;
  bottom: calc(-10% + 250px);
  width: min(1100px, 80vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: .3;
}

.form-card {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px);
  background: #0a3149;
  border-radius: var(--radius-large);
  box-shadow: 0 30px 80px rgba(0, 20, 35, 0.35);
}

.form-card__title {
  margin: 0 0 clamp(28px, 3.5vw, 48px);
  text-align: center;
  font-size: var(--font-size-3xlarge);
  font-weight: 700;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Fields with floating labels --- */
.field {
  position: relative;
}

.field__input {
  width: 100%;
  height: 56px;
  padding: 22px 16px 6px;
  background: transparent;
  border: 1px solid rgba(46, 192, 249, 0.55);
  border-radius: 2px;
  color: var(--color-base);
  font-family: inherit;
  font-size: var(--font-size-medium);
  transition: border-color 180ms ease;
  appearance: none;
}

.field__input:focus {
  outline: none;
  border-color: var(--color-highlight);
}

.field--textarea .field__input {
  height: auto;
  min-height: 220px;
  padding-top: 30px;
  resize: vertical;
  line-height: 1.5;
}

.field__label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  pointer-events: none;
  transition: top 150ms ease, transform 150ms ease, color 150ms ease, font-size 150ms ease;
}

.field--textarea .field__label {
  top: 18px;
  transform: none;
}

/* Floated state — focused or filled. The :placeholder-shown checks are scoped
   to input/textarea (selects never match it); selects float once a real value
   is chosen (:valid, since the empty default option keeps a required select
   :invalid). */
.field__input:focus ~ .field__label,
input.field__input:not(:placeholder-shown) ~ .field__label,
textarea.field__input:not(:placeholder-shown) ~ .field__label,
.field--select select:valid ~ .field__label {
  top: 9px;
  transform: none;
  font-size: 0.625rem;
  color: var(--color-highlight);
}

.field--textarea .field__input:focus ~ .field__label,
.field--textarea .field__input:not(:placeholder-shown) ~ .field__label {
  top: 8px;
}

/* --- Select dropdowns --- */
.field--select .field__input {
  cursor: pointer;
  padding-right: 44px;
  /* Force the native option popup to render in light mode so the dark option
     text below stays legible even when the OS/browser is set to dark mode
     (otherwise the popup background goes dark → dark-on-dark = invisible). */
  color-scheme: light;
}

.field--select .field__input:invalid {
  /* keep placeholder colour while nothing chosen */
  color: rgba(255, 255, 255, 0.0);
}

/* Explicit background as well, so the options stay readable in browsers that
   colour the popup independently of color-scheme. */
.field--select option {
  background-color: #ffffff;
  color: #0a3149;
}

.field__arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--color-accent);
  pointer-events: none;
}

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

.form-help {
  margin: -2px 0 6px;
  font-size: var(--font-size-small);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Consent checkbox --- */
.form-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  font-size: var(--font-size-small);
  cursor: pointer;
}

.form-consent__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-consent__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  transition: background-color 160ms ease;
}

.form-consent__box svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.form-consent__input:checked + .form-consent__box {
  background: var(--color-accent);
}

.form-consent__input:checked + .form-consent__box svg {
  opacity: 1;
  transform: scale(1);
}

.form-consent__input:focus-visible + .form-consent__box {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

/* --- Submit --- */
.form-submit {
  align-self: center;
  margin-top: 18px;
  padding: 14px 38px;
  background: var(--color-accent);
  color: var(--color-base);
  border: none;
  border-radius: 3px;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
}

.form-submit:hover {
  background: #b60d0f;
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Google reCAPTCHA v3 privacy/terms disclosure beneath the form. */
.form-recaptcha-notice {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 0.65;
}

.form-recaptcha-notice a {
  color: inherit;
  text-decoration: underline;
}

/* Inline submit feedback, shown below the button. */
.form-status {
  align-self: center;
  max-width: 46ch;
  margin: 6px 0 0;
  text-align: center;
  font-size: var(--font-size-small);
  line-height: 1.5;
}

.form-status--ok {
  color: var(--color-highlight);
}

.form-status--error {
  color: #ff8a8a;
}

@media (max-width: 860px) {
   .form-section {
       padding-top: 0;
   }
   .form-card {
       border-radius: var(--radius-small);
   }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  position: relative;
  z-index: 3;
  background: #00496c;
  /* Sits behind the form (pulled up), with its content below the form card. */
  margin-top: clamp(-150px, -10vw, -90px);
  padding: clamp(160px, 16vw, 250px) 0 clamp(34px, 4vh, 54px);
  text-align: center;
  overflow: hidden;
}

/* Tiled logo watermark across the bottom, fading up into the background. */
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(300px, 32vw, 400px); /* ~8–10 rows of the tile */
  background: url("../images/pattern-logo-strong.svg") repeat;
  background-size: 42px auto;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer__logo img {
  display: block;
  height: clamp(46px, 4.5vw, 62px);
  width: auto;
}

.site-footer__contact {
  display: flex;
  align-items: center;
  gap: var(--spacing-xsmall);
  margin: var(--spacing-small) 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
}

.site-footer__contact a {
  color: var(--color-base);
  text-decoration: none;
  transition: color 180ms ease;
}

.site-footer__contact a:hover {
  color: var(--color-highlight);
}

.site-footer__sep {
  flex: 0 0 auto;
  width: 1px;
  height: 1.1em;
  background: rgba(255, 255, 255, 0.35);
}

.site-footer__rule {
  width: min(1080px, 100%);
  height: 0;
  margin: clamp(26px, 4vh, 46px) 0 clamp(18px, 3vh, 30px);
  border: 0;
  border-top: 1px solid rgba(46, 192, 249, 0.4);
}

.site-footer__legal {
  max-width: 1080px;
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.58);
}

.site-footer__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-tiny);
  margin: var(--spacing-small) 0 0;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__meta a,
.site-footer__link {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 180ms ease;
}

.site-footer__meta a:hover,
.site-footer__link:hover {
  color: var(--color-base);
}

/* Footer modal triggers look like the adjacent text links. */
.site-footer__link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* =========================================================================
   BACK TO TOP
   ========================================================================= */
.back-to-top {
  position: fixed;
  right: clamp(18px, 3vw, 40px);
  bottom: clamp(18px, 3vw, 40px);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-base);
  cursor: pointer;
  /* Hidden until the contact section is reached. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 320ms ease, visibility 0s linear 320ms,
    background-color 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 320ms ease, transform 320ms ease, background-color 180ms ease;
}

.back-to-top:hover {
  background: #c00510;
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 200ms ease, visibility 0s linear 200ms;
    transform: none;
  }
  .back-to-top.is-visible {
    transform: none;
  }
  .back-to-top:hover {
    transform: none;
  }
}

/* =========================================================================
   MODALS (native <dialog>)
   ========================================================================= */
.is-modal-open {
  overflow: hidden;
}

.modal {
  width: min(720px, 92vw);
  max-height: min(82vh, 760px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-large);
  background: #0a3149;
  color: var(--color-text);
  box-shadow: 0 40px 110px rgba(0, 12, 22, 0.55);
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.3s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.modal::backdrop {
  background: rgba(0, 18, 30, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal[open]::backdrop {
  animation: modal-backdrop-in 0.3s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-small);
  flex: 0 0 auto;
  padding: clamp(20px, 3vw, 34px) clamp(22px, 3.5vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal__title {
  margin: 0;
  font-size: var(--font-size-xlarge);
  font-weight: 700;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-base);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__close:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-base);
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(22px, 3.2vw, 40px) clamp(22px, 3.5vw, 44px);
  overscroll-behavior: contain;
}

.modal__body p {
  margin: 0 0 1.1em;
  font-size: var(--font-size-small);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.modal__body p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .modal[open],
  .modal[open]::backdrop {
    animation: none;
  }
}

/* --- Pre-animation states (only when JS is active) --- */
.js-anim .contact__title { opacity: 0; transform: translateY(28px); }
.js-anim .contact-map { opacity: 0; }
.js-anim .contact-box__edge--t,
.js-anim .contact-box__edge--b { transform: scaleX(0); }
.js-anim .contact-box__edge--l,
.js-anim .contact-box__edge--r { transform: scaleY(0); }
.js-anim .hero__spiral rect { opacity: 0; }
.js-anim .hero__line--v { transform: scaleY(0); }
.js-anim .hero__line--h { transform: scaleX(0); }
.js-anim .hero__word { transform: translateY(110%); opacity: 0; }
.js-anim .hero__scroll { opacity: 0; }
.js-anim .landing-header__inner { opacity: 0; }
.js-anim .mission__statement { visibility: hidden; }
.js-anim .mission__person,
.js-anim .scroll-cue { opacity: 0; transform: translateY(20px); }
.js-anim .form-card { opacity: 0; transform: translateY(40px); }
.js-anim .contact-form > * { opacity: 0; transform: translateY(18px); }

/* Responsive: on mobile, stack the hero headings centred with a short red
   divider between them (desktop/tablet keep the diagonal cross layout above). */
@media (max-width: 720px) {
  /* Pull the logo/Contact button closer to the top of the page on mobile. */
  .landing-header {
    padding-top: var(--spacing-small);
  }
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    gap: var(--spacing-xsmall);
  }
  .hero__heading--top,
  .hero__heading--bottom {
    text-align: center;
    width: 100%;
  }
  /* Cross collapses to a single short, centred horizontal divider. */
  .hero__cross {
    width: clamp(64px, 26vw, 120px);
    height: 2px;
  }
  .hero__line--v {
    display: none;
  }
  .hero__line--h {
    inset: 0;
    width: 100%;
    height: 2px;
    margin: 0;
    transform-origin: center;
  }
  .hero__spiral { display: none; }
  .hero__word { font-size: 40px;}
  /* No italics on mobile. */
  .hero__word--italic { font-style: normal; }
}

/* Uniform ~30px left/right page gutters across every section on mobile, so the
   header, hero, mission, contact, form and footer all line up to the same edge. */
@media (max-width: 860px) {
  .container,
  .hero__inner,
  .contact__stage,
  .form-card {
    width: calc(100% - 60px);
  }
  .mission__statement {
    max-width: 100%;
  }
  .contact__title {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .hero__spiral,
  .js-anim .hero__word,
  .js-anim .hero__scroll,
  .js-anim .landing-header__inner,
  .js-anim .mission__person,
  .js-anim .scroll-cue { opacity: 1; transform: none; }
  .js-anim .mission__statement { visibility: visible; }
  .js-anim .hero__line--v { transform: scaleY(1); }
  .js-anim .hero__line--h { transform: scaleX(1); }
  .js-anim .hero__spiral rect { opacity: 1; }
  .js-anim .contact__title,
  .js-anim .contact-map { opacity: 1; transform: none; }
  .js-anim .contact-box__edge { transform: none; }
  .js-anim .form-card,
  .js-anim .contact-form > * { opacity: 1; transform: none; }
  .cue-arrow__head,
  .radar > span { animation: none; }
}
