/* Levelhead Chiropractic. Calm and clinical-but-warm: white and pale mint bands, navy type, teal for actions. */
:root {
  --navy: #13294B;
  --navy-soft: #2C4166;
  --teal: #1FA39A;
  --teal-dark: #17857D;
  --mint: #EAF4F2;
  --mint-line: #D3E7E3;
  --white: #FFFFFF;
  --text: #13294B;
  --muted: #55627A;
  --line: #E3E8EE;
  --error: #B3261E;
  --display: "Fraunces", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, sans-serif;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--white); scroll-behavior: smooth; scroll-padding-top: 68px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-dark); }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 9vw, 4.6rem); }
h1 em { font-style: italic; font-weight: 400; color: var(--teal-dark); }
h2 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin-bottom: .8rem; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.small { font-size: .9rem; color: var(--muted); }
.center { text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .95em 1.5em; border-radius: 999px; border: 2px solid transparent; font: 700 .98rem/1 var(--body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:active { transform: translateY(1px); }
.btn--teal { background: var(--teal-dark); color: var(--white); }
.btn--teal:hover { background: var(--navy); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Nav: solid white so nothing shows through behind it (or behind the iPhone status bar). */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { display: flex; }
.brand img { height: 40px; width: auto; }
.nav__links { display: none; }
.btn--nav { display: none; }
.menu-btn { display: grid; gap: 5px; place-content: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 999px) {
.nav__links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: -20px; right: -20px; background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 20px 1.3rem; box-shadow: 0 18px 30px -20px rgba(19,41,75,.35); }
.nav__links.open a { padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--navy); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.nav__links.open a.nav__cta { border: 0; color: var(--teal-dark); }
}

/* Hero: compact on phones, photo first so it doesn't push the headline down too far */
.hero { background: linear-gradient(180deg, var(--mint) 0%, var(--white) 100%); }
.hero__inner { display: grid; gap: 1.6rem; padding: 1.4rem 0 2.2rem; }
.hero__visual { position: relative; order: -1; }
.hero__media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.hero__badge { position: absolute; left: 12px; top: 12px; background: var(--white); border-radius: 14px; padding: .6rem .85rem; box-shadow: 0 14px 30px -14px rgba(19,41,75,.45); font-size: .82rem; }
.hero__badge p { margin: 0; color: var(--navy); }
.hero__badge strong { font-size: 1.05rem; }
.hero__badge-quote { display: none; }
.stars { color: #E9A23B; letter-spacing: .12em; font-size: .9rem; line-height: 1.2; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1rem; margin: 0; padding: 1.6rem 0 2.6rem; border-top: 1px solid var(--mint-line); }
.stats dt { font-family: var(--display); font-size: 1.8rem; font-weight: 600; color: var(--navy); line-height: 1.1; }
.stats dd { margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.status { display: inline-flex; align-items: center; gap: .55em; margin-bottom: 1rem; padding: .4em .9em; border-radius: 999px; background: var(--white); border: 1px solid var(--mint-line); font-size: .85rem; font-weight: 600; color: var(--navy-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9AA6B8; flex: none; }
.status.is-open .dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(31,163,154,.18); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 34rem; margin-top: 1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0 1.4rem; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; font-weight: 600; color: var(--navy-soft); }
.hero__facts li { display: flex; align-items: center; gap: .6em; }
.hero__facts li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Sections */
.section { padding: 4rem 0; }
.section--tint { background: var(--mint); }
.section--navy { background: var(--navy); color: #DCE4EF; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a { color: #7FD3CB; }
.section--navy .small { color: #A9B6C8; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .7rem; }
.eyebrow--light { color: #7FD3CB; }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; }
figure { margin: 0; }
figure img { border-radius: var(--radius); }

/* Conditions */
/* Where does it hurt */
.where { padding-top: 3rem; }
.where__grid { display: grid; gap: 1.2rem; }
.where__picker { display: flex; flex-wrap: wrap; gap: .5rem; align-content: start; }
.area-btn { padding: .65em 1.05em; border-radius: 999px; border: 1.5px solid var(--mint-line); background: var(--white); color: var(--navy); font: 700 .92rem var(--body); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.area-btn:hover { border-color: var(--teal); }
.area-btn[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.where__panel { display: grid; grid-template-columns: 78px 1fr; gap: 1.1rem; align-items: start; background: var(--mint); border-radius: 22px; padding: 1.3rem 1.2rem; }
.spine { width: 100%; height: auto; overflow: visible; }
.spine [data-p] { fill: #C3D5D9; stroke: #C3D5D9; transition: fill .35s, stroke .35s, transform .35s; transform-box: fill-box; transform-origin: center; }
.spine line[data-p] { fill: none; }
.spine rect[data-p], .spine circle[data-p], .spine path[data-p] { stroke: none; }
.spine .on { fill: var(--teal); stroke: var(--teal); }
.spine rect.on { transform: scaleX(1.15); }
.where__info h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin-bottom: .5rem; }
.where__info p { color: var(--navy-soft); }
.where__facts { display: grid; gap: .7rem; margin: 0 0 1.2rem; }
.where__facts dt { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); }
.where__facts dd { margin: .1rem 0 0; font-weight: 700; color: var(--navy); }
.where__info .btn { padding: .8em 1.2em; font-size: .92rem; }
.where__info.swap { animation: swap .35s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Treatments */
.treatments { display: grid; gap: 1rem; }
.treat { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--mint-line); border-radius: var(--radius); padding: 1.4rem; transition: transform .25s, box-shadow .25s; }
.treat:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(19,41,75,.4); }
.treat__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.treat__price { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--navy); white-space: nowrap; }
.treat__min { align-self: flex-start; display: inline-block; font-size: .8rem; font-weight: 700; color: var(--teal-dark); background: var(--mint); border-radius: 999px; padding: .2em .7em; margin-bottom: .7rem; }
.treat p { color: var(--muted); font-size: .95rem; flex: 1; }
.treat__book { align-self: flex-start; background: none; border: 0; padding: 0; font: 700 .95rem var(--body); color: var(--teal-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.treat--featured { border: 2px solid var(--teal); }
.treat__tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--teal-dark); color: var(--white); border-radius: 999px; padding: .3em .8em; margin-bottom: .8rem; }
.note { margin: 1.6rem 0 0; padding: 1rem 1.2rem; border-radius: 12px; background: var(--white); border: 1px dashed var(--teal); color: var(--navy-soft); }

/* First visit */
.visit1 { display: grid; gap: 2rem; align-items: center; }
.visit1__media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.steps { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: 1.1rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.2rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--teal-dark); font-weight: 800; }
.steps p { margin: .2rem 0 0; color: var(--muted); }

/* Team */
.team__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 30%; }
.team { display: grid; gap: 1rem; margin-top: 1.4rem; }
.person { background: var(--white); border-radius: var(--radius); padding: 1.2rem 1.3rem; border: 1px solid var(--mint-line); }
.person__role { font-size: .85rem; font-weight: 700; color: var(--teal-dark); margin: .15rem 0 .5rem; }
.person p:last-child { color: var(--muted); font-size: .94rem; margin: 0; }

/* Reviews */
.reviews__inner { display: grid; gap: 2rem; align-items: center; }
.reviews__media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.quotes { display: grid; gap: 1rem; margin-top: 1.2rem; }
blockquote { margin: 0; padding: 1.1rem 1.3rem; border-left: 3px solid var(--teal); background: var(--mint); border-radius: 0 12px 12px 0; }
blockquote .stars { margin-bottom: .4rem; }
blockquote p { margin: 0 0 .5rem; font-size: 1.02rem; }
cite { font-style: normal; font-size: .88rem; font-weight: 700; color: var(--muted); }

/* FAQ */
.faq__list { display: grid; gap: .7rem; max-width: 50rem; }
details { background: var(--white); border-radius: 14px; border: 1px solid var(--mint-line); }
summary { cursor: pointer; list-style: none; padding: 1.05rem 3rem 1.05rem 1.2rem; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--teal-dark); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 1.2rem 1.1rem; margin: 0; color: var(--muted); }

/* Appointment form */
.appt { display: grid; gap: 2rem; align-items: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 1.4rem; box-shadow: 0 24px 50px -30px rgba(19,41,75,.35); }
.field { margin: 0 0 1.15rem; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .45rem; padding: 0; }
.opt { font-weight: 500; color: var(--muted); }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; font: 500 1rem var(--body); color: var(--text); background: var(--white); border: 1.5px solid #CBD3DE; border-radius: 12px; padding: .8em .9em; }
select { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313294B' stroke-width='1.8'/%3E%3C/svg%3E") right .9em center / 12px no-repeat; padding-right: 2.4em; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,163,154,.2); }
textarea { resize: vertical; }
.row2 { display: grid; gap: 0 1rem; }
.seg, .pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.seg label, .pills label { margin: 0; font-weight: 600; font-size: .92rem; }
.seg input, .pills input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .pills span { display: inline-block; padding: .6em 1em; border-radius: 999px; border: 1.5px solid #CBD3DE; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.pills span { min-width: 3.4rem; text-align: center; }
.seg input:checked + span, .pills input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.seg input:focus-visible + span, .pills input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.form-error { color: var(--error); background: #FCEDEC; border-radius: 10px; padding: .7em .9em; font-weight: 600; font-size: .92rem; }
.done { text-align: center; padding: 1.5rem .5rem; }
.done__check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--teal-dark); font-size: 1.8rem; font-weight: 800; }
.done h3 { font-family: var(--display); font-size: 1.8rem; font-weight: 600; margin-bottom: .6rem; }
.done p { color: var(--muted); }
.done__demo { font-size: .88rem; background: #FFF6E0; color: #6B5100 !important; border-radius: 10px; padding: .6em .9em; }

/* Visit */
.visit { display: grid; gap: 2rem; }
.visit h3 { margin-bottom: 1rem; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.5rem; margin: 0; }
.hours dt { font-weight: 600; color: var(--white); }
.hours dd { margin: 0; text-align: right; }
.hours .today { color: #7FD3CB; font-weight: 800; }

/* Footer */
.footer { background: #0D1E38; color: #A9B6C8; padding: 2.6rem 0; }
.footer__inner { display: grid; gap: .6rem; justify-items: start; }
.footer img { height: 50px; width: auto; margin-bottom: .4rem; }
.footer p { margin: 0; }
.footer__small { font-size: .82rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .treat:hover { transform: none; }
  .where__info.swap { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet */
@media (min-width: 700px) {
  .treatments { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr 1fr; }
  .card { padding: 2rem; }
}

/* Desktop */
@media (min-width: 1000px) {
  .nav__inner { height: 80px; }
  .brand img { height: 48px; }
  .menu-btn, .nav__cta { display: none; }
  .nav__links { display: flex; gap: 2rem; margin-left: auto; }
  .nav__links a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
  .nav__links a:hover { color: var(--teal-dark); }
  .btn--nav { display: inline-flex; padding: .8em 1.3em; }
  html { scroll-padding-top: 80px; }
  .hero__inner { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3.5rem; padding: 4rem 0 4rem; }
  .hero__visual { order: 0; }
  .hero__media { aspect-ratio: 4 / 5; }
  .hero__badge { top: auto; left: -36px; bottom: 40px; max-width: 250px; padding: 1rem 1.2rem; font-size: .9rem; }
  .hero__badge-quote { display: block; margin-top: .4rem !important; color: var(--muted) !important; font-style: italic; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2.2rem 0 3.4rem; }
  .stats dt { font-size: 2.3rem; }
  .where { padding-top: 4.5rem; }
  .where__grid { grid-template-columns: 280px 1fr; gap: 2.5rem; }
  .where__picker { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .area-btn { text-align: left; padding: .9em 1.3em; font-size: 1rem; }
  .where__panel { grid-template-columns: auto 1fr; gap: 3rem; padding: 2.4rem 3rem; align-items: center; }
  .spine { width: auto; height: 400px; }
  .where__info { max-width: 34rem; }
  .section { padding: 6rem 0; }
  .visit1, .reviews__inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .visit1__media { order: 2; }
  .treatments { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(4, 1fr); }
  .appt { grid-template-columns: .85fr 1.15fr; gap: 4rem; }
  .appt__intro { position: sticky; top: 120px; }
  .visit { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
  .footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
  .footer img { margin: 0; }
}
