/* =========================================================
   Sleep Medicine Consultants of Central Texas
   Clinical design system — calm, modern, trustworthy
   ========================================================= */

:root {
  /* Clinical palette */
  --navy:      #241c5c;   /* primary deep medical blue */
  --navy-700:  #3a2f86;
  --blue:      #5246e3;   /* primary action blue */
  --blue-50:   #f1eefb;   /* tint backgrounds */
  --blue-100:  #e4dcf8;
  --teal:      #7c6cf0;   /* violet accent, used sparingly */
  --teal-50:   #f0edfe;
  --coral:     #ff7a59;   /* warm pop */

  --ink:       #112536;   /* headings */
  --body:      #3d556b;   /* body text */
  --muted:     #6b8197;   /* secondary text */
  --line:      #e2eaf1;   /* hairlines */

  --bg:        #ffffff;
  --surface:   #f6f3fd;   /* section alt background */
  --white:     #ffffff;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16,46,72,.06), 0 1px 1px rgba(16,46,72,.04);
  --shadow:    0 10px 30px -12px rgba(13,75,120,.22);
  --shadow-lg: 0 30px 60px -22px rgba(10,58,92,.35);

  --maxw: 1180px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Spline Sans", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--navy); }

h1,h2,h3,h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.02em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.section--surface { background: var(--surface); }
.section--navy { background: var(--navy); color: #d8cff2; }
.section--navy h2, .section--navy h3 { color: #fff; }

.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.lead { font-size: 1.18rem; color: var(--body); max-width: 62ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 720px; margin: 0 auto 56px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(82,70,227,.6); }
.btn--primary:hover { background: var(--coral); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(255,122,89,.6); }
.btn--ghost { background: transparent; color: var(--navy); border-color: #cfc8ee; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { color: var(--blue); transform: translateY(-1px); }
.btn--lg { padding: 16px 32px; font-size: 1.04rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 90px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark { width: 46px; height: 46px; flex-shrink: 0; }
.brand__logo { height: 62px; width: auto; display: block; }
.footer .brand__logo { height: 42px; background: #fff; padding: 8px 13px; border-radius: 11px; }
/* Homepage: hide the nav logo at the very top (the hero logo carries the brand); fade it into the sticky nav once scrolled */
body.home .brand__logo { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
body.home .site-header.scrolled .brand__logo { opacity: 1; pointer-events: auto; }
/* Homepage: icon-free cards */
body.home .card__icon { display: none; }
/* Homepage research metrics: uniform, centered boxes */
body.home .metric { display: flex; flex-direction: column; justify-content: center; text-align: center; min-height: 120px; }
body.home .metric__num { font-size: 1.5rem; line-height: 1.2; }
.provider__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.split__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
@media (max-width: 720px){ .nav { height: 76px; } .nav.open .nav__links { top: 76px; } .brand__logo { height: 50px; } }
@media (max-width: 460px){ .brand__logo { height: 44px; } }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.32rem; letter-spacing: -.015em; }
.brand__sub { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--font-head); font-weight: 500; font-size: .96rem; color: var(--ink);
  padding: 9px 14px; border-radius: 8px; transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--blue-50); color: var(--blue); }
.nav__links a.active { color: var(--blue); }
.nav__cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav__phone { font-family: var(--font-head); font-weight: 600; color: var(--navy); white-space: nowrap; }
.nav__phone:hover { color: var(--blue); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(124,108,240,.10), transparent 60%),
    linear-gradient(180deg, #f6f3fc 0%, #ffffff 100%);
  padding: 84px 0 96px;
}
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
.hero__logo { height: 150px; width: auto; margin-bottom: 26px; }
@media (max-width: 720px){ .hero__logo { height: 96px; margin-bottom: 18px; } }
.hero h1 { margin-bottom: 18px; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 1.06; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--teal); }
.hero .lead { margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; color: var(--muted); font-size: .92rem; }
.hero__trust .ti { display: flex; align-items: center; gap: 8px; }
.hero__trust svg { color: var(--teal); flex-shrink: 0; }

.hero__art {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/5; box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, #241c5c, #3a2f86 55%, #6d5ef0);
}
.hero__art .stars { position: absolute; inset: 0; }
.hero__badge {
  position: absolute; left: 22px; bottom: 22px; right: 22px;
  background: rgba(255,255,255,.94); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
}
.hero__badge .ring { width: 46px; height: 46px; flex-shrink: 0; }
.hero__badge b { color: var(--ink); font-family: var(--font-head); display: block; font-size: 1rem; }
.hero__badge span { font-size: .86rem; color: var(--muted); }

/* ---------- Stat band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat { text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--navy); line-height: 1; letter-spacing: -.02em; }
.stat__num .u { color: var(--teal); }
.stat__label { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.card__icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal); margin-bottom: 18px;
}
.card__icon--blue { background: var(--blue-50); color: var(--blue); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .98rem; color: var(--body); }

/* condition pills */
.pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--white); border: 1px solid var(--line); border-radius: 100px;
  padding: 11px 20px; font-weight: 500; color: var(--ink); font-family: var(--font-head); font-size: .96rem;
  box-shadow: var(--shadow-sm); transition: .18s;
}
.pill:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* ---------- Providers ---------- */
.providers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.provider { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s; }
.provider:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.provider__photo { aspect-ratio: 1/1; background: linear-gradient(150deg, var(--blue-50), var(--teal-50)); display: grid; place-items: center; }
.provider__photo svg { width: 64px; height: 64px; color: var(--blue); opacity: .55; }
.provider__body { padding: 22px 24px 26px; }
.provider__name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0; }
.provider__role { color: var(--teal); font-weight: 600; font-size: .9rem; margin: 4px 0 10px; }
.provider__bio { font-size: .94rem; margin: 0; color: var(--body); }
.provider--lead { grid-column: span 1; border: 1.5px solid var(--blue-100); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); background: var(--blue-50); padding: 4px 10px; border-radius: 100px; margin-bottom: 10px; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 5/4; background: linear-gradient(160deg, #241c5c, #6d5ef0); position: relative; }
.checklist { list-style: none; margin: 22px 0 0; padding: 0; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 15px; color: var(--ink); }
.checklist svg { flex-shrink: 0; color: var(--teal); margin-top: 3px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding-top: 8px; }
.step__n { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 700; display: grid; place-items: center; margin-bottom: 16px; }
.step h3 { font-size: 1.1rem; }
.step p { font-size: .95rem; margin: 0; }

/* ---------- Research ---------- */
.research-hero { background: linear-gradient(165deg, #1a1342 0%, #241c5c 55%, #8a6cf0 130%); color: #ddd3fa; padding: 96px 0 80px; position: relative; overflow: hidden; }
.research-hero h1 { color: #fff; }
.research-hero .lead { color: #cabbf0; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 40px; }
.metric { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.metric__num { font-family: var(--font-head); font-weight: 700; font-size: 2.2rem; color: #fff; }
.metric__label { color: #bcb0e6; font-size: .92rem; }

.pub { display: flex; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub__year { font-family: var(--font-head); font-weight: 700; color: var(--teal); font-size: 1.05rem; flex-shrink: 0; width: 64px; }
.pub__body h3 { font-size: 1.12rem; margin-bottom: 6px; }
.pub__meta { font-size: .9rem; color: var(--muted); font-style: italic; margin: 0; }
.focus-area { display: flex; gap: 16px; align-items: flex-start; }
.focus-area .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Locations ---------- */
.loc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.loc-card h3 { display: flex; align-items: center; gap: 10px; }
.loc-card h3 svg { color: var(--teal); }
.loc-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--body); }
.loc-row svg { color: var(--blue); flex-shrink: 0; margin-top: 3px; }
.loc-row b { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); border-radius: var(--radius-lg); padding: 56px; text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #ddd3fa; max-width: 56ch; margin: 0 auto 26px; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 13px 15px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #bcb0e6; padding: 70px 0 28px; }
.footer a { color: #d8cff2; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 48px; }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__sub { color: #9485c8; }
.footer p { color: #b3a6e0; font-size: .95rem; }
.footer h4 { color: #fff; font-family: var(--font-head); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; font-size: .95rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #9485c8; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: linear-gradient(180deg, #f6f3fc, #fff); padding: 70px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 12px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { max-width: 440px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3, .providers, .metrics { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); gap: 36px 20px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav__links, .nav__phone { display: none; }
  .nav__toggle { display: block; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 90px; left: 0; right: 0; background: #fff;
    padding: 14px 20px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open .nav__links a { padding: 13px 14px; font-size: 1.05rem; }
  .grid-2, .grid-3, .grid-4, .providers, .metrics, .field-row { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 26px; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
}
