/* Bella Behavioral Health - bellabehavioral.net
   Design system: evergreen + warm sand + marigold. Bricolage Grotesque display over Public Sans.
   Deliberately distinct from the previous apricot/cocoa serif site and from every Lead-Landing portfolio site. */

:root {
  --green-950: #102B24;
  --green-900: #163A31;
  --green-700: #1E5244;
  --green-600: #2A6857;
  --green-500: #3B7D69;
  --green-100: #DCEAE2;
  --green-50: #EDF4EF;
  --sand: #F8F4EB;
  --cream: #FDFBF5;
  --ink: #22302B;
  --ink-soft: #57675F;
  --gold: #D99A2B;
  --gold-deep: #80570C; /* text-safe gold: 5.4+ on gold-soft, 6.4 on white */
  --gold-soft: #F8ECD3;
  --line: #E4DED0;
  --white: #FFFFFF;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(22, 58, 49, 0.06), 0 14px 34px rgba(22, 58, 49, 0.08);
  --shadow-soft: 0 1px 3px rgba(22, 58, 49, 0.05), 0 8px 20px rgba(22, 58, 49, 0.06);
  --font-display: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --font-body: "Public Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--green-900); color: #fff;
  padding: 10px 18px; border-radius: 0 0 10px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

h1, h2, h3, .display { font-family: var(--font-display); color: var(--green-900); line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
p { margin-bottom: 14px; }
.lede { font-size: clamp(17px, 2vw, 19.5px); color: var(--ink-soft); max-width: 640px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-600);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  padding: 14px 28px; border-radius: 999px; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--green-600); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--green-950); box-shadow: var(--shadow-soft); }
.btn-gold:hover { background: #E3A93F; }
.btn-outline { background: transparent; color: var(--green-800, var(--green-700)); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { background: transparent; color: var(--green-900); padding: 14px 18px; white-space: nowrap; }
.btn-ghost:hover { background: var(--green-50); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 244, 235, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 14px 24px; max-width: var(--wrap); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.logo svg { width: 40px; height: 40px; flex: 0 0 auto; }
.logo .word { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--green-900); line-height: 1.05; }
.logo .word small { display: block; font-weight: 600; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-600); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--green-900);
  text-decoration: none; padding: 9px 13px; border-radius: 999px; transition: background 0.12s ease;
}
.main-nav a:hover { background: var(--green-50); }
.main-nav a.active { background: var(--green-100); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.header-phone {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--green-900);
  text-decoration: none; padding: 10px 14px; border-radius: 999px; white-space: nowrap;
}
.header-phone:hover { background: var(--green-50); }
.header-cta .btn { padding: 11px 20px; font-size: 15px; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 8px; border-radius: 10px; }
.nav-toggle-label svg { width: 26px; height: 26px; display: block; }

@media (max-width: 980px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .main-nav a { padding: 13px 14px; font-size: 17px; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .nav-toggle-label { display: block; }
  .header-phone { display: none; }
}
@media (max-width: 560px) {
  .header-cta .btn { padding: 10px 15px; font-size: 14px; }
  .logo .word { font-size: 16.5px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 .accent { color: var(--green-600); }
.hero h1 .underline { position: relative; white-space: nowrap; }
.hero h1 .underline::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 6px; height: 12px;
  background: var(--gold-soft); z-index: -1; border-radius: 6px;
}
.hero .lede { margin: 22px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 600; color: var(--green-900);
  font-family: var(--font-display);
}
.chip svg { width: 15px; height: 15px; color: var(--green-600); }

/* Arch visual */
.arch-figure { position: relative; }
.arch {
  border-radius: 300px 300px var(--radius) var(--radius);
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  min-height: 460px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.arch svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.float-card {
  position: absolute; background: var(--white); border-radius: 14px; box-shadow: var(--shadow);
  padding: 14px 18px; font-size: 14px; display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line);
}
.float-card .ic {
  width: 38px; height: 38px; border-radius: 12px; background: var(--green-50);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.float-card .ic svg { width: 20px; height: 20px; color: var(--green-700); }
.float-card b { font-family: var(--font-display); display: block; font-size: 14.5px; color: var(--green-900); }
.float-card span { color: var(--ink-soft); font-size: 13px; }
.fc-1 { top: 46px; left: -34px; }
.fc-2 { bottom: 40px; right: -26px; }
@media (max-width: 980px) {
  .hero { padding: 54px 0 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .arch { min-height: 340px; }
  .fc-1 { left: 10px; } .fc-2 { right: 10px; }
}

/* Sections */
.section { padding: 78px 0; }
.section.tint { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.deep { background: var(--green-900); }
.section.deep h2, .section.deep h3 { color: #fff; }
.section.deep p { color: var(--green-100); }
.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ---------- Pointer-following tilt ----------
   Ported from muntas.com at Mohamed's request; mechanics identical, sheen retuned
   to Bella's marigold and the resting page stays completely flat. Pointer position
   arrives as --rx/--ry/--mx/--my from site.js; all easing lives here. Cards degrade
   to plain static cards if JS never runs, and reduced-motion kills it outright. */
.js-tilt-group { perspective: 1100px; }
/* The second selector is load-bearing, not redundant: tilt cards also carry
   .reveal, and `.js .reveal.in { transform: none }` below is more specific than
   `.js .tilt`, so it silently flattened every tilt once the card scrolled in.
   Matching .tilt.reveal.in outranks it. Verified in a browser, not by eye. */
.js .tilt,
.js .tilt.reveal.in {
  transform-style: preserve-3d;
  transform:
    perspective(1100px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translate3d(0, var(--lift, 0px), 0);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.js .tilt:hover { --lift: -4px; box-shadow: var(--shadow); }
.tilt { position: relative; overflow: hidden; }
.tilt::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(217, 154, 43, 0.13),
    transparent 62%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.tilt:hover::after,
.tilt:focus-within::after,
.tilt:focus-visible::after { opacity: 1; }
.card .ic {
  width: 52px; height: 52px; border-radius: 16px 16px 16px 4px; background: var(--green-50);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.card .ic svg { width: 26px; height: 26px; color: var(--green-700); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 0; }
.card .card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  color: var(--green-700); text-decoration: none;
}
.card .card-link:hover { gap: 10px; }
.card .card-link svg { width: 15px; height: 15px; transition: transform 0.15s; }

.badge {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep);
  background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px;
}
.badge.green { color: var(--green-700); background: var(--green-50); }

/* Service cards */
.svc-card { position: relative; display: flex; flex-direction: column; }
.svc-card .code {
  position: absolute; top: 24px; right: 24px; font-family: var(--font-display);
  font-weight: 800; font-size: 14px; color: var(--green-100);
  background: var(--green-900); padding: 5px 12px; border-radius: 999px;
}
.svc-card .card-link { margin-top: auto; padding-top: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; position: relative; }
.step-card .num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-700); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step-card h3 { font-size: 17.5px; }
.step-card p { color: var(--ink-soft); font-size: 14.5px; margin: 6px 0 0; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.checklist { list-style: none; margin: 22px 0; }
.checklist li { display: flex; gap: 12px; margin-bottom: 13px; align-items: flex-start; }
.checklist li svg { width: 22px; height: 22px; color: var(--green-600); flex: 0 0 auto; margin-top: 2px; }

/* Quote */
.quote-card {
  background: var(--green-900); border-radius: var(--radius); padding: 44px;
  color: #fff; position: relative; overflow: hidden;
}
.quote-card .mark { font-family: var(--font-display); font-size: 90px; line-height: 0.6; color: var(--gold); display: block; margin-bottom: 18px; }
.quote-card blockquote { font-family: var(--font-display); font-size: clamp(19px, 2.4vw, 24px); font-weight: 600; line-height: 1.45; margin-bottom: 22px; }
.quote-card cite { font-style: normal; color: var(--green-100); font-size: 15px; }
.quote-card cite b { color: #fff; font-family: var(--font-display); }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--green-900); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sand);
  transition: border-color 0.12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-600); background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 13px; color: var(--ink-soft); margin: 4px 0 18px; }
.form-error { color: #A33A24; font-size: 14px; font-weight: 600; margin-bottom: 12px; display: none; }
.form-success { text-align: center; padding: 30px 10px; display: none; }
.form-success .tick {
  width: 66px; height: 66px; border-radius: 50%; background: var(--green-50);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.form-success .tick svg { width: 32px; height: 32px; color: var(--green-600); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Info rail */
.info-rail .card { margin-bottom: 16px; }
.info-rail .card p { margin: 0; }
.info-rail .k { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-600); display: block; margin-bottom: 6px; }

/* CTA band */
.cta-band {
  background: linear-gradient(150deg, var(--green-700), var(--green-950));
  border-radius: calc(var(--radius) + 8px); padding: 56px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 154, 43, 0.28), transparent 65%);
  top: -190px; right: -110px;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; position: relative; }
.cta-band p { color: var(--green-100); max-width: 560px; margin: 0 auto 28px; position: relative; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
@media (max-width: 640px) { .cta-band { padding: 40px 24px; } }

/* Team */
.person-card { text-align: left; }
.person-card .avatar {
  width: 64px; height: 64px; border-radius: 22px 22px 22px 6px;
  background: linear-gradient(150deg, var(--green-600), var(--green-900));
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.person-card .role { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }

/* Page hero (interior) */
.page-hero { padding: 64px 0 54px; position: relative; overflow: hidden; }
.page-hero .lede { margin-top: 16px; }
.page-hero .crumb { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-600); margin-bottom: 14px; }

/* Footer */
.site-footer { background: var(--green-950); color: var(--green-100); padding: 64px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--font-display); color: #fff; font-size: 15px; margin-bottom: 16px; letter-spacing: 0.04em; }
.site-footer a { color: var(--green-100); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 14.5px; }
.footer-brand .logo .word { color: #fff; }
.footer-brand .logo .word small { color: var(--gold); }
.footer-brand p { font-size: 14.5px; margin-top: 14px; max-width: 300px; color: var(--green-100); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 13.5px;
}
.footer-bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* Reveal on scroll: hidden state applies ONLY when JS is running (html.js),
   so content is never invisible if the script fails to load. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
  /* Kill the tilt outright rather than just speeding it up. */
  .tilt, .js .tilt { transform: none !important; }
  .tilt::after { display: none; }
}
