/* ============================================================
   PepDex Bio — global stylesheet
   Palette: clean white, deep slate-navy, precise teal accent.
   Mobile-first. All breakpoints scale UP from small screens.
   ============================================================ */

:root {
  /* Color tokens */
  --navy-950: #0a1526;
  --navy-900: #0e1d33;
  --navy-800: #142845;
  --navy-700: #1c3a63;
  --ink: #182640;          /* headings on light */
  --body: #46586f;         /* body text on light */
  --faint: #6b7d92;        /* captions, meta */
  --line: #dee6ee;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --teal: #0d7a84;
  --teal-dark: #0a5e66;
  --teal-soft: #e4f1f2;
  --on-dark: #c9d6e6;      /* body text on navy */
  --danger: #a3232e;
  --success-bg: #e8f6ee;
  --success-ink: #14582e;

  /* Type + layout tokens */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --max: 1120px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(14, 29, 51, 0.08);
}

/* ---------- Reset / base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--teal); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

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

/* Small uppercase label above headings */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9em;
}

.lead {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--body);
  max-width: 46em;
}

.section-lead { max-width: 44em; }

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand logo (assets/images/logo-light.svg in header, logo-dark.svg in footer) */
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.brand img { height: 32px; width: auto; display: block; }
.footer-logo { height: 28px; width: auto; }
.brand:hover { text-decoration: none; }
.brand .mark { align-self: center; }
.brand .word {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}
.brand .word em { font-style: normal; color: var(--teal); }
.brand .descriptor {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--faint);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle span { top: 21px; }
.menu-toggle span::before { left: 0; top: -6px; }
.menu-toggle span::after { left: 0; top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--body);
}
.main-nav a:hover { color: var(--navy-900); text-decoration: none; background: var(--bg-soft); }
.main-nav a.active { color: var(--navy-900); }
.main-nav a.nav-cta {
  margin-left: 8px;
  background: var(--teal);
  color: #fff;
}
.main-nav a.nav-cta:hover { background: var(--teal-dark); color: #fff; }

@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 12px; }
  .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button:hover { text-decoration: none; }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: var(--teal-dark); }
.button.outline { border-color: var(--navy-800); color: var(--navy-900); background: transparent; }
.button.outline:hover { background: var(--navy-900); color: #fff; }
.button.light { border-color: rgba(255,255,255,0.55); color: #fff; background: transparent; }
.button.light:hover { background: rgba(255,255,255,0.12); }

.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.muted { background: var(--bg-soft); }
.section.dark { background: var(--navy-900); }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p, .section.dark li { color: var(--on-dark); }

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 48px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: clamp(30px, 5vw, 52px);
}
.section-head h2 { margin-bottom: 0; }
.section-head .section-lead { margin: 0; max-width: 34em; }

.split {
  display: grid;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(13, 122, 132, 0.28), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #fff;
  padding: clamp(64px, 10vw, 130px) 0;
}
.hero .eyebrow { color: #6fc6cd; }
.hero h1 { color: #fff; max-width: 15em; }
.hero .lead { color: var(--on-dark); }
.hero.compact { padding: clamp(48px, 7vw, 84px) 0; }

/* ---------- Trust strip (home) ---------- */

.trust-strip {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.trust-strip .section-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
}
.trust-item {
  padding: 22px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.trust-item svg { flex: none; margin-top: 3px; color: var(--teal); }
.trust-item strong { display: block; color: var(--ink); font-size: 0.95rem; }
.trust-item span { font-size: 0.85rem; color: var(--faint); }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
}
.section.dark .card {
  background: var(--navy-800);
  border-color: var(--navy-700);
}
.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.card ul { margin: 0; padding-left: 1.2em; }
.card li { margin-bottom: 0.35em; }

/* ---------- Steps (How It Works) ---------- */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.1;
}
.step h3 { margin-bottom: 0.3em; }
.step p:last-child { margin-bottom: 0; }

/* ---------- Figures / image placeholders ---------- */

figure { margin: 0; }
figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
/* Photos beside text columns: crop to a consistent 4:3 frame instead of
   rendering at full natural height, so pages keep an even rhythm. */
.split figure img {
  aspect-ratio: 4 / 3;
  max-height: 440px;
  object-fit: cover;
}
figcaption { font-size: 0.83rem; color: var(--faint); margin-top: 10px; }

/* ---------- Stat band ---------- */

.metrics {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.metric {
  border-left: 3px solid var(--teal);
  padding: 6px 0 6px 18px;
}
.metric strong { display: block; font-size: 1.7rem; color: #fff; letter-spacing: -0.02em; }
.metric span { font-size: 0.88rem; }

/* ---------- Callout note (e.g. clinics/medspas routing) ---------- */

.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 34px;
}
.note h3 { margin-bottom: 0.35em; }
.note p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(140deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-dark); max-width: 40em; margin-left: auto; margin-right: auto; }
.cta-band .action-row { justify-content: center; }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 2fr 3fr; }
}

.contact-panel {
  background: var(--navy-900);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.contact-panel h2 { color: #fff; }
.contact-panel a { color: #7fd0d6; }
.contact-panel .contact-address {
  margin-top: 28px;
  display: grid;
  gap: 2px;
  font-size: 0.95rem;
}
.contact-panel .contact-address strong { color: #fff; margin-bottom: 4px; }

/* ---------- Forms ---------- */

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .hint {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--faint);
  margin-top: 3px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 122, 132, 0.15);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }

.field .error {
  display: none;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 6px;
}
.field .error.visible { display: block; }

.checkbox-field {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}
.checkbox-field input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); }
.checkbox-field label { font-size: 0.9rem; color: var(--body); }

/* Success panel shown after submission */
.form-success { text-align: center; padding: clamp(44px, 7vw, 72px) 32px; }
.form-success svg { margin: 0 auto 20px; }
.form-success h2 { margin-bottom: 0.4em; }
.form-success p { max-width: 32em; margin-left: auto; margin-right: auto; }
.form-success .success-meta { font-size: 0.9rem; color: var(--faint); margin-bottom: 0; }

.form-status {
  display: none;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.form-status.success { display: block; background: var(--success-bg); color: var(--success-ink); }
.form-status.error { display: block; background: #fdeced; color: var(--danger); }

/* ---------- Location map ---------- */

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-card iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ---------- Facility gallery ---------- */

.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.gallery-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Legal pages ---------- */

.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal-updated { font-size: 0.85rem; color: var(--faint); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: var(--on-dark);
  padding: 56px 0 0;
  margin-top: clamp(40px, 7vw, 80px);
  font-size: 0.92rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer h3 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.site-footer a { display: block; color: var(--on-dark); padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand .word { font-size: 1.3rem; font-weight: 800; color: #fff; }
.footer-brand .word em { font-style: normal; color: #6fc6cd; }
.footer-brand .descriptor { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--faint); font-weight: 700; }
.footer-address { display: block; margin-top: 8px; line-height: 1.5; }

/* Compliance strip — appears on EVERY page. Do not remove. */
.footer-compliance {
  border-top: 1px solid var(--navy-700);
  background: var(--navy-900);
  padding: 22px 0;
  font-size: 0.82rem;
  color: #92a5bc;
}
.footer-compliance .section-inner p { margin: 0 0 6px; max-width: none; }
.footer-compliance .section-inner p:last-child { margin-bottom: 0; }

.footer-bottom {
  background: var(--navy-950);
  border-top: 1px solid var(--navy-800);
  padding: 18px 0;
  font-size: 0.8rem;
  color: var(--faint);
}
.footer-bottom .section-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.footer-bottom a { display: inline; color: var(--faint); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Scroll reveal (subtle) ----------
   Elements with .reveal fade/rise in once when scrolled into view.
   JS adds .in-view; users with reduced-motion get no animation. */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utility ---------- */

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