/* MEDAC Services — shared stylesheet */

:root {
  --navy: #000080;
  --navy-deep: #00004d;
  --navy-hover: #1a1a99;
  --gold: #b8863b;           /* decorative use only (underlines, borders, hover fills) — fails AA for small text */
  --gold-text: #8a6220;      /* AA-safe variant (5.14:1 on --bg) for eyebrow labels / links on light backgrounds */
  --gold-on-navy: #c9a86a;   /* AA-safe on navy (8.39:1) */
  --bg: #f7f8fb;
  --white: #ffffff;
  --text: #14142b;
  --text-muted: #5b5d72;
  --border: #e4e5ee;
  --hero-copy: #c7c9de;
  --footer-link: #9fa1c2;
  --footer-copy: #8688ad;    /* AA-safe variant (5.54:1 on navy) replacing the original #6d6f96 (3.94:1, fails AA) */
  --max-width: 1280px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  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); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* NAV */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-nav .logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.nav-cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--white) !important;
  background: var(--navy);
  padding: 12px 24px;
  border-radius: 2px;
  border-bottom: none !important;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}
.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--navy-hover);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 24px clamp(16px, 4vw, 40px) 0;
  background: var(--navy-deep);
  padding: clamp(56px, 8vw, 100px) clamp(20px, 5vw, 64px);
}
.hero--home { padding: clamp(64px, 10vw, 140px) clamp(20px, 5vw, 64px) clamp(80px, 8vw, 120px); }

.hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
  transition: opacity .3s ease;
}
.hero--home .hero-svg {
  top: 0; right: 0; left: auto; bottom: auto;
  height: 100%; width: 55%;
  opacity: 0.85;
}

.hero-eyebrow {
  position: relative;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-on-navy);
  margin-bottom: 20px;
}
.hero h1 {
  position: relative;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 20px;
  max-width: 700px;
}
.hero--home h1 { font-size: clamp(36px, 5.4vw, 60px); max-width: 760px; }
.hero p {
  position: relative;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--hero-copy);
  max-width: 620px;
  margin: 0;
}
.hero-actions {
  position: relative;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}
.btn-light { color: var(--navy-deep); background: var(--white); }
.btn-light:hover { color: var(--navy-deep); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.btn-outline { color: var(--white); background: transparent; border: 1px solid rgba(255,255,255,0.35); }
.btn-outline:hover { color: var(--white); border-color: var(--gold); transform: translateY(-2px); }
.btn-primary { color: var(--white); background: var(--navy); }
.btn-primary:hover { color: var(--white); background: var(--navy-hover); transform: translateY(-1px); }

/* SECTIONS */
section.section {
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-white {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.section-white > .container { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(64px, 8vw, 120px); }

.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 { max-width: 520px; }
.section-head .all-link { font-size: 15px; font-weight: 700; color: var(--gold-text); white-space: nowrap; }
.section-head .all-link:hover { color: var(--navy); }

h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin: 0; }
h3 { font-size: 20px; font-weight: 700; margin: 0 0 12px; }

/* SERVICE CARDS (home overview) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(20,20,43,0.06);
  border: 1px solid #ececf4;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,128,0.14);
}
.card-num { font-size: 14px; font-weight: 800; color: var(--gold-text); margin-bottom: 24px; }
.card p { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* WHY US */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 56px;
}
.why-item .rule { width: 32px; height: 2px; background: var(--gold); margin-bottom: 20px; }
.why-item p { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin: 0; }

/* CTA BANNER */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 0 clamp(16px, 4vw, 40px) 56px;
  background: var(--navy);
  padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 64px);
  text-align: center;
}
.cta-banner h2 {
  position: relative;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--white);
  margin: 0 0 28px;
}
.cta-banner .btn { position: relative; }

/* FOOTER */
.site-footer {
  background: var(--navy-deep);
  padding: 56px clamp(20px, 5vw, 64px) 32px;
}
.footer-top {
  max-width: var(--max-width);
  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-brand { max-width: 320px; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: var(--footer-link); margin: 0; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 16px;
}
.footer-col .links { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col span { font-size: 14px; color: var(--footer-link); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  font-size: 13px;
  color: var(--footer-copy);
}

/* IMAGE PLACEHOLDER (until real photography is supplied) */
.img-placeholder {
  aspect-ratio: 4/3;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, #eceef6, #eceef6 12px, #e4e6f0 12px, #e4e6f0 24px);
  border: 1px dashed #c7c9de;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c7ea3;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 16px;
}
.img-placeholder.square { aspect-ratio: 1/1; }

/* SERVICES DETAIL ROWS */
.service-rows { display: flex; flex-direction: column; }
.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.service-rows .service-row:last-child { border-bottom: none; }
.service-row.reverse { flex-wrap: wrap-reverse; }
.service-copy { flex: 1 1 420px; min-width: 280px; }
.service-media { flex: 1 1 380px; min-width: 280px; }
.service-copy p { font-size: 16px; line-height: 1.7; color: var(--text-muted); margin: 0 0 20px; }
.service-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.service-list li { display: flex; gap: 10px; }
.service-list li span { color: var(--gold-text); }

/* TEAM GRID */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
}
.team-member h3 { font-size: 18px; margin: 0 0 4px; }
.team-member .role { font-size: 14px; font-weight: 600; color: var(--gold-text); }
.team-member .photo-wrap { margin-bottom: 20px; }

/* CONTACT PAGE */
.contact-layout { display: flex; gap: 64px; flex-wrap: wrap; }
.contact-info { flex: 1 1 300px; min-width: 260px; }
.contact-info h2 { font-size: 22px; margin: 0 0 24px; }
.info-block + .info-block { margin-top: 24px; }
.info-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 8px;
}
.info-value { font-size: 16px; color: var(--text); }
.info-value.link { font-weight: 600; }

.contact-form-card {
  flex: 2 1 480px;
  min-width: 300px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 48px);
}
.form-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.form-field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; }
.form-field:last-child, .form-row:last-of-type { margin-bottom: 0; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid #d7d8e6;
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
}
.form-field textarea { resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}
::placeholder { color: #75778f; }
.required-marker { color: #a5271c; }

.form-status {
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 2px;
  margin-bottom: 20px;
  display: none;
}
.form-status.visible { display: block; }
.form-status.error { background: #fdeceb; color: #8a281f; border: 1px solid #f3c8c3; }

.form-success { padding: 40px 0; text-align: center; }
.form-success h3 { margin: 0 0 12px; }
.form-success p { font-size: 15px; color: var(--text-muted); margin: 0; }

/* RESPONSIVE */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 96px 32px 32px;
    gap: 24px;
    transition: right .25s ease;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  }
  .nav-links.open { right: 0; }
  .nav-cta { margin-top: 8px; }
  .nav-toggle { display: block; z-index: 60; }

  .nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,30,0.35);
    z-index: 55;
  }
  .nav-scrim.open { display: block; }
}

@media (max-width: 640px) {
  .footer-top { flex-direction: column; }
}
