/* Del Mar Brain & TMS Center — brand stylesheet */
:root {
  /* Brand color tokens (swappable) */
  --color-primary: #1a808a;
  --color-primary-dark: #12626b;
  --color-primary-light: #e6f2f3;
  --color-navy: #0b2033;
  --color-navy-2: #10293f;
  --color-accent: #7fc4c9;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f7f8;
  --color-text: #16283a;
  --color-heading: #0d2233;
  --color-muted: #566572;
  --color-border: #e3eaee;
  --color-white: #ffffff;

  /* Type */
  --font-heading: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(13, 34, 51, 0.08);
  --shadow-md: 0 12px 30px rgba(13, 34, 51, 0.10);
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p { margin: 0 0 1rem; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; height: auto; }
ul { margin: 0 0 1rem; padding-left: 1.15rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--navy { background: var(--color-navy); color: #cfdae2; }
.section--navy h2, .section--navy h3 { color: #fff; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--color-muted); max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 4vw, 3.25rem); text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn--outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { background: #fff; color: var(--color-navy); border-color:#fff; }

/* Top bar */
.topbar { background: var(--color-navy); color: #b9c6d1; font-size: 0.85rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 42px; flex-wrap: wrap; }
.topbar a { color: #cdd8e1; }
.topbar__social { display: flex; gap: 0.9rem; align-items: center; }
.topbar__right { display: flex; gap: 1.25rem; align-items: center; }
.topbar__phone { font-weight: 600; color:#fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--color-border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav > ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.nav a, .nav .navlink {
  font-family: var(--font-heading); font-weight: 600; font-size: 0.98rem;
  color: var(--color-heading); padding: 0.55rem 0.9rem; border-radius: 8px; display: inline-block;
  background: none; border: none; cursor: pointer;
}
.nav a:hover, .nav .has-menu:hover > .navlink { color: var(--color-primary); text-decoration: none; background: var(--color-primary-light); }
.has-menu { position: relative; }
.has-menu > .navlink::after { content: "▾"; font-size: 0.7em; margin-left: 0.3rem; color: var(--color-muted); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 0.5rem; margin: 0.4rem 0 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.has-menu:hover .submenu, .has-menu:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 0.55rem 0.8rem; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.header-cta { display: flex; align-items: center; gap: 0.75rem; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 1px solid var(--color-border); border-radius: 8px; padding: 0.5rem 0.65rem; cursor: pointer; font-size: 1.2rem; }
#nav-check { display: none; }

/* Hero (home) */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--color-navy);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,32,51,.30) 0%, rgba(11,32,51,.34) 60%, rgba(11,32,51,.42) 100%); }
.hero .container { position: relative; z-index: 2; padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.hero__inner { max-width: 640px; }
.hero h1 { color: #fff; }
.hero .kicker { color: var(--color-accent); }
.hero__pill {
  display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 0.4rem 1rem;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.25rem; color:#eaf3f4;
}
.hero p.sub { font-size: 1.2rem; color: #d6e2ea; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero__badges { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.hero__badge { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.92rem; color:#eaf3f4; }
.hero__badge svg { flex: none; }
.hero__neurostar { margin-top: 2rem; }
.hero__neurostar img { max-height: 54px; width: auto; }

/* Page hero (subpages) */
.page-hero { background: linear-gradient(160deg, #f3f7f8 0%, #e3eef0 100%); text-align: center; padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem,5vw,4rem); border-bottom: 1px solid var(--color-border); }
.page-hero .container { max-width: 800px; }
.page-hero p.sub { font-size: 1.2rem; color: var(--color-muted); margin: 0; }

/* Insurance strip */
.insurers { background: #fff; padding: 2.25rem 0; border-bottom: 1px solid var(--color-border); }
.insurers__label { text-align: center; font-family: var(--font-heading); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 1.5rem; }
.insurers__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem; }
.insurers__row img { height: 42px; width: auto; opacity: 0.85; filter: grayscale(15%); }

/* Grid + cards */
.grid { display: grid; gap: 1.5rem; }
.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: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.card--navy { background: var(--color-navy); color: #c7d3dd; border-color: transparent; }
.card--navy h3 { color: #fff; }
.card__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--color-primary-light); color: var(--color-primary); margin-bottom: 1.1rem; }
.card--navy .card__icon { background: rgba(127,196,201,.16); color: var(--color-accent); }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary); background: var(--color-primary-light); padding: 0.3rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem; }
.card--navy .tag { background: rgba(127,196,201,.16); color: var(--color-accent); }

/* Split (text + image) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: 0.75rem; font-weight: 500; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; background: var(--color-primary-light); color: var(--color-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.section--navy .checklist li::before { background: rgba(127,196,201,.18); color: var(--color-accent); }

/* Feature pills row */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.pill { background: #fff; border: 1px solid var(--color-border); border-radius: 999px; padding: 0.7rem 1.3rem; font-weight: 600; font-family: var(--font-heading); box-shadow: var(--shadow-sm); }

/* Stat / mini cards */
.minis { display: flex; gap: 2rem; flex-wrap: wrap; }
.mini { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }

/* Testimonials */
.testimonial { background: var(--color-navy-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 1.75rem; color: #d3dde6; }
.testimonial__stars { color: #f6c445; margin-bottom: 0.75rem; letter-spacing: 2px; }
.testimonial__quote { font-style: italic; margin-bottom: 1.25rem; }
.testimonial__author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-heading); }
.testimonial__name { font-weight: 700; color: #fff; }
.testimonial__role { font-size: 0.85rem; color: #9fb0bd; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.9rem; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 1.1rem 1.35rem; font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; color: var(--color-heading); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--color-primary); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--color-primary); }
.faq__body { padding: 0 1.35rem 1.25rem; color: var(--color-muted); }

/* CTA + assessment */
.cta-band { background: var(--color-bg-alt); }
.cta-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: stretch; }
.cta-card { background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); color: #fff; border-radius: var(--radius); padding: 2.5rem; }
.cta-card h2 { color: #fff; }
.cta-card p { color: #dff0f1; }
.cta-contact { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.cta-contact__item { display: flex; gap: 0.85rem; align-items: flex-start; }
.cta-contact__item .lbl { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #c5e6e8; font-weight: 700; }
.cta-contact__item a, .cta-contact__item strong { color: #fff; font-weight: 700; font-size: 1.05rem; }
.assessment { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2.25rem; box-shadow: var(--shadow-md); }

/* Forms */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-family: var(--font-heading); font-size: 0.95rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 0.8rem 0.95rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--color-text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--color-primary); border-color: var(--color-primary); }
fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; margin: 0 0 1.25rem; }
fieldset legend { font-family: var(--font-heading); font-weight: 600; padding: 0 0.5rem; font-size: 0.98rem; }
.choice { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.5rem; font-weight: 500; }
.choice input { width: auto; margin-top: 0.25rem; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: var(--color-muted); margin-bottom: 0.9rem; }
.consent input { width: auto; margin-top: 0.2rem; flex: none; }

/* Contact info list */
.contact-info { display: grid; gap: 1.5rem; }
.contact-info__item h3 { margin-bottom: 0.25rem; font-size: 1.1rem; }
.hours-row { display: flex; justify-content: space-between; max-width: 320px; border-bottom: 1px dashed var(--color-border); padding: 0.35rem 0; }

/* Providers / staff */
.person { text-align: center; }
.person__avatar { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1rem; background: var(--color-primary-light); color: var(--color-primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; font-family: var(--font-heading); }
.person__name { font-weight: 700; font-family: var(--font-heading); color: var(--color-heading); }
.person__role { color: var(--color-primary); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* Legal / prose */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { margin-top: 2rem; }
.prose p, .prose li { color: var(--color-text); }

/* Footer */
.site-footer { background: var(--color-navy); color: #a9b8c4; padding: clamp(3rem,6vw,4.5rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #b8c6d2; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 42px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer-social { display: flex; gap: 1rem; margin-top: 1.1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.35rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; }
.footer-bottom a { margin-left: 1.25rem; }

/* Responsive */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .split, .cta-grid, .footer-grid { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md); flex-direction: column; align-items: stretch; padding: 1rem 1.5rem; display: none; }
  .nav > ul { flex-direction: column; gap: 0.15rem; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 1rem; margin: 0; }
  .has-menu:hover .submenu { }
  .nav-toggle { display: inline-flex; }
  #nav-check:checked ~ .nav { display: flex; }
  .topbar__left { display: none; }
}
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .header-cta .btn { display: none; }
}

/* ---- Hero video background ---- */
.hero__bg video { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero__accent { color: var(--color-accent); }

/* ---- Footer logo card ---- */
.footer-brand__logo { display: inline-block; background: #fff; border-radius: 14px; padding: 0.8rem 1.15rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
.footer-brand__logo img { height: 44px; margin: 0; filter: none; }

/* ---- Featured media video ---- */
.media-frame { max-width: 860px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); background: #000; aspect-ratio: 16/9; }
.media-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- GHL embed ---- */
.embed-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-md); }
.embed-card h3 { margin-bottom: .35rem; }
.embed-card iframe { width: 100%; border: none; display: block; }

/* ---- CSS tabs (Conditions We Treat) ---- */
.tabs { max-width: 1000px; margin: 0 auto; }
.tabs__inputs { position: absolute; opacity: 0; pointer-events: none; }
.tabs__list { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1.75rem; }
.tabs__list label { background: #fff; border: 1px solid var(--color-border); border-radius: 999px; padding: 0.7rem 1.4rem; font-family: var(--font-heading); font-weight: 600; cursor: pointer; transition: .15s; }
.tabs__list label:hover { border-color: var(--color-primary); color: var(--color-primary); }
.tabs__card { background: #fff; border: 1px solid var(--color-border); border-radius: 2rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.tabs__panel { display: none; }
.tabs__split { display: grid; grid-template-columns: 1fr 1fr; min-height: 400px; }
.tabs__split .txt { padding: clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.tabs__split .media { position: relative; min-height: 320px; }
.tabs__split .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cond-0:checked ~ .tabs__card .tabs__panel:nth-child(1),
#cond-1:checked ~ .tabs__card .tabs__panel:nth-child(2),
#cond-2:checked ~ .tabs__card .tabs__panel:nth-child(3),
#cond-3:checked ~ .tabs__card .tabs__panel:nth-child(4) { display: block; }
#cond-0:checked ~ .tabs__list label[for="cond-0"],
#cond-1:checked ~ .tabs__list label[for="cond-1"],
#cond-2:checked ~ .tabs__list label[for="cond-2"],
#cond-3:checked ~ .tabs__list label[for="cond-3"] { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tabs__inputs:focus-visible ~ .tabs__list label { outline: none; }
@media (max-width: 760px) { .tabs__split { grid-template-columns: 1fr; } .tabs__split .media { order: -1; min-height: 240px; } }
