/* ============ DESIGN TOKENS ============ */
:root {
  --bg: #0b1220;
  --bg-alt: #101a2c;
  --surface: #121c30;
  --border: #22304a;
  --text: #eef2f8;
  --text-secondary: #a9b4c6;
  --text-muted: #7c8bab;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-contrast: #071224;
  --navy: #0b1220;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --border: #e2e6ec;
  --text: #0b1220;
  --text-secondary: #4b5568;
  --text-muted: #7c8494;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.05);
}

/* ============ RESET ============ */
* {
  box-sizing: border-box;
  /* Removes the default grey flash Safari/Chrome draw on tap — buttons and
     links already have their own :active press-states below, so the
     built-in highlight just looked like a rendering glitch on mobile. */
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; color: var(--text-secondary); }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }
@media (min-width: 768px) {
  section { padding: 6rem 0; }
}

.section-kicker {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: 1.75rem; }
@media (min-width: 768px) { .section-head h2 { font-size: 2.25rem; } }

/* About page only: "Trusted across regulated, high-stakes environments." as
   one line. Scoped via adjacent-sibling combinator (only matches the section
   immediately after the About hero) so no other page's .section-head is affected. */
@media (min-width: 1024px) {
  .hero + section .section-head { max-width: 900px; }
  .hero + section .section-head h2 { white-space: nowrap; }
}

.bg-alt { background: var(--bg-alt); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-contrast);
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}
.btn.block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.35rem, 2vw, 0.75rem);
  margin-top: 1.75rem;
}
.btn-row .btn {
  padding: clamp(0.5rem, 1vw + 0.35rem, 0.85rem) clamp(0.5rem, 3vw, 1.5rem);
  font-size: clamp(0.68rem, 2.2vw, 0.95rem);
}

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
[data-theme="dark"] .brand-mark { background: var(--accent); color: var(--accent-contrast); }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.nav-links a.active { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-actions .btn { display: none; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
}
.nav-toggle {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.2rem;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-actions .btn { display: inline-flex; }
  .nav-toggle { display: none; }
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0 1.25rem;
  border-top: 1px solid var(--border);
}
.mobile-drawer.open { display: flex; }
/* :not(.btn) keeps this from overriding the "Book a Call" button's own
   padding/color — without it, this selector's higher specificity was
   forcing dark text onto the button's blue background in light mode. */
.mobile-drawer a:not(.btn) {
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.mobile-drawer .btn { margin-top: 0.5rem; }

/* ============ HERO ============ */
.hero { padding: 1.5rem 0 2rem; }
@media (min-width: 768px) { .hero { padding: 2.25rem 0 3rem; } }
.eyebrow {
  display: inline-block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  white-space: nowrap;
}
@media (min-width: 700px) { .eyebrow { font-size: 1.1rem; } }
.hero h1 {
  font-size: 2.1rem;
  max-width: 820px;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.1rem; } }

/* One-line hero headlines on every page except the home page, which has its
   own container-width-based scaling further down (.home-hero-copy h1). */
@media (min-width: 768px) {
  body:not([data-page="index.html"]) .hero h1 { font-size: 2.6rem; }
}
@media (min-width: 1024px) {
  body:not([data-page="index.html"]) .hero h1 {
    max-width: none;
    white-space: nowrap;
  }
}
.hero .lead {
  font-size: 1.05rem;
  max-width: 640px;
  color: var(--text-secondary);
}
@media (min-width: 768px) { .hero .lead { font-size: 1.15rem; } }

/* Home hero: one-line headline + eyebrow that scale down instead of wrapping */
.home-hero-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1010px) {
  .home-hero-grid { flex-direction: row; justify-content: space-between; align-items: center; }
  .home-hero-grid > .home-hero-copy { flex: 1; min-width: 0; }
}
.home-hero-copy {
  container-type: inline-size;
  width: 100%;
}
.home-hero-copy .eyebrow {
  font-size: clamp(0.85rem, 4.6cqw, 1.25rem);
}
/* Font scales with the actual column width at every size, so it never
   balloons into an awkward 3-4 line wrap on narrow screens. Below 700px
   there isn't room to keep it on one line at a readable size, so it's
   allowed to wrap (max 2 lines); from 700px up the column is wide enough
   to hold it on one line. */
.home-hero-copy h1 {
  font-size: clamp(1.25rem, 3.3cqw, 2.6rem);
  max-width: none;
}
@media (min-width: 700px) {
  .home-hero-copy h1 { white-space: nowrap; }
}
.home-hero-copy .btn-row { justify-content: center; }
@media (min-width: 1010px) {
  .home-hero-copy .btn-row { justify-content: flex-start; }
}

.hero-portrait-wrap {
  position: relative;
  width: 220px;
  height: 260px;
  flex-shrink: 0;
}
@media (min-width: 1010px) { .hero-portrait-wrap { width: 300px; height: 360px; } }
.hero-portrait-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}
.hero-portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
  filter: contrast(1.12) saturate(1.08);
  -webkit-mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
  box-shadow: 0 20px 45px rgba(11, 18, 32, 0.18);
}

/* ============ TRUST STRIP ============ */
.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.6rem;
  column-gap: 2.25rem;
}
.trust-strip span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
}

/* ============ IMPACT LIST ============ */
.impact-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .impact-list { grid-template-columns: 1fr 1fr; } }
.impact-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.impact-item i { color: var(--accent); font-size: 1.2rem; margin-top: 0.15rem; flex-shrink: 0; }
.impact-item p { margin: 0; color: var(--text); font-size: 0.95rem; font-weight: 600; }

/* ============ CTA BAND ============ */
.cta-band {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 1.75rem;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9c2d4; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn.secondary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

/* ============ EXPERTISE / CAPABILITY SECTIONS ============ */
.capability {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
}
.capability + .capability { margin-top: 1.25rem; }
.capability-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.capability-head .card-icon { margin-bottom: 0; flex-shrink: 0; }
.capability-head h3 { margin: 0; font-size: 1.2rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.capability-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .capability-grid { grid-template-columns: repeat(3, 1fr); } }
.capability-col .label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: block;
}
.capability-col p { font-size: 0.9rem; margin-bottom: 0; }

/* ============ SERVICES ============ */
.service-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--surface);
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.service-block h3 { font-size: 1.25rem; }
.service-block .items { margin: 1.25rem 0; flex-grow: 1; }
.service-block a.btn.block {
  white-space: normal;
  text-align: center;
}
.service-block .items li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  font-size: 0.93rem;
  border-top: 1px solid var(--border);
}
.service-block .items li:first-child { border-top: none; }
.service-block .items li i { color: var(--accent); margin-top: 0.2rem; }

.process-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
@media (min-width: 700px) { .process-row { grid-template-columns: repeat(4, 1fr); } }
.process-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
}
.process-step .step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
.process-step h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.process-step p { font-size: 0.88rem; margin: 0; }

/* ============ ORGANOGRAM ============ */
.organogram { margin-top: 1.5rem; }
.org-root {
  max-width: 320px;
  margin: 0 auto 1.5rem;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  position: relative;
}
.org-root::after {
  content: "";
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  width: 1px;
  height: 1.5rem;
  background: var(--border);
}
.org-branches {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
@media (min-width: 700px) { .org-branches { grid-template-columns: repeat(3, 1fr); } }
.org-branch {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--surface);
}
.org-branch > .branch-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--accent);
}
.org-branch ul { display: flex; flex-direction: column; gap: 0.5rem; }
.org-branch li {
  font-size: 0.88rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
}

/* ============ ABOUT ============ */
.about-hero-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: 1.75rem;
  align-items: flex-start;
}
@media (min-width: 800px) {
  .about-hero-grid { flex-direction: row; align-items: center; justify-content: space-between; }
  .about-hero-grid > div { flex: 1; }
}
.portrait {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
@media (min-width: 800px) { .portrait { width: 200px; height: 200px; } }
.bio-block { max-width: 760px; }
.sector-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .sector-grid { grid-template-columns: repeat(5, 1fr); } }
.sector-grid span {
  display: block;
  text-align: center;
  padding: 0.9rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
}
.cert-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .cert-list { grid-template-columns: 1fr 1fr; } }
.cert-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
}
.cert-list i { color: var(--accent); margin-top: 0.2rem; }

/* Continuously auto-scrolling case-study track. Cards are sized to match
   what a 3-column grid card measured at each breakpoint (300px / 340px),
   so they don't render any larger than the previous static grid version. */
.case-scroll {
  overflow: hidden;
  margin-top: 1.5rem;
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}
.case-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  animation: case-scroll 48s linear infinite;
}
.case-scroll:focus-within .case-track {
  animation-play-state: paused;
}
@keyframes case-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .case-track { animation: none; }
}

.case-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
  flex: 0 0 300px;
  width: 300px;
}
@media (min-width: 700px) {
  .case-card { flex-basis: 340px; width: 340px; }
}
.case-card .case-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  display: block;
}
.case-card h3 { font-size: 1.05rem; }
.case-card p { font-size: 0.9rem; margin: 0; }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }

.contact-methods { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact-method i { font-size: 1.3rem; color: var(--accent); flex-shrink: 0; }
.contact-method strong { display: block; font-size: 0.95rem; }
.contact-method span { font-size: 0.82rem; color: var(--text-muted); }

.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
}
.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  /* 16px minimum: below this, iOS Safari auto-zooms the whole page on
     focus, which felt like a broken/glitchy form on iPhone. */
  font-size: 16px;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-error {
  color: #dc2626;
  font-size: 0.78rem;
  margin-top: 0.35rem;
  display: none;
}
.form-row.invalid input,
.form-row.invalid select,
.form-row.invalid textarea { border-color: #dc2626; }
.form-row.invalid .form-error { display: block; }
.radio-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.radio-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg);
}
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill.checked { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.form-success {
  display: none;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #16a34a 12%, transparent);
  color: #15803d;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 1rem;
}
[data-theme="dark"] .form-success { color: #4ade80; }

.availability-note {
  margin-top: 2rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 6rem;
}
@media (min-width: 900px) { .site-footer { padding: 2.5rem 0; } }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.footer-brand p { font-size: 0.85rem; margin-top: 0.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer-nav a { font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); }
.footer-contact { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.88rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ MOBILE CONTACT BAR ============ */
.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bar a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.3rem, 1.8vw, 0.45rem);
  padding: clamp(0.35rem, 1.2vw + 0.15rem, 0.5rem) 0;
  font-size: clamp(0.68rem, 2.2vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  position: relative;
  transition: background 0.15s ease, transform 0.1s ease;
}
.mobile-bar a:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 26%;
  bottom: 26%;
  width: 1px;
  background: var(--border);
}
.mobile-bar a:active { transform: scale(0.96); }
.mobile-bar a i { font-size: clamp(0.95rem, 3vw, 1.1rem); color: var(--accent); }
.mobile-bar a.primary {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: var(--accent-contrast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.mobile-bar a.primary::after { display: none; }
.mobile-bar a.primary i { color: var(--accent-contrast); }

@media (min-width: 900px) {
  .mobile-bar { display: none; }
}

/* ============ UTIL ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ HOVER (mouse/trackpad only) ============
   Every :hover effect on the site lives here, gated behind a real-hover
   check. Without this, tapping a button/card/link on a touch screen can
   leave it visually "stuck" in its hover colour until the user taps
   elsewhere — it reads as a rendering glitch on iPhone and Android. :active
   states (already defined elsewhere) still respond to touch normally. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
  .btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
  .nav-links a:hover { color: var(--accent); }
  .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
  .mobile-drawer a:not(.btn):hover { color: var(--accent); }
  .mobile-drawer .btn:hover { background: var(--accent-hover); }
  .card:hover { border-color: var(--accent); }
  .cta-band .btn.secondary:hover {
    background: var(--accent-hover);
    color: var(--accent-contrast);
    border-color: var(--accent-hover);
  }
  .case-scroll:hover .case-track { animation-play-state: paused; }
  .footer-nav a:hover { color: var(--accent); }
  .footer-contact a:hover { color: var(--accent); }
}
