/* ==========================================================================
   TriTown Chiropractic Offices — Design System & Styles
   Self-contained. No build step required.
   ========================================================================== */

:root {
  /* Brand palette — matches live site: royal blue + turquoise teal */
  --brand: #2456b8;
  --brand-dark: #18386f;
  --brand-light: #4b7fd4;
  --brand-soft: #e9f0fb;
  --accent: #1fb5ad;
  --accent-dark: #17908a;

  /* Neutrals */
  --ink: #142a52;
  --body: #3c4a63;
  --muted: #6a778f;
  --line: #e1e8f2;
  --bg: #ffffff;
  --bg-soft: #eef4fc;
  --bg-deep: #1e4aa0;

  /* Effects */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(18, 32, 64, 0.06);
  --shadow: 0 10px 30px rgba(18, 32, 64, 0.10);
  --shadow-lg: 0 24px 60px rgba(18, 32, 64, 0.16);

  /* Layout */
  --container: 1160px;
  --gap: clamp(1rem, 3vw, 2rem);

  /* Type */
  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

p { color: var(--body); }

ul { padding-left: 1.1rem; }

:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--deep { background: var(--bg-deep); color: #d6e2f5; }
.section--deep h2, .section--deep h3 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: .75rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: .35rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.section--deep .eyebrow { color: #a9c6f5; background: rgba(255,255,255,.1); }

.grid { display: grid; gap: var(--gap); }
.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: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(31,181,173,.35); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(36,86,184,.3); }
.btn--brand:hover { background: var(--brand-dark); color: #fff; }

.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }

.btn--light { background: #fff; color: var(--brand-dark); }
.btn--light:hover { background: var(--brand-soft); color: var(--brand-dark); }

.btn--lg { padding: 1rem 1.9rem; font-size: 1.08rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brand-dark);
  color: #cfeae9;
  font-size: .88rem;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; justify-content: space-between; padding-block: .5rem; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: var(--accent); }
.topbar-items { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: .4rem; }
.topbar-item svg { width: 1em; height: 1em; opacity: .85; }
.topbar-social { display: flex; gap: .75rem; }
.topbar-social a svg { width: 1.05rem; height: 1.05rem; }
@media (max-width: 760px) {
  .topbar .container { justify-content: center; }
  .topbar-note { display: none; }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand img { width: 42px; height: 42px; }
.brand-text { font-family: var(--font-head); font-weight: 700; line-height: 1.05; color: var(--ink); font-size: 1.12rem; }
.brand-text span { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  padding: .55rem .8rem;
  border-radius: 999px;
  font-size: .98rem;
}
.nav a:hover, .nav a.active { color: var(--brand); background: var(--brand-soft); }

.nav-cta { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 3px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 340px);
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    background: #fff;
    padding: 5rem 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .nav.open { transform: translateX(0); }
  .nav a { font-size: 1.1rem; padding: .8rem 1rem; }
  .nav .nav-cta { flex-direction: column; align-items: stretch; margin-top: 1rem; }
  .nav .nav-cta .btn { width: 100%; justify-content: center; }
  body.nav-open { overflow: hidden; }
  .nav-scrim { position: fixed; inset: 0; background: rgba(10,61,61,.45); opacity: 0; visibility: hidden; transition: .3s; z-index: 49; }
  .nav-scrim.show { opacity: 1; visibility: visible; }
}
.nav .nav-cta { display: none; }
@media (max-width: 940px) { .nav .nav-cta { display: flex; } }

/* Header CTA visible on desktop only */
.header-cta { display: flex; }
@media (max-width: 940px) { .header-cta { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(31,181,173,.15), transparent 60%),
    linear-gradient(180deg, var(--brand-soft) 0%, #fff 80%);
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { color: var(--ink); }
.hero h1 .hl { color: var(--brand); }
.hero-lead { font-size: 1.15rem; color: var(--body); margin: 1.1rem 0 1.6rem; max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.8rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; color: var(--brand-dark); }
.hero-badge svg { width: 1.2rem; height: 1.2rem; color: var(--brand); flex: none; }

.hero-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.6rem;
  border: 1px solid var(--line);
}
.hero-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-visual svg { width: 60%; height: 60%; opacity: .92; }
.hero-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.2rem; }
.hero-quick div { background: var(--bg-soft); border-radius: 12px; padding: .8rem .9rem; }
.hero-quick span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.hero-quick strong { font-family: var(--font-head); color: var(--ink); font-size: 1rem; }

@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-card { max-width: 460px; margin-inline: auto; }
}

/* ---------- Info strip (hours / location / call) ---------- */
.info-strip { margin-top: -3rem; position: relative; z-index: 2; }
.info-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.info-card .ico { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.info-card .ico svg { width: 24px; height: 24px; }
.info-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.info-card p, .info-card a { font-size: .96rem; color: var(--body); }
.info-card a { font-weight: 600; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-light); }

.service-card .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.service-card .ico svg { width: 28px; height: 28px; }
.service-card h3 { margin-bottom: .5rem; }
.service-card p { font-size: .96rem; }
.service-card .more { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-head); font-weight: 600; margin-top: 1rem; font-size: .95rem; }
.service-card .more svg { width: 1em; height: 1em; transition: transform .2s ease; }
.service-card:hover .more svg { transform: translateX(3px); }

/* ---------- Conditions list ---------- */
.conditions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem 1.5rem; }
@media (max-width: 760px) { .conditions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .conditions { grid-template-columns: 1fr; } }
.conditions li { list-style: none; display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--ink); }
.conditions svg { width: 1.25rem; height: 1.25rem; color: var(--brand); flex: none; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.split-media {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  aspect-ratio: 5 / 4;
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); overflow: hidden;
}
.split-media svg { width: 55%; height: 55%; opacity: .9; }
.check-list { list-style: none; padding: 0; margin-top: 1.25rem; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
.check-list svg { width: 1.4rem; height: 1.4rem; color: var(--brand); flex: none; margin-top: .1rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 5vw, 2.8rem); color: #fff; }
.stat span { color: #b9cdf0; font-weight: 500; }

/* ---------- Testimonials ---------- */
.testimonial { display: flex; flex-direction: column; gap: 1rem; }
.testimonial .stars { color: #ffb400; display: flex; gap: .15rem; }
.testimonial .stars svg { width: 1.1rem; height: 1.1rem; }
.testimonial blockquote { font-size: 1.05rem; color: var(--ink); font-style: italic; }
.testimonial .who { display: flex; align-items: center; gap: .7rem; margin-top: auto; }
.testimonial .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.testimonial .who b { color: var(--ink); font-family: var(--font-head); }
.testimonial .who small { display: block; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(125deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe7fa; max-width: 56ch; margin: .8rem auto 1.6rem; }
.cta-band .hero-actions { justify-content: center; position: relative; z-index: 1; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: .8rem; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink);
  padding: 1.15rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-q .pm { flex: none; width: 24px; height: 24px; position: relative; transition: transform .25s; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--brand); border-radius: 2px; inset: 50% 0 auto 0; height: 3px; transform: translateY(-50%); }
.faq-q .pm::after { transform: translateY(-50%) rotate(90deg); transition: transform .25s; }
.faq-q[aria-expanded="true"] .pm::after { transform: translateY(-50%) rotate(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a div { padding: 0 1.3rem 1.2rem; color: var(--body); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(31,181,173,.18), transparent 60%),
    linear-gradient(180deg, var(--brand-soft), #fff);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--brand); font-weight: 600; }
.page-hero h1 { max-width: 18ch; }
.page-hero p { color: var(--body); font-size: 1.12rem; max-width: 60ch; margin-top: 1rem; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin: 2rem 0 .8rem; }
.prose h3 { margin: 1.6rem 0 .5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1.2rem; display: grid; gap: .5rem; }

/* ---------- Hours table ---------- */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { text-align: left; padding: .7rem .25rem; border-bottom: 1px solid var(--line); }
.hours-table th { font-family: var(--font-head); color: var(--ink); font-weight: 600; }
.hours-table td { color: var(--body); text-align: right; font-weight: 600; }
.hours-table tr.today { background: var(--brand-soft); }
.hours-table small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; gap: 1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }

/* ---------- Map ---------- */
.map-embed { border: 0; width: 100%; height: 100%; min-height: 320px; border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); color: #b9c8e2; padding: clamp(3rem, 6vw, 4.5rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer a { color: #b9c8e2; }
.site-footer a:hover { color: var(--accent); }
.footer-brand .brand-text, .footer-brand .brand-text span { color: #fff; }
.footer-brand p { color: #93a8cc; margin-top: 1rem; max-width: 34ch; font-size: .95rem; }
.footer-links { list-style: none; padding: 0; display: grid; gap: .6rem; font-size: .95rem; }
.footer-contact { display: grid; gap: .8rem; font-size: .95rem; }
.footer-contact div { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { width: 1.2rem; height: 1.2rem; color: var(--brand-light); flex: none; margin-top: .15rem; }
.footer-social { display: flex; gap: .7rem; margin-top: 1rem; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.footer-social a:hover { background: var(--accent); }
.footer-social svg { width: 1.2rem; height: 1.2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 3rem; padding: 1.5rem 0; font-size: .85rem; color: #8298bd; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Floating mobile call button ---------- */
.float-call {
  position: fixed; bottom: 18px; right: 18px; z-index: 60;
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: .9rem 1.3rem; font-family: var(--font-head); font-weight: 700;
  box-shadow: 0 10px 26px rgba(23,142,136,.5); display: none; align-items: center; gap: .5rem;
}
.float-call svg { width: 1.2rem; height: 1.2rem; }
.float-call:hover { color: #fff; background: var(--accent-dark); transform: translateY(-2px); }
@media (max-width: 940px) { .float-call { display: inline-flex; } }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.lead { font-size: 1.15rem; color: var(--body); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
