/* ============================================================
   Roanlight Dental, implant and periodontal specialists, shared design system
   Used by index.html, services.html, about.html, contact.html

   One hue: navy #0D3B66, plus neutrals. No second saturated
   accent anywhere. Page background is cool light grey so the
   site reads as the clinical, precise one of the set.
   ============================================================ */

:root {
  /* The single hue and its shades */
  --navy: #0d3b66;
  --navy-deep: #072744;
  --navy-mid: #14528c;
  --navy-soft: #9dbbda;
  --navy-tint: #e3eaf2;
  --navy-wash: #eef2f7;

  /* Neutrals */
  --bg: #f2f4f7;
  --surface: #ffffff;
  --ink: #101922;
  --slate: #55616e;
  --slate-light: #7a8794;
  --line: #dde2e9;
  --line-strong: #c8d1dc;
  --white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(7, 39, 68, 0.06);
  --shadow-md: 0 10px 28px rgba(7, 39, 68, 0.10);
  --shadow-lg: 0 24px 56px rgba(7, 39, 68, 0.14);

  --radius: 4px;
  --radius-lg: 6px;

  --font-display: 'Plus Jakarta Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy-deep);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--navy);
  display: inline-block;
}

.eyebrow.on-dark { color: var(--navy-soft); }
.eyebrow.on-dark::before { background: var(--navy-soft); }

/* ---------- Motion: reveal on enter ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.7, 0.28, 1),
              transform 0.7s cubic-bezier(0.22, 0.7, 0.28, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Signature move: a rule that is drawn as the stats band arrives */
.rule-draw {
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 0.7, 0.28, 1);
}
.is-visible .rule-draw,
.rule-draw.is-visible { transform: scaleX(1); }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 244, 247, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(242, 244, 247, 0.96);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
  color: var(--navy-deep);
  line-height: 1.2;
  max-width: 300px;
}

.brand .logo-mark { width: 32px; height: 32px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--slate);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: var(--navy);
  transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--navy-deep);
  border-color: var(--line-strong);
}
.btn-outline:hover {
  background: var(--navy-deep);
  color: var(--white);
  border-color: var(--navy-deep);
  transform: translateY(-2px);
}
.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.42);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}
.btn-white { background: var(--white); color: var(--navy-deep); }
.btn-white:hover { background: var(--navy-tint); transform: translateY(-2px); }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-deep);
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; color: var(--navy-deep); }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
  padding: 0;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.hero-copy {
  padding: 104px 64px 104px max(32px, calc((100vw - 1180px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-soft);
  margin-bottom: 26px;
}
.hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--navy-soft);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 4.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--navy-soft);
}

.hero p.lead {
  font-size: 1.06rem;
  color: rgba(255,255,255,0.76);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }

.hero-trust {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: 26px;
  max-width: 480px;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.74);
}
.hero-trust-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--navy-soft); }

/* Hero photograph, moved by the parallax loop in script.js */
.hero-photo {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}
.hero-photo img {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--navy-deep) 0%, rgba(7,39,68,0.42) 34%, rgba(7,39,68,0.10) 100%);
  pointer-events: none;
}
.hero-photo .photo-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(7,39,68,0.55);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
}

/* ---------- Interior page hero ---------- */
.page-hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
  padding: 0;
}
.page-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto;
}
.page-hero-copy {
  padding: 84px 64px 88px max(32px, calc((100vw - 1180px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.page-hero h1 em { font-style: normal; color: var(--navy-soft); }
.page-hero p.lead {
  font-size: 1.02rem;
  color: rgba(255,255,255,0.76);
  max-width: 540px;
}
.page-hero .hero-photo { min-height: 380px; }

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
}
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Section shell ---------- */
section { padding: 104px 0; }
.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: 1.18;
  margin-bottom: 16px;
}
.section-head p {
  color: var(--slate);
  font-size: 1rem;
}
.section-head.left { text-align: left; margin: 0 0 48px; max-width: 620px; }
.section-head.left .eyebrow::before { display: inline-block; }

/* ---------- Services ---------- */
.services { background: var(--surface); }
.services.on-grey { background: var(--bg); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--surface);
  padding: 40px 34px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.service-card:hover { background: var(--navy-wash); }
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.service-icon svg { width: 24px; height: 24px; color: var(--white); }
.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--slate);
  font-size: 0.94rem;
}
.service-card .learn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
}
.service-card .learn svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.service-card:hover .learn svg { transform: translateX(4px); }

.service-card .service-list { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.service-card .service-list li { list-style: none; display: flex; gap: 9px; align-items: flex-start; font-size: 0.87rem; color: var(--slate); }
.service-card .service-list li svg { width: 13px; height: 13px; color: var(--navy); flex-shrink: 0; margin-top: 5px; }

.service-note {
  margin-top: 36px;
  padding: 22px 26px;
  background: var(--navy-wash);
  border-left: 2px solid var(--navy);
  color: var(--slate);
  font-size: 0.9rem;
}

/* ---------- Stats band, with count-up numbers ---------- */
.stats {
  background: var(--navy-deep);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.stats-copy h2 { color: var(--white); font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-bottom: 20px; }
.stats-copy p { color: rgba(255,255,255,0.76); margin-bottom: 30px; font-size: 1rem; }
.why-list { display: flex; flex-direction: column; gap: 16px; }
.why-item { display: flex; gap: 14px; align-items: flex-start; }
.why-item svg { width: 18px; height: 18px; color: var(--navy-soft); flex-shrink: 0; margin-top: 4px; }
.why-item span { color: rgba(255,255,255,0.86); font-size: 0.95rem; }

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
}
.stat-card {
  background: var(--navy-deep);
  padding: 34px 28px;
  transition: background 0.3s ease;
}
.stat-card:hover { background: #0a3357; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.stat-card .rule-draw { color: var(--navy-soft); margin-bottom: 12px; }
.stat-label { font-size: 0.84rem; color: rgba(255,255,255,0.66); }

/* ---------- Case planning walkthrough (replaces before/after) ---------- */
.pathway { background: var(--bg); }
.pathway-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.step-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--navy-tint);
}
.step-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.28, 1);
}
.step-card:hover .step-figure img { transform: scale(1.04); }
.step-index {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--navy-deep);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 7px 13px;
}
.step-body { padding: 24px 24px 28px; }
.step-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.step-body p { color: var(--slate); font-size: 0.9rem; }
.pathway-note {
  margin-top: 34px;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 2px solid var(--navy);
  color: var(--slate);
  font-size: 0.9rem;
}
.pathway-note strong { color: var(--navy-deep); font-family: var(--font-display); }

/* ---------- Split feature (photo beside copy) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.split-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-figure figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  background: rgba(7,39,68,0.82);
  color: rgba(255,255,255,0.86);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
}
.split-copy p { color: var(--slate); margin-bottom: 16px; font-size: 1rem; }
.split-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); margin-bottom: 18px; line-height: 1.18; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--surface); }
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.test-card {
  background: var(--bg);
  border-top: 2px solid var(--navy);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.test-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stars { display: flex; gap: 4px; }
.stars svg { width: 15px; height: 15px; color: var(--navy); }
.test-card p.quote { color: var(--ink); font-size: 0.96rem; flex-grow: 1; }
.test-person { display: flex; align-items: center; gap: 12px; }
.test-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.test-person .who strong { display: block; font-size: 0.9rem; color: var(--navy-deep); font-family: var(--font-display); }
.test-person .who span { font-size: 0.79rem; color: var(--slate); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-inner { position: relative; max-width: 620px; margin: 0 auto; }
.cta-band h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.cta-band p { color: rgba(255,255,255,0.84); font-size: 1rem; margin-bottom: 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
}
.value-card {
  background: var(--navy-deep);
  padding: 32px 26px;
  transition: background 0.3s ease;
}
.value-card:hover { background: #0a3357; }
.value-card .service-icon { background: rgba(255,255,255,0.10); margin-bottom: 20px; }
.value-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--white); }
.value-card p { color: rgba(255,255,255,0.7); font-size: 0.88rem; }

/* ---------- Team ---------- */
.team-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 40px;
}
.team-banner img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
}
.team-banner figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  background: rgba(7,39,68,0.82);
  color: rgba(255,255,255,0.86);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.team-card {
  background: var(--surface);
  padding: 34px 30px;
  transition: background 0.3s ease;
}
.team-card:hover { background: var(--navy-wash); }
.team-monogram {
  width: 54px;
  height: 54px;
  border: 1px solid var(--navy);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.team-card h3 { font-size: 1.05rem; margin-bottom: 5px; }
.team-role {
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.team-card p.bio { color: var(--slate); font-size: 0.9rem; }
.team-creds { margin-top: 14px; font-size: 0.8rem; color: var(--slate-light); }

/* ---------- Tech highlights ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.tech-card {
  display: flex;
  gap: 20px;
  background: var(--surface);
  padding: 30px 28px;
}
.tech-card .service-icon { flex-shrink: 0; margin-bottom: 0; }
.tech-card h3 { font-size: 1rem; margin-bottom: 8px; }
.tech-card p { color: var(--slate); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-info { display: flex; flex-direction: column; gap: 26px; }
.info-row { display: flex; gap: 16px; align-items: flex-start; }
.info-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-icon svg { width: 20px; height: 20px; color: var(--navy); }
.info-row h4 { font-size: 0.98rem; margin-bottom: 4px; }
.info-row p { color: var(--slate); font-size: 0.92rem; }

.hours-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.hours-table td { padding: 7px 0; font-size: 0.9rem; color: var(--slate); border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; color: var(--navy-deep); font-family: var(--font-display); font-weight: 700; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px;
}
.form-card h3 { margin-bottom: 6px; font-size: 1.15rem; }
.form-card > p { color: var(--slate); font-size: 0.9rem; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 90px; }
.form-note { font-size: 0.79rem; color: var(--slate); margin-top: 14px; text-align: center; }
.form-success { color: var(--navy); font-family: var(--font-display); font-weight: 700; }

/* ---------- Directions block ---------- */
.directions-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.directions-figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.directions-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.directions-figure figcaption {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(7,39,68,0.82);
  color: rgba(255,255,255,0.86);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
}
.directions-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.directions-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.94rem; color: var(--slate); }
.directions-list li svg { width: 18px; height: 18px; color: var(--navy); flex-shrink: 0; margin-top: 4px; }
.directions-note { margin-top: 26px; font-size: 0.85rem; color: var(--slate-light); }

/* ---------- Footer ---------- */
footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.66);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  font-size: 1rem; margin-bottom: 16px;
}
.footer-brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.footer-col h5 {
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col li { font-size: 0.89rem; }
.footer-col a { font-size: 0.89rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.79rem;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.footer-social a:hover { background: rgba(255,255,255,0.18); }
.footer-social svg { width: 16px; height: 16px; color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 80px 32px 72px; }
  .page-hero-copy { padding: 64px 32px 64px; }
  .hero-photo { min-height: 340px; order: -1; }
  .page-hero .hero-photo { min-height: 260px; }
  .pathway-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; gap: 48px; }
  .test-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; gap: 36px; }
  .directions-grid { grid-template-columns: 1fr; gap: 32px; }
  .team-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 32px 18px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; }
  .nav-toggle { display: flex; }
  .nav-phone { display: none; }
}

@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
  .pathway-steps { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .wrap { padding: 0 20px; }
  .hero-copy { padding: 64px 20px 60px; }
  .page-hero-copy { padding: 52px 20px 56px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { padding: 16px 20px; }
  .nav-links { padding: 8px 20px 18px; }
  .brand { font-size: 0.92rem; max-width: 210px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rule-draw {
    transform: scaleX(1);
    transition: none;
  }
  .hero-photo img { transform: none !important; }
  .step-figure img,
  .btn,
  .service-card,
  .test-card,
  .stat-card,
  .team-card,
  .value-card,
  header {
    transition: none;
  }
}
