/* ============================================================
   BelvoirCare — Event Medical Cover
   Design tokens, theming (light/dark/system), layout, motion
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand — navy (primary), sampled from the BelvoirCare logo (#34516d) */
  --blue-900: #16242f;   /* deepest navy — headings */
  --blue-800: #233a51;
  --blue-700: #34516d;   /* logo navy — primary */
  --blue-600: #3f5f7e;   /* primary hover (slightly lighter lift) */
  --blue-500: #4d6a89;
  --blue-300: #9fb4cb;
  /* Brand — amber (accent), sampled from the logo crown/initials (#ee9635) */
  --accent: #ee9635;        /* logo amber */
  --accent-600: #d97e1e;    /* deeper amber — accent button hover */
  --accent-700: #b9650f;    /* deep amber — gradient text end */
  --accent-ink: #a85e0c;    /* readable amber-brown for small accent text (AA on white) */
  --accent-soft: #fdeccd;   /* soft amber tint */
  --on-accent: #1f3047;     /* navy ink on amber surfaces (AAA contrast) */

  /* Semantic — LIGHT (default) */
  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #15212e;
  --text-muted: #51647a;
  --heading: #16242f;
  --primary: var(--blue-700);
  --primary-hover: var(--blue-600);
  --on-primary: #ffffff;
  --border: #d9e1ec;
  --ring: #4f7bb0;
  --shadow-sm: 0 1px 2px rgba(22, 36, 47, .07), 0 2px 8px rgba(22, 36, 47, .06);
  --shadow-md: 0 8px 24px rgba(22, 36, 47, .11);
  --shadow-lg: 0 24px 60px rgba(22, 36, 47, .17);
  --glass-bg: rgba(255, 255, 255, .65);
  --glass-brd: rgba(255, 255, 255, .8);

  /* Type */
  --font-head: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing / radius */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --space-section: clamp(4rem, 9vw, 7rem);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur: .28s;

  --header-h: 70px;
}

[data-theme="dark"] {
  --bg: #0b1622;
  --bg-elev: #11202f;
  --surface: #13243a;
  --surface-2: #1a2d45;
  --text: #e8eef6;
  --text-muted: #a3b4c9;
  --heading: #f3f7fc;
  --primary: #7ba6d4;
  --primary-hover: #9abde0;
  --on-primary: #0b1622;
  --border: #243a54;
  --ring: #7ba8e0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
  --glass-bg: rgba(19, 36, 58, .6);
  --glass-brd: rgba(123, 166, 212, .16);
  --accent-ink: #f5b461;          /* light amber for small accent text on dark */
  --accent-soft: rgba(238, 150, 53, .16);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
a { color: var(--primary); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -100px;
  background: var(--primary); color: var(--on-primary);
  padding: .6rem 1rem; border-radius: 8px; z-index: 1000;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; background: var(--bg-btn); color: var(--on-primary);
  min-height: 44px; line-height: 1;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease-out), background-color var(--dur);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; min-height: 52px; }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; min-height: 40px; }

.btn-accent { --bg-btn: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px rgba(238, 150, 53, .34); }
.btn-accent:hover { --bg-btn: var(--accent-600); box-shadow: 0 12px 30px rgba(238, 150, 53, .44); }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border); box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: height .3s var(--ease-out), border-color .3s, background-color .3s;
}
.site-header.scrolled { height: 60px; border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.28rem; color: var(--heading); line-height: 1; }
/* Real logo mark (crown + initials + Star of Life), white background removed */
.brand-logo { width: auto; height: 42px; flex-shrink: 0; transition: height .3s var(--ease-out); }
.site-header.scrolled .brand-logo { height: 36px; }
.brand-lockup { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-text { letter-spacing: -.01em; }
.brand-text strong { color: var(--accent-ink); font-weight: 800; }
/* Animated EKG heartbeat line tucked under the wordmark — ties the logo to the pulse motif */
.brand-ekg { width: 100%; height: 9px; color: var(--accent); overflow: hidden; }
.brand-ekg path { animation: brandEkg 3.6s linear infinite; will-change: transform; }
/* Footer keeps a compact heartbeat mark */
.brand-pulse { stroke-dasharray: 40; animation: drawPulse 3s var(--ease-out) infinite; }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  color: var(--text-muted); font-family: var(--font-head); font-weight: 500; font-size: .96rem;
  padding: .5rem .8rem; border-radius: 8px; position: relative; transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--heading); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 2px; border-radius: 2px; background: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: background-color .2s, transform .2s, border-color .2s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--primary); }
.theme-toggle svg { position: absolute; transition: opacity .25s, transform .35s var(--ease-spring); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon, .theme-toggle .icon-system { opacity: 0; transform: scale(.5) rotate(-30deg); }
.theme-toggle[data-mode="light"] .icon-sun,
.theme-toggle[data-mode="dark"] .icon-moon,
.theme-toggle[data-mode="system"] .icon-system { opacity: 1; transform: scale(1) rotate(0); position: relative; }

.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: 11px; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.menu-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)); padding-bottom: clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 40%, transparent 80%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 40%, transparent 80%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: floatGlow 14s ease-in-out infinite; }
.glow-1 { width: 460px; height: 460px; top: -140px; right: -80px; background: radial-gradient(circle, rgba(52,81,109,.5), transparent 70%); }
.glow-2 { width: 420px; height: 420px; bottom: -160px; left: -100px; background: radial-gradient(circle, rgba(238,150,53,.34), transparent 70%); animation-delay: -6s; }
.hero-ekg { position: absolute; left: 0; right: 0; bottom: 8%; width: 100%; height: 140px; color: var(--accent); opacity: .28; }
.hero-ekg path { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: ekg 5s linear infinite; }

.hero-inner { position: relative; z-index: 1; display: grid; gap: clamp(2rem, 5vw, 3.4rem); align-items: center; }
.hero-copy { min-width: 0; max-width: 640px; }

/* Hero photo — reuses .media-frame; balanced beside the copy on wide screens */
.hero-media { position: relative; margin: 0; aspect-ratio: 16 / 11; }
.hero-media .hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-media-badge {
  position: absolute; left: clamp(.8rem, 2.5vw, 1.1rem); bottom: clamp(.8rem, 2.5vw, 1.1rem);
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .6rem .95rem; border-radius: 14px;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-md); backdrop-filter: blur(10px);
  font-family: var(--font-head);
}
.hero-media-badge svg { color: var(--primary); flex-shrink: 0; }
.hero-media-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.hero-media-badge strong { font-weight: 800; font-size: .96rem; color: var(--heading); }
.hero-media-badge small { font-size: .76rem; font-weight: 500; color: var(--text-muted); }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .hero-copy { max-width: none; }
  .hero-media { aspect-ratio: 4 / 3.4; }
}
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--primary); background: var(--surface); border: 1px solid var(--border); padding: .45rem .9rem; border-radius: 999px; box-shadow: var(--shadow-sm); }
.dot-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); position: relative; }
.dot-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.8s var(--ease-out) infinite; }

.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; margin: 1.2rem 0 1.1rem; }
.grad-text { background: linear-gradient(110deg, var(--blue-700), var(--accent-700)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .grad-text { background: linear-gradient(110deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.8rem 0 1.6rem; }

.trust-badges { display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 500; color: var(--text-muted); }
.badge svg { color: var(--primary); flex-shrink: 0; }

.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding: 1.6rem; background: var(--glass-bg); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-label { display: block; margin-top: .4rem; font-size: .85rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin: 0 auto clamp(2.2rem, 5vw, 3.5rem); text-align: center; }
.section-kicker { font-family: var(--font-head); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .6rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.section-intro { color: var(--text-muted); font-size: 1.08rem; margin-top: .8rem; }

.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.two-col.reverse .col-media { order: -1; }
.lead { font-size: 1.2rem; color: var(--text); margin: 1rem 0; font-weight: 500; }
.col-text p { color: var(--text-muted); margin-bottom: 1rem; }

.check-list { display: grid; gap: .7rem; margin-top: 1.4rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--text); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .1rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent-soft); }
.check-list li::after { content: ""; position: absolute; left: .45rem; top: .42rem; width: .5rem; height: .28rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Feature card */
.feature-card { padding: 2rem; border-radius: var(--radius-lg); }
.glass { background: var(--glass-bg); border: 1px solid var(--glass-brd); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-700), var(--accent)); color: #fff; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.feature-card p { color: var(--text-muted); }
.mini-stats { display: flex; gap: 1.5rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.mini-stats strong { display: block; font-family: var(--font-head); color: var(--heading); font-size: 1.1rem; }
.mini-stats span { font-size: .82rem; color: var(--text-muted); }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--blue-600), var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 1.1rem; transition: transform .35s var(--ease-spring); }
.card:hover .card-icon { transform: scale(1.08) rotate(-4deg); }
.card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .97rem; }

/* Equipment */
.equip { margin-top: 2.6rem; text-align: center; }
.equip-title { font-size: 1.15rem; margin-bottom: 1rem; color: var(--text-muted); font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.tag-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .5rem 1.1rem; font-size: .92rem; font-weight: 500; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .25s, border-color .25s; }
.tag-list li:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Fleet */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.fleet-item { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; font-family: var(--font-head); font-weight: 600; color: var(--heading); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; }
.fleet-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.fleet-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); color: #fff; }
.fleet-cta { justify-content: center; background: var(--accent-soft); border-color: transparent; }
.fleet-cta a { color: var(--accent-ink); display: inline-flex; gap: .4rem; align-items: center; }
.fleet-cta a span { transition: transform .25s; }
.fleet-cta:hover a span { transform: translateX(4px); }

/* Shrimpy */
.section-shrimpy { background: radial-gradient(120% 90% at 80% 10%, var(--accent-soft), transparent 60%); }
.shrimpy-stage { position: relative; display: grid; place-items: center; padding: 2rem; }
.shrimpy-ring { position: absolute; width: 320px; height: 320px; max-width: 80vw; max-height: 80vw; border-radius: 50%; background: radial-gradient(circle, rgba(238,150,53,.18), transparent 65%); animation: pulseRing 4s ease-in-out infinite; }
.shrimpy-photo {
  position: relative; margin: 0;
  width: 360px; max-width: 82vw; aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-lg), 0 22px 44px rgba(238, 150, 53, .26);
}
.shrimpy-photo img { width: 100%; height: 100%; object-fit: cover; }
.shrimpy-float { transform-origin: center; animation: bob 5s ease-in-out infinite; }
.shrimpy-cap { position: relative; margin-top: 1rem; font-family: var(--font-head); font-weight: 600; color: var(--accent-ink); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.6rem 1.6rem; box-shadow: var(--shadow-sm); }
.step-num { position: absolute; top: -22px; left: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--blue-700), var(--accent)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; box-shadow: var(--shadow-md); }
.step h3 { margin: .8rem 0 .5rem; font-size: 1.2rem; }
.step p { color: var(--text-muted); font-size: .97rem; }

/* Wellbeing */
.section-wellbeing { background: linear-gradient(180deg, transparent, var(--surface-2)); position: relative; }
.new-pill { display: inline-block; background: var(--accent); color: var(--on-accent); font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: .15rem .5rem; border-radius: 999px; margin-right: .5rem; vertical-align: middle; }
.wb-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.wb-check { display: flex; align-items: flex-start; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; }
.wb-check:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.wb-ic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-700), var(--accent)); color: #fff; }
.wb-check h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.wb-check p { color: var(--text-muted); font-size: .94rem; }

.wb-journey-title { text-align: center; font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 2.2rem; }
.bays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; position: relative; }
.bay { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.4rem 1.6rem 1.6rem; box-shadow: var(--shadow-sm); text-align: center; transition: transform .35s var(--ease-out), box-shadow .35s; }
.bay:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* connector arrows between bays (desktop) */
.bay:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -1.05rem; width: 1.4rem; height: 1.4rem; transform: translateY(-50%) rotate(45deg); border-top: 3px solid var(--accent); border-right: 3px solid var(--accent); z-index: 2; }
.bay-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--blue-700); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .82rem; letter-spacing: .04em; padding: .35rem 1rem; border-radius: 999px; box-shadow: var(--shadow-md); white-space: nowrap; }
.bay-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 1rem; transition: transform .35s var(--ease-spring); }
.bay:hover .bay-ic { transform: scale(1.08) rotate(-4deg); }
.bay h4 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: .5rem; }
.bay p { color: var(--text-muted); font-size: .95rem; }

.wb-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.4rem 2.2rem; margin-top: clamp(2.5rem, 6vw, 3.5rem); padding: 1.8rem clamp(1.4rem, 4vw, 2.6rem); background: var(--glass-bg); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.wb-stat { text-align: center; }
.wb-stat-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--heading); line-height: 1; font-variant-numeric: tabular-nums; }
.wb-unit { font-size: .9rem; font-weight: 700; color: var(--accent-ink); margin-left: .15rem; }
.wb-stat-label { display: block; margin-top: .4rem; font-size: .85rem; color: var(--text-muted); }
.wb-divider { width: 1px; height: 42px; background: var(--border); }
.wb-cta { margin-left: auto; }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { display: grid; gap: 1rem; margin: 1.6rem 0; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.ci { width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.ci-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.contact-list a, .ci-static { font-family: var(--font-head); font-weight: 600; color: var(--heading); font-size: 1.05rem; }
.contact-list a:hover { color: var(--primary); }

.social { display: flex; gap: .8rem; }
.social-btn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: transform .25s var(--ease-spring), color .25s, border-color .25s, background-color .25s; }
.social-btn:hover { transform: translateY(-3px); color: #fff; background: var(--primary); border-color: var(--primary); }

/* Form */
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow-md); }
.contact-form h3 { font-size: 1.4rem; margin-bottom: 1.3rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--heading); margin-bottom: .4rem; }
.req { color: var(--accent-ink); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .75rem .9rem; min-height: 46px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 18%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .7; }
.field.invalid input, .field.invalid textarea { border-color: var(--accent-600); }
.error { color: var(--accent-ink); font-size: .84rem; margin-top: .35rem; min-height: 0; }

.form-submit { width: 100%; margin-top: .4rem; position: relative; }
.form-submit.loading .btn-label { opacity: 0; }
.btn-spinner { display: none; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.form-submit.loading .btn-spinner { display: block; }
.form-note { font-size: .85rem; color: var(--text-muted); margin-top: 1rem; }
.form-success { margin-top: 1rem; color: #16a34a; font-weight: 600; font-family: var(--font-head); }
.form-success:empty { display: none; }

/* Footer */
.site-footer { background: var(--bg-elev); border-top: 1px solid var(--border); padding-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); margin-top: .6rem; max-width: 32ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.footer-nav a { color: var(--text-muted); font-family: var(--font-head); font-weight: 500; }
.footer-nav a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 1.4rem 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .88rem; }
.footer-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.1rem; }
.design-credit { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-muted); font-family: var(--font-head); font-weight: 600; padding: .35rem .2rem; border-radius: 8px; transition: color .2s, transform .2s; }
.design-credit svg { transition: transform .3s var(--ease-spring); }
.design-credit:hover { color: var(--primary); }
.design-credit:hover svg { transform: rotate(8deg) scale(1.12); }

/* Back to top */
.back-to-top { position: fixed; right: 1.4rem; bottom: 1.4rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-lg); z-index: 90; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9); transition: opacity .3s, transform .3s var(--ease-spring), visibility .3s; }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { background: var(--primary-hover); transform: translateY(-3px) scale(1.05); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-reveal-delay="1"] { transition-delay: .08s; }
.reveal[data-reveal-delay="2"] { transition-delay: .16s; }
.reveal[data-reveal-delay="3"] { transition-delay: .24s; }
.reveal[data-reveal-delay="4"] { transition-delay: .32s; }
.reveal[data-reveal-delay="5"] { transition-delay: .40s; }
.reveal[data-reveal-delay="6"] { transition-delay: .48s; }
.reveal[data-reveal-delay="7"] { transition-delay: .56s; }

/* ---------- Keyframes ---------- */
@keyframes drawPulse { 0% { stroke-dashoffset: 80; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes brandEkg { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes ekg { to { stroke-dashoffset: 0; } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes floatGlow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, 30px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes pulseRing { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.08); opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col, .contact-wrap { grid-template-columns: 1fr; }
  .two-col.reverse .col-media { order: 0; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .bays { grid-template-columns: 1fr; gap: 2.2rem; }
  /* turn connector arrows downward when stacked */
  .bay:not(:last-child)::after { top: auto; bottom: -1.55rem; right: 50%; transform: translateX(50%) rotate(135deg); }
  .wb-divider { display: none; }
  .wb-cta { margin-left: 0; width: 100%; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1.25rem; box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .4s var(--ease-out); z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .85rem .6rem; border-radius: 10px; font-size: 1.05rem; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--surface-2); }
  .menu-toggle { display: flex; }
  .nav-cta { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; padding: 1.2rem; }
  .btn-lg { width: 100%; }
  .hero-cta { flex-direction: column; }
}

/* ---------- Imagery / media ---------- */
/* Reusable photo frame: rounded, themed border, intrinsic ratio set per use */
.media-frame {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--surface-2);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Caption that sits over the lower edge of a photo */
.media-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1.2rem .95rem;
  color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  background: linear-gradient(to top, rgba(4, 12, 24, .85), rgba(4, 12, 24, .35) 55%, transparent);
}
.media-cap-lg { padding-top: 2.4rem; }
.media-cap-lg strong { display: block; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 800; margin-bottom: .25rem; }
.media-cap-lg span { display: block; font-weight: 500; color: rgba(255, 255, 255, .86); }

/* About — team photo collage with floating glass stat badge */
.about-media { position: relative; padding-right: clamp(0px, 5vw, 2.4rem); padding-bottom: 2.4rem; }
.about-media-main { aspect-ratio: 4 / 3; }
.about-media-inset {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 4 / 3;
  border: 5px solid var(--bg); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.media-badge {
  position: absolute; left: clamp(.7rem, 2.5vw, 1.1rem); top: clamp(.7rem, 2.5vw, 1.1rem);
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 1rem; border-radius: 16px;
}
.media-badge strong { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--heading); line-height: 1; }
.media-badge span { font-size: .8rem; color: var(--text-muted); max-width: 13ch; line-height: 1.25; }

/* Services — events we cover showcase */
.ecarousel { margin-top: clamp(2.2rem, 5vw, 3rem); }
/* Each slide keeps the original two-up showcase size (~half the container) and
   its 16:10 crop; align-self stops the flex row from stretching the height. */
.event-slide { flex: 0 0 clamp(280px, 82vw, 560px); align-self: flex-start; }
.event-shot { aspect-ratio: 16 / 10; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.event-shot img { transition: transform .6s var(--ease-out); }
.event-shot:hover { box-shadow: var(--shadow-lg); }
.event-shot:hover img { transform: scale(1.04); }

/* Fleet — vehicle bento gallery */
.fleet-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-bottom: clamp(2rem, 5vw, 2.6rem); }
.fleet-shot { aspect-ratio: 4 / 3; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.fleet-shot img { transition: transform .6s var(--ease-out); }
.fleet-shot:hover { box-shadow: var(--shadow-lg); }
.fleet-shot:hover img { transform: scale(1.04); }
.fleet-shot-lg { grid-column: 1 / -1; aspect-ratio: 16 / 7; }

/* Compliance — training banner */
.compliance-banner { aspect-ratio: 21 / 9; margin-bottom: clamp(2.2rem, 5vw, 3rem); }

/* Full-bleed CTA band over a branded photo */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.cta-band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 66%; z-index: -2; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(6, 16, 32, .9), rgba(13, 28, 44, .66) 55%, rgba(52, 81, 109, .58));
}
.cta-band-inner { text-align: center; max-width: 680px; }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.cta-band p { color: rgba(255, 255, 255, .9); font-size: clamp(1.05rem, 2vw, 1.2rem); margin: 1rem auto 1.9rem; max-width: 56ch; }

@media (max-width: 680px) {
  .fleet-gallery { grid-template-columns: 1fr; }
  .fleet-shot-lg { aspect-ratio: 16 / 10; }
  .compliance-banner { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .about-media { padding: 0; }
  .about-media-inset { position: static; width: 62%; margin: -2.6rem 0 0 auto; }
}

/* ---------- Testimonial carousel (Facebook recommendations) ---------- */
.tcarousel { position: relative; }
.tcarousel-viewport {
  display: flex; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; cursor: grab;
  scrollbar-width: none; -ms-overflow-style: none;
  /* soft fade at both edges so cards flow in/out of view */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tcarousel-viewport::-webkit-scrollbar { display: none; }
.tcarousel-viewport.dragging { cursor: grabbing; }
/* Let touch swipe scroll horizontally while the page still scrolls vertically,
   and stop images from being "grabbed" (native drag) instead of scrolling. */
.tcarousel-viewport { touch-action: pan-x pan-y; }
.tcarousel-viewport img {
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.tcarousel-track { display: flex; gap: 1.4rem; align-items: stretch; padding: .9rem .25rem 1.5rem; }

/* Fixed-width cards: ~3 visible on desktop, ~1 + peek on mobile.
   align-items:stretch on the row keeps every card the height of the tallest. */
.tcard {
  flex: 0 0 clamp(280px, 80vw, 338px);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
}
/* amber accent strip that draws in on hover/focus — matches the service cards */
.tcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
}
.tcard:hover, .tcard:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.tcard:hover::before, .tcard:focus-visible::before { transform: scaleX(1); }

.tcard-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.tcard-avatar {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.tcard-id { display: flex; flex-direction: column; min-width: 0; }
.tcard-name { font-family: var(--font-head); font-weight: 700; color: var(--heading); font-size: 1.02rem; line-height: 1.25; }
.tcard-rec { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .82rem; color: var(--text-muted); line-height: 1.3; margin-top: .12rem; }
.tcard-rec .rec-tick { flex-shrink: 0; }
.tcard-rec strong { color: var(--accent-ink); font-weight: 700; }
.tcard-fb { position: absolute; top: 1.25rem; right: 1.25rem; color: #1877F2; opacity: .85; transition: transform .3s var(--ease-spring), opacity .2s; }
[data-theme="dark"] .tcard-fb { color: #5b9bff; }
.tcard:hover .tcard-fb { transform: scale(1.12); opacity: 1; }
.tcard-msg {
  color: var(--text-muted); font-size: .96rem; line-height: 1.62;
  /* opening quote accent */
  position: relative;
}
.tcard-msg::before {
  content: "\201C"; color: var(--accent); opacity: .35;
  font-family: Georgia, "Times New Roman", serif; font-size: 2.4rem; font-weight: 700;
  position: absolute; left: -.1rem; top: -1.3rem; line-height: 1;
}

/* Prev / next controls (keyboard + click alternative to drag/swipe) */
.tcarousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--heading); cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, opacity .2s;
}
.tcarousel-arrow:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); transform: translateY(-50%) scale(1.06); }
.tcarousel-arrow:active { transform: translateY(-50%) scale(.96); }
.tcarousel-prev { left: -10px; }
.tcarousel-next { right: -10px; }

.review-note { text-align: center; margin-top: 1.6rem; font-size: .92rem; color: var(--text-muted); }
.review-note a { font-weight: 600; }

/* On touch-first widths, hide arrows (swipe/drag is the natural affordance) */
@media (max-width: 760px) {
  .tcarousel-arrow { display: none; }
  .tcarousel-track { gap: 1rem; }
}

/* ---------- News / Facebook posts ---------- */
/* News sits directly below the (same-background) testimonials band, so the two sections'
   stacked padding leaves an oversized empty gap — trim this section's top padding. */
.section-flush-top { padding-top: clamp(1.5rem, 3.5vw, 2.75rem); }

/* 3-up grid: equal columns, and grid stretch makes every card as tall as the tallest */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.post {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
}
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* Photo at the top — fixed 16:10 frame so every card's image band lines up */
.post-media {
  display: block; position: relative;
  aspect-ratio: 16 / 10; background: var(--surface-2);
  overflow: hidden;
}
.post-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease-out);
}
.post:hover .post-media img { transform: scale(1.05); }

/* Logo fallback — shown when a post has no photo (contained, on a soft brand tint) */
.post-fallback { display: none; position: absolute; inset: 0; place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft)); }
.post-fallback img { width: auto; height: 46%; max-width: 62%; object-fit: contain; opacity: .92; }
.post-media--fallback .post-fallback { display: grid; }
.post:hover .post-media--fallback .post-fallback img { transform: none; }

.post-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; gap: 1.1rem; }
.post-text { color: var(--text); font-size: .98rem; line-height: 1.62; margin: 0; }
/* Push the button to the bottom so all CTAs align across the equal-height row */
.post-more { align-self: flex-start; margin-top: auto; gap: .45rem; }
.post-more svg { transition: transform .3s var(--ease-spring); }
.post-more:hover svg { transform: translate(2px, -2px); }

.post-seeall { text-align: center; margin-top: clamp(2rem, 4vw, 3rem); font-family: var(--font-head); font-weight: 600; }
.post-seeall a { display: inline-flex; align-items: center; gap: .5rem; color: var(--heading); }
.post-seeall a > svg:first-child { color: #1877F2; }
[data-theme="dark"] .post-seeall a > svg:first-child { color: #5b9bff; }
.post-seeall a:hover { color: var(--accent-ink); }
.post-seeall-arrow { transition: transform .3s var(--ease-spring); }
.post-seeall a:hover .post-seeall-arrow { transform: translateX(4px); }

/* Tablet: 3 cards get cramped — drop to a single, comfortable column */
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: clamp(.8rem, 3vw, 1.4rem); transform: translateX(-50%) translateY(0);
  width: min(100% - 1.6rem, 720px); z-index: 300;
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-spring);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-hiding { opacity: 0; transform: translateX(-50%) translateY(16px); pointer-events: none; }
.cookie-ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.cookie-body { flex: 1; min-width: 0; }
.cookie-text { font-size: .92rem; color: var(--text); line-height: 1.55; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.cookie-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.cookie-link:hover { color: var(--primary-hover); }

/* ---------- Cookie policy modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 1rem;
  background: rgba(4, 12, 24, .58);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease-out), visibility .3s;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  width: min(100%, 640px); max-height: min(86vh, 760px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98); transition: transform .35s var(--ease-spring);
}
.modal-overlay.open .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem clamp(1.2rem, 4vw, 1.8rem); border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 1.4rem; }
.modal-close {
  flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s;
}
.modal-close:hover { background: var(--surface-2); border-color: var(--primary); transform: rotate(90deg); }
.modal-body { padding: clamp(1.2rem, 4vw, 1.8rem); overflow-y: auto; }
.modal-body h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { color: var(--text-muted); font-size: .95rem; margin-bottom: .8rem; }
.modal-body a { font-weight: 600; }
.policy-updated { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.4rem; }

.cookie-table { width: 100%; border-collapse: collapse; margin: .4rem 0 .8rem; font-size: .88rem; }
.cookie-table caption { text-align: left; color: var(--text-muted); font-size: .82rem; margin-bottom: .5rem; }
.cookie-table th, .cookie-table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cookie-table th { font-family: var(--font-head); color: var(--heading); font-weight: 700; font-size: .82rem; }
.cookie-table td { color: var(--text-muted); }
.cookie-table td code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85em; color: var(--text); background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; }
.cookie-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Footer legal link */
.footer-legal-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: inherit; color: var(--text-muted);
  transition: color .2s;
}
.footer-legal-link:hover { color: var(--primary); }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; gap: .8rem; }
  .cookie-actions .btn { flex: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-ekg path { stroke-dashoffset: 0; }
  .brand-ekg path { animation: none; transform: none; }
}
