/* ==========================================================================
   Dolphin Facilities — single-page site
   Design system: design-system/dolphin-facilities/MASTER.md
   Style: Vibrant & Block-based (dark canvas)  ·  Type: Archivo + Space Grotesk
   Dials: variance 6 · motion 5 · density 4
   ========================================================================== */

/* ---------------------------------- Tokens -------------------------------- */
:root {
  /* Surfaces — dark canvas so the video hero flows into the page instead of
     sitting on top of it as a separate band. */
  --bg:            #0A0A0B;
  --surface:       #131316;
  --surface-2:     #1C1C21;

  /* --border is decorative separation only. --border-strong is a hover/idle
     edge. Neither is load-bearing for identifying a control, so 3:1 does not
     apply to them — see --border-input below, which does carry that duty. */
  --border:        #2A2A31;
  --border-strong: #3A3A44;

  /* Form-control boundary. WCAG 1.4.11 (non-text contrast) requires 3:1 for
     the visual boundary that identifies an input, measured against the input's
     own fill (--bg). 3.34:1 — the softer greys above all fail this test. */
  --border-input:  #63636F;

  /* Text — all verified >= 4.5:1 against every surface each one is used on.
     fg 19.0:1 / 17.8:1 · muted 7.7:1 / 7.2:1 / 6.6:1 · subtle 5.8:1 / 5.4:1 / 5.0:1 */
  --fg:        #FAFAFA;
  --fg-muted:  #A1A1AA;
  --fg-subtle: #8A8A95;

  /* Reserved for text sitting over the hero video, where the backdrop is
     unknowable. Holds 6.3:1 even against a fully white frame under the scrim. */
  --fg-on-media: #D4D4D8;

  /* Accent = the exact brand orange sampled from assets/logo.avif (#E87818).
     It clears AA unaided on every surface here (6.72:1 on --bg, 6.30:1 on
     --surface, 5.76:1 on --surface-2), so the real brand colour is used
     directly for text, icons, rules and fills — no lightened stand-in needed.
     Note white-on-orange is only ~2.8:1, so the button label must be dark. */
  --accent:       #E87818;
  --accent-hover: #F59331;
  --accent-text:  #E87818;
  --on-accent:    #1A0E02;   /* warm near-black on the orange fill — 6.44:1 */

  --danger: #F87171;

  /* Spacing — density 4/10 */
  --space-xs:  0.25rem;   /*  4px */
  --space-sm:  0.5rem;    /*  8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Flat style: only the shallowest depth is permitted. */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.35);

  --container: 1200px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 150ms;
  --dur:      220ms;

  /* z-index scale — no arbitrary values anywhere in this file. */
  --z-header:  10;
  --z-navmenu: 30;
  --z-overlay: 50;

  --font-head: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset anchor landings so the sticky header never covers a heading. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;            /* 16px floor — prevents iOS focus auto-zoom */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;         /* belt-and-braces against horizontal scroll */
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* The UA rule for [hidden] is display:none at zero specificity, so any class
   that sets display (.video-toggle uses grid) silently defeats it. Without
   this, the video pause control renders even when JS has hidden it. */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

/* Keyboard-only focus ring. Never removed, always 2px, always the accent. */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ------------------------------- Primitives ------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* Caps paragraph measure at ~65ch per the line-length rule, while leaving
   multi-column sections free to use the full container width. */
.prose { max-width: 65ch; }

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: var(--z-overlay);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-md); }

/* Buttons — min height 44px to satisfy the touch-target minimum. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  /* Colour/border only — no transform, so a hover never nudges neighbours. */
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn--lg { min-height: 52px; padding: 0.9rem 1.8rem; font-size: 1rem; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--fg-subtle); }

.btn__icon { width: 18px; height: 18px; flex: none; }

.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--fg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* --------------------------------- Header --------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
/* Transparent over the hero, solid once the page scrolls — set from JS. */
.site-header[data-state="scrolled"] {
  background: rgb(10 10 11 / 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 72px;
}

/* The supplied logo is a white wordmark on transparency: it reads on the dark
   canvas and disappears on white. Another reason this site is dark. */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__img {
  width: 88px;
  height: 44px;      /* declared both ways so the header never reflows on load */
  object-fit: contain;
}
.brand--footer .brand__img { width: 112px; height: 56px; }

@media (max-width: 380px) {
  .brand__img { width: 76px; height: 38px; }
}

.nav { display: flex; align-items: center; gap: var(--space-xl); }
.nav__list { display: flex; align-items: center; gap: var(--space-lg); }

.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--fg); }

/* Active section indicator — colour plus an underline bar, so location is not
   signalled by colour alone. */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link[aria-current="true"] { color: var(--fg); }
.nav__link[aria-current="true"]::after { transform: scaleX(1); }

/* Hamburger — 44px hit area even though the bars are smaller. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bar {
  width: 18px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  /* dvh, not vh — avoids the mobile-browser toolbar jump. */
  min-height: 100dvh;
  padding-block: calc(72px + var(--space-3xl)) var(--space-3xl);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }

/* Renders on its own if the video is missing, still loading, or blocked. */
.hero__fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 15% 10%, rgb(232 120 24 / 0.26), transparent 60%),
    radial-gradient(70% 60% at 85% 25%, rgb(194 65 12 / 0.20), transparent 60%),
    linear-gradient(160deg, #14100C 0%, #0A0A0B 60%);
}
.hero__fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The scrim carries the text contrast on its own. Video pixels are unknowable,
   so the overlay must GUARANTEE the ratio rather than hope the footage is dark:
   every value here is set for a worst case of a pure-white frame.
   At 82% over white the backdrop resolves to #2E2E2E, which holds
   --fg at 15.3:1 and --fg-on-media at 9.2:1. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgb(10 10 11 / 0.94) 0%,
      rgb(10 10 11 / 0.82) 55%,
      rgb(10 10 11 / 0.55) 100%),
    linear-gradient(to top, rgb(10 10 11 / 0.95) 0%, transparent 45%);
}

.hero__inner { position: relative; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgb(19 19 22 / 0.7);
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-text);
  flex: none;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* The one place the bold-type direction is loudest. */
.hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.hero__title-accent { display: block; color: var(--accent-text); }

.hero__lede {
  margin-top: var(--space-lg);
  /* Not --fg-muted: over a bright video frame that would drop to 3.6:1. */
  color: var(--fg-on-media);
  font-size: clamp(1rem, 1.6vw, 1.175rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.video-toggle {
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-lg);
  z-index: 2;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgb(19 19 22 / 0.8);
  color: var(--fg);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.video-toggle:hover { background: var(--surface-2); border-color: var(--fg-subtle); }
.video-toggle svg { width: 18px; height: 18px; }
.video-toggle__play { display: none; }
.video-toggle[data-paused="true"] .video-toggle__pause { display: none; }
.video-toggle[data-paused="true"] .video-toggle__play { display: block; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-lg);
  transform: translateX(-50%);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
}
.scroll-cue__line {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, transparent, var(--fg-subtle));
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(-8px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(8px); }
}

/* -------------------------------- Sections -------------------------------- */
.section { padding-block: var(--space-3xl); }
.section--alt { background: var(--surface); }

.section__head { margin-bottom: var(--space-2xl); }
.section__head--center { text-align: center; }
.section__head--center .section__lede { margin-inline: auto; }
.section__head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

.section__eyebrow {
  margin-bottom: var(--space-sm);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section__title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  max-width: 24ch;
}
.section__head--center .section__title { margin-inline: auto; }
.section__lede { margin-top: var(--space-md); color: var(--fg-muted); }

/* -------------------------------- Services -------------------------------- */
/* Explicit column counts per breakpoint rather than auto-fit: with four cards,
   auto-fit resolved to three columns at desktop and stranded the fourth alone
   on its own row. */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.service-card:hover { border-color: var(--border-strong); background: var(--surface-2); }

.service-card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: rgb(232 120 24 / 0.14);
  color: var(--accent-text);
}
.service-card__icon svg { width: 24px; height: 24px; }

.service-card__title { font-size: 1.175rem; font-weight: 700; }
.service-card__body { color: var(--fg-muted); font-size: 0.95rem; }
.service-card .tag-list { margin-top: auto; }

/* --------------------------------- Events --------------------------------- */
.event-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;   /* lets the media absorb the leftover row height */
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color var(--dur) var(--ease);
}
.event-card:hover { border-color: var(--border-strong); }

/* Placeholder media block. Replace with <img class="event-card__img">.
   aspect-ratio reserves the space (no layout shift when a real image loads);
   flex-grow then lets a narrow card match the height of a wide neighbour,
   instead of leaving dead space under its text. */
.event-card__media,
.event-card__img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  flex: 1 1 auto;
}
.event-card__media { position: relative; }
.event-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
/* Warm tints drawn around the brand orange, with one cool counterpoint so the
   grid does not read as a single flat wash. Placeholders only — these vanish
   the moment real event photography replaces them. */
.event-card__media[data-tint="1"] { background: linear-gradient(135deg, #C2410C, #0A0A0B); }
.event-card__media[data-tint="2"] { background: linear-gradient(135deg, #9F1239, #0A0A0B); }
.event-card__media[data-tint="3"] { background: linear-gradient(135deg, #3730A3, #0A0A0B); }
.event-card__media[data-tint="4"] { background: linear-gradient(135deg, #155E75, #0A0A0B); }

.event-card__body { padding: var(--space-lg); }
.event-card__cat {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.event-card__title { font-size: 1.25rem; }
.event-card__meta {
  margin-top: var(--space-xs);
  color: var(--fg-subtle);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------- About --------------------------------- */
.about { display: grid; gap: var(--space-2xl); }

.about__text .prose + .prose { margin-top: var(--space-md); }
.about__text .prose { color: var(--fg-muted); }
.about__text .section__title { margin-bottom: var(--space-lg); }

.check-list { margin-top: var(--space-xl); display: grid; gap: var(--space-md); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: 0.95rem;
}
.check-list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent-text); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { padding: var(--space-xl); background: var(--surface); }
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;   /* keeps the row from jittering */
}
.stat__plus { color: var(--accent-text); }
.stat__label {
  display: block;
  margin-top: var(--space-sm);
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* --------------------------------- Clients -------------------------------- */
.client-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.client-strip__item {
  display: grid;
  place-items: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--bg);
}
.client-strip__item span {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  /* Muted by default, full strength on hover — but contrast stays >= 4.5:1
     at rest, so the resting state is legible on its own. */
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.client-strip__item:hover span { color: var(--fg); }

.quote {
  max-width: 60ch;
  margin: var(--space-2xl) auto 0;
  padding: var(--space-xl);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.quote__mark { width: 28px; height: 28px; margin: 0 auto var(--space-md); color: var(--accent-text); }
.quote__text {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 2vw, 1.375rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.quote__by { margin-top: var(--space-lg); font-size: 0.875rem; }
.quote__name { display: block; font-weight: 600; }
.quote__role { display: block; color: var(--fg-subtle); }

/* --------------------------------- Contact -------------------------------- */
.contact { display: grid; gap: var(--space-2xl); }

.contact__intro .prose { margin-top: var(--space-md); color: var(--fg-muted); }
.contact__intro .section__title { margin-bottom: 0; }

.contact__details { margin-top: var(--space-xl); display: grid; gap: var(--space-md); }
.contact__details li { display: flex; align-items: center; gap: var(--space-md); font-size: 0.95rem; }
.contact__details svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.contact__details a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.contact__details a:hover { color: var(--accent-text); border-color: var(--accent-text); }

.form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.field--full, .form__foot { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: var(--space-sm); }

/* Visible label on every field — never placeholder-as-label. */
.field__label { font-size: 0.875rem; font-weight: 600; }
.req { color: var(--accent-text); }

.field__input {
  min-height: 48px;                 /* >= 44px touch target */
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border-input);   /* 3.34:1 — WCAG 1.4.11 */
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1rem;                  /* 16px — no iOS zoom on focus */
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.field__input::placeholder { color: var(--fg-subtle); }
.field__input:hover { border-color: var(--fg-subtle); }
.field__input:focus-visible { border-color: var(--accent-text); outline-offset: 1px; }

.field__input--area { min-height: 128px; resize: vertical; }

.field__input--select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}
.field__input--select option { background: var(--bg); }

.field__hint { color: var(--fg-subtle); font-size: 0.8rem; }

/* Error sits directly below its own field, never only in a summary at the top. */
.field__error { color: var(--danger); font-size: 0.8rem; min-height: 0; }
.field__error:empty { display: none; }

.field[data-invalid="true"] .field__input { border-color: var(--danger); }
/* Danger is paired with a glyph so the state is not signalled by colour alone. */
.field[data-invalid="true"] .field__error::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 0.35rem;
  vertical-align: -2px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.form__submit { position: relative; }

.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgb(6 24 28 / 0.3);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form[data-pending="true"] .spinner { display: block; }

.form__status { font-size: 0.875rem; color: var(--fg-muted); }
.form__status[data-tone="success"] { color: var(--accent-text); }
.form__status[data-tone="error"]   { color: var(--danger); }

/* --------------------------------- Footer --------------------------------- */
.site-footer {
  padding-top: var(--space-3xl);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.brand--footer { font-size: 1rem; }
.site-footer__tag { margin-top: var(--space-md); color: var(--fg-muted); font-size: 0.9rem; }

.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.site-footer__nav a {
  color: var(--fg-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.site-footer__nav a:hover { color: var(--fg); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-lg);
  border-top: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: 0.8rem;
}
.site-footer__base a { color: var(--fg-muted); text-decoration: none; }
.site-footer__base a:hover { color: var(--fg); }

/* --------------------------- Scroll reveal (motion) ----------------------- */
/* opacity + transform only — never width/height/top/left. */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ------------------------------- Breakpoints ------------------------------ */
/* Mobile-first: 375 base, then 768 / 1024 / 1440. */

@media (min-width: 768px) {
  .container { padding-inline: var(--space-xl); }
  .section { padding-block: 6rem; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .about { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
  .section { padding-block: 7.5rem; }

  /* Three columns, not four: with a wide-span card the sequence
     wide(2)+normal(1) / normal(1)+wide(2) fills both rows exactly.
     A four-column track left two empty cells hanging off row two. */
  .event-grid { grid-template-columns: repeat(3, 1fr); }
  .event-card--wide { grid-column: span 2; }

  .about {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--space-3xl);
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 0.9fr 1.1fr; gap: var(--space-3xl); align-items: start; }
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
}

@media (min-width: 1152px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }
  .service-card { padding: var(--space-lg); }
}

@media (min-width: 1440px) {
  .container { padding-inline: var(--space-2xl); }
}

/* ------------------------- Mobile navigation (< 900px) -------------------- */
@media (max-width: 899px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    z-index: var(--z-navmenu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-md) var(--space-lg) var(--space-xl);
    background: rgb(10 10 11 / 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    /* Collapsed by default; opened by [data-open] from JS. */
    display: none;
  }
  .nav[data-open="true"] { display: flex; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: var(--space-md) 0;     /* comfortable 48px+ rows */
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="true"] { color: var(--accent-text); }

  .nav__cta { margin-top: var(--space-lg); width: 100%; }

  body[data-nav-open="true"] { overflow: hidden; }
}

@media (max-width: 767px) {
  .form { grid-template-columns: 1fr; padding: var(--space-lg); }
  .hero__title { max-width: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .scroll-cue { display: none; }   /* would collide with the video toggle */
}

/* ------------------------------ Reduced motion ---------------------------- */
/* Mandatory, not optional: honour the OS setting across every animation. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Revealed content must be visible immediately, not stuck at opacity 0. */
  [data-reveal] { opacity: 1 !important; transform: none !important; }

  .pulse-dot, .scroll-cue__line { animation: none; }
  .scroll-cue { display: none; }
}
