/* MEDAC Services — shared stylesheet
   Colours / spacing lifted directly from the Claude Design source
   (project/*.dc.html) to keep the production build pixel-matched. */

:root {
  --navy: #000080;
  --navy-hover: #1a1a99;
  --navy-deep: #00004d;
  --gold: #b8863b;
  --gold-light: #c9a86a;
  /* Darker than --gold specifically for small text on light backgrounds
     (eyebrows, field labels, numerals) — #b8863b only clears ~3.2:1 there,
     short of WCAG AA's 4.5:1 for normal-weight text under 18.66px/700.
     --gold itself is kept unchanged for decorative/non-text uses (rules,
     hover underlines) where the 3:1 non-text threshold already passes and
     the brighter brass reads better. */
  --gold-text: #916a2f;
  --ink: #14142b;
  --muted: #5b5d72;
  --bg: #f7f8fb;
  --border: #e4e5ee;
  --footer-muted: #9fa1c2;
  /* Lightened from #6d6f96 (3.94:1 on --navy-deep) to clear 4.5:1. */
  --footer-copy: #7779a4;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-text); }

img { max-width: 100%; }

button { font-family: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: var(--navy);
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 4px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* ── Nav ─────────────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px clamp(20px, 5vw, 64px);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--gold); }
.nav-link[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.btn-quote {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: var(--navy);
  padding: 12px 24px;
  border-radius: 2px;
  white-space: nowrap;
  display: inline-block;
  transition: transform .2s ease, background .2s ease;
}
.btn-quote:hover { color: #ffffff; transform: translateY(-2px); background: var(--navy-hover); }

/* ── Glow / ripple navy surfaces (hero + CTA) ───────────────────── */

@keyframes zapPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.35; }
}
@keyframes driftOne {
  0%, 100% { transform: translate(-8%, -6%) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.15); }
}
@keyframes driftTwo {
  0%, 100% { transform: translate(10%, 10%) scale(1.1); }
  50% { transform: translate(-8%, -4%) scale(0.95); }
}

.glow-surface {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--navy-deep);
}

.surface-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.surface-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-light);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.surface-ripple.pulsing { animation: zapPulse 1.1s ease-in-out infinite; }

.surface-svg {
  position: absolute;
  pointer-events: none;
  transition: opacity .3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .surface-ripple.pulsing { animation: none; opacity: .6 !important; }
  html { scroll-behavior: auto; }
}

/* ── Hero (home) ─────────────────────────────────────────────────── */

.hero-home {
  background: var(--navy-deep);
  margin: 24px clamp(16px, 4vw, 40px) 0;
  padding: clamp(64px, 10vw, 140px) clamp(20px, 5vw, 64px) clamp(80px, 8vw, 120px);
}
.hero-home .surface-svg { top: 0; right: 0; height: 100%; width: 55%; opacity: 0.85; }

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
  position: relative;
}

.hero-home h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 24px;
  max-width: 760px;
  position: relative;
}

.hero-home p.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: #c7c9de;
  max-width: 600px;
  margin: 0 0 40px;
  position: relative;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; position: relative; }

.btn-white {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-deep);
  background: #ffffff;
  padding: 16px 32px;
  border-radius: 2px;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-white:hover { color: var(--navy-deep); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }

.btn-outline {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
  padding: 16px 32px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.35);
  display: inline-block;
  transition: border-color .2s ease, transform .2s ease;
}
.btn-outline:hover { color: #ffffff; border-color: var(--gold); transform: translateY(-2px); }

/* Optional hero motion blobs (off by default; see main.js DATA_HERO_MOTION) */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
}
.hero-blob--one {
  width: 420px; height: 420px; left: -8%; top: -10%;
  background: radial-gradient(circle, rgba(201,168,106,0.28), transparent 70%);
  animation: driftOne 14s ease-in-out infinite;
}
.hero-blob--two {
  width: 360px; height: 360px; right: 5%; bottom: -12%;
  background: radial-gradient(circle, rgba(80,80,220,0.35), transparent 70%);
  animation: driftTwo 16s ease-in-out infinite;
}

/* ── Hero (interior pages) ──────────────────────────────────────── */

.hero-page {
  margin: 24px clamp(16px, 4vw, 40px) 0;
  padding: clamp(56px, 8vw, 100px) clamp(20px, 5vw, 64px);
}
.hero-page .surface-svg { inset: 0; width: 100%; height: 100%; opacity: 0.9; }

.hero-page .hero-eyebrow { margin-bottom: 20px; }

.hero-page h1 {
  position: relative;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 20px;
  max-width: 700px;
}

.hero-page p.lede {
  position: relative;
  font-size: 17px;
  line-height: 1.6;
  color: #c7c9de;
  max-width: 620px;
  margin: 0;
}

/* ── Generic section rhythm ──────────────────────────────────────── */

.section {
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
}
.section-band {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
}
.section-band > .inner { max-width: 1280px; margin: 0 auto; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin: 0; max-width: 520px; }
.section-head .see-all { font-size: 15px; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ── Services grid (sharp) ──────────────────────────────────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: #ffffff;
  padding: 40px 32px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,128,0.12); }
.service-card .num { font-size: 14px; font-weight: 800; color: var(--gold-text); margin-bottom: 24px; }
.service-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.service-card p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ── Why-us / principles grid ────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}
.feature-grid.cols-3-wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 56px; }
.feature { }
.feature .rule { width: 32px; height: 2px; background: var(--gold); margin-bottom: 20px; }
.feature h3 { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.feature p { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; }

/* ── CTA banner ──────────────────────────────────────────────────── */

.cta-banner {
  background: var(--navy);
  margin: 0 clamp(16px, 4vw, 40px) 56px;
  padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 64px);
  text-align: center;
}
.cta-banner .surface-svg { inset: 0; width: 100%; height: 100%; opacity: 0.85; }
.cta-banner h2 {
  position: relative;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 28px;
}
.cta-banner .btn-white { position: relative; padding: 16px 36px; }

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy-deep);
  padding: 56px clamp(20px, 5vw, 64px) 32px;
}
.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-about { max-width: 320px; }
.footer-about img { height: 32px; width: auto; margin-bottom: 16px; }
.footer-about p { font-size: 14px; line-height: 1.6; color: var(--footer-muted); margin: 0; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 16px;
}
.footer-col nav, .footer-col .stack { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col .plain { font-size: 14px; color: var(--footer-muted); }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { max-width: 1280px; margin: 24px auto 0; font-size: 13px; color: var(--footer-copy); }

/* ── Image placeholders (stand-in for real photography) ─────────── */

.img-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
  background: rgba(20,20,43,0.04);
  border: 1px dashed rgba(20,20,43,0.22);
  border-radius: 4px;
  color: var(--muted);
}
.img-placeholder svg { opacity: .5; }
.img-placeholder span { font-size: 13px; font-weight: 500; max-width: 90%; }
.img-placeholder.round { border-radius: 50%; }

/* ── About page ──────────────────────────────────────────────────── */

.split {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  align-items: center;
}
.split .copy { flex: 1 1 420px; min-width: 280px; }
.split .copy h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; margin: 0 0 20px; }
.split .copy p { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 20px; }
.split .copy p:last-child { margin-bottom: 0; }
.split .media { flex: 1 1 380px; min-width: 280px; aspect-ratio: 4/3; }

/* ── Services detail rows ───────────────────────────────────────── */

.svc-rows { max-width: 1280px; margin: 0 auto; padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px); }
.svc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.svc-rows .svc-row:last-child { border-bottom: none; }
.svc-row.reverse { flex-wrap: wrap-reverse; }
.svc-row .copy { flex: 1 1 420px; min-width: 280px; }
.svc-row .copy .num { font-size: 14px; font-weight: 800; color: var(--gold-text); margin-bottom: 16px; }
.svc-row .copy h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; margin: 0 0 16px; }
.svc-row .copy p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 20px; }
.svc-row .copy ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink); }
.svc-row .copy ul li { display: flex; gap: 10px; }
.svc-row .copy ul li::before { content: '—'; color: var(--gold-text); }
.svc-row .media { flex: 1 1 380px; min-width: 280px; aspect-ratio: 4/3; }

/* ── Team grid ───────────────────────────────────────────────────── */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
}
.team-card .media { aspect-ratio: 1/1; margin-bottom: 20px; }
.team-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.team-card .role { font-size: 14px; font-weight: 600; color: var(--gold-text); }

/* ── Contact page ────────────────────────────────────────────────── */

.contact-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.contact-info { flex: 1 1 300px; min-width: 260px; }
.contact-info h2 { font-size: 22px; font-weight: 700; margin: 0 0 24px; }
.contact-info .stack { display: flex; flex-direction: column; gap: 24px; }
.contact-info .label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: 8px;
}
.contact-info a.value, .contact-info .value { font-size: 16px; color: var(--ink); }
.contact-info a.value { font-weight: 600; }

.contact-form-panel {
  flex: 2 1 480px;
  min-width: 300px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 48px);
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }
/* [hidden] alone loses this cascade tie to the class rule above (author
   rules beat the UA stylesheet at equal specificity) — js/main.js sets
   form.hidden after a successful submit and needs this to actually take
   effect, or the form stays visually in place next to the success message. */
.contact-form[hidden] { display: none; }
.form-row { display: flex; gap: 20px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 8px; }
/* flex-basis:200px is a min-width for fields sitting side-by-side in a row
   (the main axis there is horizontal). Scoped to .form-row on purpose: a
   bare .field is also used standalone as a direct (column-flex) child of
   .contact-form, where flex-basis sets the MAIN-axis size — i.e. height —
   and unscoped would force a 200px-tall box under a one-line <select>. */
.form-row .field { flex: 1 1 200px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid #d7d8e6;
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9799ad; }
.field input:invalid:not(:placeholder-shown) { border-color: #c0392b; }

.btn-submit {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--navy);
  padding: 14px 32px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn-submit:hover { background: var(--navy-hover); transform: translateY(-2px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.form-status {
  padding: 40px 0;
  text-align: center;
}
.form-status h3 { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.form-status p { font-size: 15px; color: var(--muted); margin: 0; }
.form-status[hidden] { display: none; }

.form-error {
  font-size: 13px;
  color: #c0392b;
  margin: -8px 0 0;
}
.form-error[hidden] { display: none; }

/* Netlify Forms honeypot: kept in the accessibility tree's tab order as
   `hidden` (via the attribute, not display:none) so it still functions as
   a bot trap, but visually offscreen so sighted users never see it. */
.hp-field {
  position: absolute;
  left: -9999px;
}
