/* ==========================================================================
   Betts Psychiatric, PC — Twin Falls, Idaho
   Master stylesheet (mobile-first). Brand palette preserved from original site:
     Primary blue   #027ABC   Leaf green  #A1C62E / #6EC62E
     Deep teal       #205260 / #003A43   Slate ink  #2A2B30 / #3A4649
     Warm neutral    #E1DAD0
   Fonts: Asap Condensed (headings) + Open Sans (body) — same families as original.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --blue:        #027abc;
  --blue-600:    #0369a0;
  --blue-700:    #015e8c;
  --blue-ink:    #064c70;   /* accessible blue text on white */
  --teal:        #205260;
  --teal-deep:   #003a43;   /* matches original floating booking button */
  --green:       #a1c62e;
  --green-bright:#6ec62e;
  --green-dark:  #54690a;   /* accessible green text on white & light tints */

  /* Neutrals */
  --ink:         #232a2c;
  --slate:       #3a4649;
  --muted:       #5b6a6f;
  --line:        #e3e9ec;
  --line-soft:   #eef3f5;
  --white:       #ffffff;
  --bg:          #ffffff;
  --bg-soft:     #f3f8fb;   /* cool tint */
  --bg-warm:     #faf6f0;   /* warm cream tint from #E1DAD0 */
  --cream:       #e1dad0;

  /* Effects */
  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   22px;
  --shadow-sm:   0 1px 2px rgba(15,40,50,.06), 0 1px 3px rgba(15,40,50,.08);
  --shadow:      0 6px 18px -6px rgba(15,52,68,.18), 0 2px 6px rgba(15,52,68,.06);
  --shadow-lg:   0 24px 50px -18px rgba(8,52,72,.30);
  --ring:        0 0 0 3px rgba(2,122,188,.9);

  --maxw:        1140px;
  --gutter:      clamp(1.1rem, 4vw, 2.25rem);

  --ff-head: "Asap Condensed", "Arial Narrow", system-ui, sans-serif;
  --ff-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--ff-body);
  color: var(--slate);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { max-width: 100%; display: block; height: auto; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-head);
  color: var(--teal);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .2px;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); color: var(--blue-700); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.22rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
strong { color: var(--ink); font-weight: 700; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue-700); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 10px 10px; font-weight: 700; transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--ring); border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 820px; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.section--teal { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%); color: #e8f3f5; }
.section--teal h2, .section--teal h3 { color: #fff; }
.cl { clear: both; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-head); font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; font-size: .82rem; color: var(--green-dark);
  margin-bottom: .6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--green); display: inline-block; }
.section--teal .eyebrow,
.page-head .eyebrow { color: #d8f0b0; }
.section--teal .eyebrow::before,
.page-head .eyebrow::before { background: var(--green-bright); }

.lede { font-size: 1.18rem; color: var(--slate); }
.text-center { text-align: center; }
.measure { max-width: 65ch; }
.mx-auto { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--blue); --btn-fg: #fff; --btn-bd: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ff-head); font-weight: 700; font-size: 1.12rem; letter-spacing: .4px;
  line-height: 1.1; padding: .8rem 1.5rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); border: 2px solid var(--btn-bd);
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--green { --btn-bg: var(--green-dark); --btn-bd: var(--green-dark); }
.btn--green:hover { background: #4d680a; border-color: #4d680a; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--blue-700); --btn-bd: var(--blue); box-shadow: none; }
.btn--ghost:hover { background: var(--blue); color: #fff; }
.btn--on-teal { --btn-bg: #fff; --btn-fg: var(--teal-deep); --btn-bd: #fff; }
.btn--on-teal:hover { background: var(--green-bright); border-color: var(--green-bright); color: var(--teal-deep); }
.btn--lg { font-size: 1.22rem; padding: .95rem 1.9rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-row--center { justify-content: center; }

/* ---------- Header / topbar ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 14px rgba(8,52,72,.08); }

.topbar { background: var(--teal-deep); color: #d6eef2; font-size: .92rem; }
.topbar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1.4rem; padding-block: .45rem; text-align: center; }
.topbar a { color: #eafafd; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .topbar__item { display: inline-flex; align-items: center; gap: .4rem; }
.topbar .topbar__item svg { width: 16px; height: 16px; fill: var(--green-bright); flex: none; }
.topbar .topbar__portal {
  background: var(--green-dark); color: #fff; padding: .25rem .85rem; border-radius: 999px;
  font-family: var(--ff-head); letter-spacing: .4px;
}
.topbar .topbar__portal:hover { background: var(--green-bright); color: var(--teal-deep); text-decoration: none; }

.navbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 200px; max-width: 56vw; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
  width: 48px; height: 44px; padding: 10px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer;
}
.nav-toggle span { height: 2.5px; background: var(--teal); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.primary-nav { position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); background: #fff;
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s ease;
  padding: 5.5rem 1.4rem 2rem; overflow-y: auto; z-index: 120; }
.primary-nav.is-open { transform: translateX(0); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.primary-nav a {
  display: block; font-family: var(--ff-head); font-weight: 600; font-size: 1.2rem;
  color: var(--teal); text-decoration: none; padding: .7rem .8rem; border-radius: 10px;
}
.primary-nav a:hover, .primary-nav a:focus-visible { background: var(--bg-soft); color: var(--blue-700); }
.primary-nav a[aria-current="page"] { color: var(--blue-700); background: var(--bg-soft); box-shadow: inset 4px 0 0 var(--green); }
.nav-overlay { position: fixed; inset: 0; background: rgba(10,30,38,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 110; }
.nav-overlay.is-open { opacity: 1; visibility: visible; }

/* ---------- Page hero ---------- */
.hero {
  position: relative; color: #eaf6f9; overflow: hidden;
  background: linear-gradient(125deg, var(--teal-deep) 0%, var(--teal) 45%, var(--blue-700) 100%);
}
.hero::after {
  content: ""; position: absolute; right: -8%; top: -30%; width: 60%; height: 160%;
  background: radial-gradient(closest-side, rgba(110,198,46,.22), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #d4eef3; font-size: 1.2rem; max-width: 56ch; }
.hero .eyebrow { color: #d8f0b0; }
.hero .eyebrow::before { background: var(--green-bright); }

/* compact page header for interior pages */
.page-head { background: linear-gradient(120deg, var(--teal) 0%, var(--teal-deep) 100%); color: #eaf6f9; }
.page-head .container { padding-block: clamp(2.4rem, 6vw, 4rem); }
.page-head h1 { color: #fff; }
.page-head p { color: #cfe9ef; max-width: 60ch; margin-bottom: 0; }
.breadcrumb { font-size: .9rem; color: #bfe2e9; margin-bottom: .7rem; }
.breadcrumb a { color: #eafafd; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: .6; padding: 0 .35rem; }

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) {
  .grid--2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); height: 100%;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe0e8; }
.card h3 { color: var(--blue-700); margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(2,122,188,.12), rgba(110,198,46,.18));
  margin-bottom: 1rem;
}
.card__icon svg { width: 28px; height: 28px; fill: var(--teal); }

/* condition cards: tighter */
.condition { border-left: 4px solid var(--green); }
.condition h3 { font-size: 1.18rem; }

/* ---------- Feature (image + text) ---------- */
.feature__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.feature__media { position: relative; }
.feature__badge {
  position: absolute; bottom: -18px; left: 18px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: .7rem 1rem; font-family: var(--ff-head);
  color: var(--teal); font-weight: 700; display: flex; align-items: center; gap: .6rem;
}
.feature__badge .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(161,198,46,.25); }

/* ---------- Stat / trust strip ---------- */
.trust-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
@media (min-width: 760px) { .trust-strip { grid-template-columns: repeat(4, 1fr); } }
.trust { text-align: center; }
.trust__num { font-family: var(--ff-head); font-weight: 700; font-size: 2.3rem; color: var(--blue); line-height: 1; }
.trust__label { font-size: .95rem; color: var(--muted); }

/* ---------- Steps (numbered process) ---------- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.3rem 4.2rem; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.1rem; top: 1.2rem; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--blue); color: #fff; font-family: var(--ff-head); font-weight: 700; font-size: 1.25rem;
  display: grid; place-items: center;
}
.step h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.step p:last-child { margin-bottom: 0; }

/* ---------- Chips / badges (insurance) ---------- */
.chip-list { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; list-style: none; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: .5rem 1rem; font-weight: 600; color: var(--slate); box-shadow: var(--shadow-sm);
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.chip--pending::before { background: #e2a93b; }
.chip--no::before { background: #cf5b5b; }

/* ---------- Definition / policy list ---------- */
.policy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.policy h3 { color: var(--blue-700); margin-bottom: .35rem; }
.policy p:last-child { margin-bottom: 0; }

/* ---------- Info / contact tiles ---------- */
.info-tile { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.info-tile__icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(2,122,188,.12), rgba(110,198,46,.18)); }
.info-tile__icon svg { width: 24px; height: 24px; fill: var(--teal); }
.info-tile h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.info-tile a { font-weight: 600; text-decoration: none; }
.info-tile a:hover { text-decoration: underline; }

/* ---------- Crisis band (988) ---------- */
.crisis {
  background: var(--bg-warm); border-top: 3px solid var(--green); border-bottom: 1px solid var(--line);
}
.crisis .container { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: center;
  text-align: center; padding-block: 1rem; }
.crisis p { margin: 0; color: var(--slate); font-size: 1rem; }
.crisis strong { color: var(--teal-deep); }
.crisis a { font-weight: 700; }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(120deg, var(--blue-700), var(--teal)); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #dceff6; max-width: 56ch; margin-inline: auto; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.4rem, 3vw, 2.2rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: .35rem; }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #8a9296; border-radius: 10px; padding: .7rem .85rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: var(--ring); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field--row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .field--row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: .9rem; color: var(--muted); }
.form-hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Map ---------- */
.map-embed { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Prose helper ---------- */
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; color: var(--blue-700); }
.prose ul { padding-left: 1.2rem; }
.prose li::marker { color: var(--green-dark); }

/* ---------- Floating booking button (preserved from original) ---------- */
.booking-button {
  background: var(--teal-deep); color: #fff; position: fixed; bottom: 1.25rem; right: 1.25rem;
  width: 3.9rem; height: 3.9rem; display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; box-shadow: var(--shadow-lg); cursor: pointer; border: none; z-index: 90;
}
.booking-button svg { width: 26px; height: 26px; }
.booking-button:hover { background: var(--blue-700); }
.booking-button:focus-visible { box-shadow: var(--ring); }

/* ---------- Footer ---------- */
.site-footer { background: #122a31; color: #c6d7dc; font-size: .98rem; }
.site-footer a { color: #e7f3f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding-block: clamp(2.6rem, 6vw, 3.6rem); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; } }
.footer-brand img { width: 210px; background: #fff; padding: .55rem .7rem; border-radius: 12px; }
.footer-col h4 { color: #fff; font-size: 1.15rem; margin-bottom: .9rem; letter-spacing: .4px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-contact-row { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .75rem; }
.footer-contact-row svg { width: 20px; height: 20px; fill: var(--green-bright); flex: none; margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: space-between; align-items: center; padding-block: 1.2rem; font-size: .88rem; color: #9fb4ba; }
.footer-disclaimer { background: #0d2127; color: #8ba3a9; font-size: .82rem; }
.footer-disclaimer .container { padding-block: 1.1rem; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.stack > * + * { margin-top: 1rem; }
.list-check { list-style: none; padding: 0; }
.list-check li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.15rem; height: 1.15rem;
  background: var(--green); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/80% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/80% no-repeat;
}

/* ---------- Desktop nav ---------- */
@media (min-width: 940px) {
  .nav-toggle { display: none; }
  .nav-overlay { display: none; }
  .primary-nav {
    position: static; width: auto; transform: none; box-shadow: none; padding: 0; overflow: visible; background: transparent;
  }
  .primary-nav ul { flex-direction: row; align-items: center; gap: .15rem; }
  .primary-nav a { font-size: 1.06rem; padding: .55rem .8rem; border-radius: 8px; position: relative; }
  .primary-nav a[aria-current="page"] { background: transparent; box-shadow: none; }
  .primary-nav a[aria-current="page"]::after,
  .primary-nav a:hover::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2.5px; background: var(--green); border-radius: 2px;
  }
  .brand img { width: 230px; }
}
