/* ============================================================
   Best Care Chiropractic — 10K-grade site
   Mobile-first, CSS custom properties, GSAP for kinetic-type
   Style: Function-Health system (style-library/library/function.md)
   Palette: parchment #fef9ef / aged paper #f5eee1 / ink #2a2b2f / terracotta #b05a36
   Fonts: 'Source Serif 4' display (Financier sub), 'Inter' UI (Ftbase sub),
          'IBM Plex Mono' micro-labels
   ============================================================ */

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

:root {
  /* Function-system mapping: --blue = terracotta accent, --navy = ink,
     --white = parchment canvas (never pure white), --off-wh = aged paper */
  --blue:    #b05a36;
  --blue-dk: #96482c;
  --navy:    #2a2b2f;
  --navy-2:  #232428;
  --white:   #fef9ef;
  --off-wh:  #f5eee1;
  --gray:    #515151;
  --gray-lt: #d1c9bf;
  --text:    #333333;

  /* type scale — 1.25 ratio */
  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-md:  1rem;
  --t-lg:  1.25rem;
  --t-xl:  1.563rem;
  --t-2xl: 1.953rem;
  --t-3xl: 2.441rem;
  --t-4xl: 3.052rem;
  --t-hero:clamp(2.2rem, 6vw, 5rem);

  /* spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 4rem;
  --sp-12: 6rem;
  --sp-16: 8rem;

  /* motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --dur-fast: 0.3s;
  --dur-med: 0.6s;
  --dur-slow: 0.9s;

  /* layout */
  --max-w: 1280px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-md);
  letter-spacing: -0.023em;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3,
.hero-headline, .page-title, .section-title, .cta-band-title,
.service-title, .service-detail-title, .contact-info-title,
.doctor-name, .value-card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dk); }

/* --- Utility --- */
.container {
  width: min(var(--max-w), 100% - 2 * var(--sp-4));
  margin-inline: auto;
}

.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;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(35, 36, 40, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(176, 90, 54, 0.28);
  transition: box-shadow var(--dur-fast) var(--ease-out-expo);
}

.site-nav.scrolled {
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--sp-3);
  align-items: center;
}

.nav-links a {
  font-size: var(--t-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: rgba(255,255,255,0.85);
  padding: var(--sp-1) 0;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out-expo);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width var(--dur-med) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--blue);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
  transition: background var(--dur-fast) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo);
}

.nav-cta:hover {
  background: var(--blue-dk) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none;
  cursor: pointer; padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease-out-expo),
              opacity var(--dur-fast) ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--navy-2);
  z-index: 99;
  padding: var(--sp-4);
  flex-direction: column;
  gap: var(--sp-3);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: var(--t-xl);
  color: var(--white);
  font-family: 'Source Serif 4', Georgia, serif;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-mobile a:hover { color: var(--blue); }

.nav-mobile-cta {
  display: inline-flex;
  align-items: center;
  background: var(--blue);
  color: var(--white) !important;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 9999px;
  font-weight: 600;
  font-size: var(--t-lg);
  margin-top: var(--sp-4);
  text-align: center;
  justify-content: center;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* ============================================================
   HERO (index only)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/image-1.jpg');
  background-size: cover;
  background-position: 40% center;
  filter: brightness(0.3) saturate(0.55) sepia(0.28);
  transform: scale(1.04);
  animation: hero-drift 20s ease-in-out infinite alternate;
}

@media (min-width: 640px) {
  .hero-bg { background-position: center 30%; }
}

@keyframes hero-drift {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1%, -0.5%); }
}

/* Gradient overlay: solid at bottom for readability */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(32,27,23,0.4) 0%,
    rgba(32,27,23,0.1) 40%,
    rgba(32,27,23,0.7) 80%,
    rgba(32,27,23,0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-h) + var(--sp-12)) 0 var(--sp-12);
  max-width: 800px;
}

/* Kinetic-type: lines hidden, revealed on load via GSAP */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--blue);
  margin-bottom: var(--sp-3);
  opacity: 0;
  transform: translateY(20px);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: var(--blue);
  flex-shrink: 0;
}

.hero-headline {
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: 0;
  margin-bottom: var(--sp-4);
  overflow: hidden;
}

/* Each line wrapped in .line-wrap for clip reveal */
.line-wrap {
  overflow: hidden;
  display: block;
}

.line-inner {
  display: block;
  transform: translateY(110%);
  /* GSAP will animate this to translateY(0) */
}

.hero-sub {
  font-size: var(--t-lg);
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: var(--sp-6);
  opacity: 0;
  transform: translateY(20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  opacity: 0;
  transform: translateY(20px);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  color: rgba(255,255,255,0.4);
  font-size: var(--t-xs);
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-drop 1.8s ease-in-out infinite;
}

@keyframes scroll-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: 40px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--t-md);
  letter-spacing: 0.04em;
  transition: background var(--dur-fast) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo),
              box-shadow var(--dur-fast) var(--ease-out-expo);
  border: 2px solid transparent;
}

.btn-primary:hover {
  background: var(--blue-dk);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: 40px;
  border: 2px solid rgba(255,255,255,0.4);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--t-md);
  transition: border-color var(--dur-fast) var(--ease-out-expo),
              color var(--dur-fast) var(--ease-out-expo),
              background var(--dur-fast) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--white);
  background: rgba(176,90,54,0.12);
  transform: translateY(-2px);
}

.btn-blue-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--blue);
  padding: 0.75rem 1.75rem;
  border-radius: 40px;
  border: 2px solid var(--blue);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--t-md);
  transition: background var(--dur-fast) var(--ease-out-expo),
              color var(--dur-fast) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo);
}

.btn-blue-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + var(--sp-12)) 0 var(--sp-10);
  background: var(--navy);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.24) saturate(0.5) sepia(0.28);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(32,27,23,0.9) 0%, rgba(176,90,54,0.35) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--blue);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.page-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 2px;
  background: var(--blue);
}

.page-title {
  font-size: clamp(2rem, 6vw, var(--t-4xl));
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0;
  line-height: 1.1;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section {
  padding: var(--sp-16) 0;
}

.section-sm {
  padding: var(--sp-8) 0;
}

.section-alt {
  background: var(--off-wh);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-mid {
  background: var(--navy-2);
  color: var(--white);
}

.section-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--blue);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-label::before {
  content: '';
  display: block;
  width: 32px; height: 2px;
  background: var(--blue);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, var(--t-3xl));
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: var(--sp-4);
}

.section-title--white { color: var(--white); }

.section-body {
  font-size: var(--t-lg);
  color: var(--gray);
  line-height: 1.75;
  max-width: 680px;
}

.section-body--white {
  color: rgba(255,255,255,0.72);
  max-width: none;
}

/* Reveal-on-scroll (IntersectionObserver) */
/* ponytail: CSS animation fallback ensures elements are always visible
   even if JS is slow or the observer never fires (static screenshots, no-JS) */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
  /* Fallback: if JS doesn't fire the reveal within 1.5s, show anyway */
  animation: reveal-fallback 0.01ms 1.5s forwards;
}

@keyframes reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }
[data-reveal-delay="6"] { transition-delay: 0.6s; }

/* ============================================================
   INDEX — SERVICES OVERVIEW
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: 24px;
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out-expo),
              box-shadow var(--dur-med) var(--ease-out-expo),
              border-color var(--dur-med) var(--ease-out-expo);
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out-expo);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 12px 32px 80px rgba(42,43,47,0.1);
  border-color: rgba(176,90,54,0.2);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 52px; height: 52px;
  background: rgba(176,90,54,0.08);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  color: var(--blue);
}

.service-icon svg {
  width: 28px; height: 28px;
  stroke: var(--blue);
  fill: none;
}

.service-title {
  font-size: clamp(1.1rem, 3vw, var(--t-xl));
  font-weight: 500;
  margin-bottom: var(--sp-2);
  color: var(--navy);
  line-height: 1.3;
}

.service-desc {
  font-size: var(--t-md);
  color: var(--gray);
  line-height: 1.65;
}

/* ============================================================
   INDEX — TRUST BAR
   ============================================================ */
.trust-bar {
  background: var(--navy);
  padding: var(--sp-6) 0;
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  justify-content: center;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.8);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  letter-spacing: 0.02em;
}

.trust-item svg {
  width: 20px; height: 20px;
  color: var(--blue);
  flex-shrink: 0;
}

.trust-divider {
  width: 1px; height: 24px;
  background: rgba(255,255,255,0.15);
}

@media (max-width: 640px) {
  .trust-divider { display: none; }
}

/* ============================================================
   INDEX — TWO-COL INTRO
   ============================================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: center;
}

@media (min-width: 840px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-12);
  }
}

.intro-img-wrap {
  position: relative;
}

.intro-img-wrap img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 24px;
}

.intro-img-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--blue);
  color: var(--white);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 16px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-sm);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  box-shadow: 12px 32px 80px rgba(42,43,47,0.1);
}

.intro-img-badge strong {
  display: block;
  font-size: var(--t-3xl);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

@media (max-width: 640px) {
  .intro-img-badge { right: var(--sp-2); bottom: var(--sp-2); }
}

/* ============================================================
   INDEX — GALLERY STRIP
   ============================================================ */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

@media (min-width: 640px) {
  .gallery-strip { grid-template-columns: repeat(4, 1fr); }
}

.gallery-strip-item {
  aspect-ratio: 1;
  overflow: hidden;
}

.gallery-strip-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out-expo),
              filter var(--dur-med) var(--ease-out-expo);
  filter: brightness(0.9);
}

.gallery-strip-item:hover img {
  transform: scale(1.06);
  filter: brightness(1);
}

/* ============================================================
   INDEX — CTA BAND
   ============================================================ */
.cta-band {
  background: var(--navy);
  padding: var(--sp-12) 0;
  text-align: center;
}

.cta-band-title {
  font-size: var(--t-3xl);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0;
  margin-bottom: var(--sp-2);
}

.cta-band-sub {
  font-size: var(--t-lg);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--sp-6);
}

.cta-band .btn-ghost {
  border-color: rgba(255,255,255,0.6);
}

/* ============================================================
   INDEX — HOURS + CONTACT STRIP
   ============================================================ */
.contact-strip {
  background: var(--navy-2);
  padding: var(--sp-12) 0;
}

.contact-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 768px) {
  .contact-strip-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.contact-block-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--sp-2);
}

.contact-block-val {
  color: rgba(255,255,255,0.9);
  font-size: var(--t-md);
  line-height: 1.8;
}

.contact-block-val a {
  color: rgba(255,255,255,0.9);
  font-size: var(--t-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.contact-block-val a:hover { color: var(--blue); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}

@media (min-width: 840px) {
  .about-intro-grid {
    grid-template-columns: 380px 1fr;
    gap: var(--sp-12);
  }
}

.doctor-card {
  background: var(--off-wh);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--gray-lt);
}

.doctor-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.doctor-card-body {
  padding: var(--sp-4);
}

.doctor-name {
  font-size: var(--t-xl);
  font-weight: 500;
  color: var(--navy);
  margin-bottom: var(--sp-1);
}

.doctor-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-body {
  font-size: var(--t-md);
  color: var(--gray);
  line-height: 1.8;
}

.about-body p + p { margin-top: var(--sp-3); }

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .values-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}

.value-card {
  padding: var(--sp-4);
  border-left: 3px solid var(--blue);
  background: rgba(176,90,54,0.04);
  border-radius: 0 16px 16px 0;
}

.value-card-title {
  font-size: var(--t-lg);
  font-weight: 500;
  color: var(--navy);
  margin-bottom: var(--sp-1);
}

.value-card-desc {
  font-size: var(--t-sm);
  color: var(--gray);
  line-height: 1.7;
}

/* Office photos — 2-col masonry-ish */
.office-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.office-photos img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
}

.office-photos img:first-child {
  grid-column: 1 / -1;
  height: 360px;
}

/* ============================================================
   SERVICES PAGE
   ============================================================ */
.services-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.service-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}

@media (min-width: 840px) {
  .service-detail { grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
  .service-detail.reversed .service-detail-img { order: 2; }
  .service-detail.reversed .service-detail-text { order: 1; }
}

.service-detail-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 24px;
}

.service-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
  margin-bottom: var(--sp-2);
  display: block;
  letter-spacing: 0.08em;
}

.service-detail-title {
  font-size: var(--t-2xl);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: 0;
  margin-bottom: var(--sp-3);
}

.service-detail-body {
  font-size: var(--t-md);
  color: var(--gray);
  line-height: 1.8;
}

.service-detail-body p + p { margin-top: var(--sp-3); }

.service-list-items {
  margin: var(--sp-4) 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.service-list-items li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--t-md);
  color: var(--gray);
}

.service-list-items li::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 0.55rem;
}

.service-divider {
  height: 1px;
  background: var(--gray-lt);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1.4fr; }
}

.contact-info-block {
  background: var(--navy);
  color: var(--white);
  padding: var(--sp-8) var(--sp-6);
  border-radius: 24px;
}

.contact-info-title {
  font-size: var(--t-2xl);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-6);
  letter-spacing: 0;
}

.contact-info-row {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  align-items: flex-start;
}

.contact-info-icon {
  width: 40px; height: 40px;
  border-radius: 9999px;
  background: rgba(176,90,54,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.contact-info-icon svg { width: 20px; height: 20px; }

.contact-info-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--sp-1);
}

.contact-info-text {
  color: rgba(255,255,255,0.85);
  font-size: var(--t-md);
  line-height: 1.7;
}

.contact-info-text a {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: var(--t-xl);
}

.contact-info-text a:hover { color: var(--blue); }

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hours-table td {
  padding: 0.5rem 0;
  color: rgba(255,255,255,0.8);
  font-size: var(--t-sm);
}

.hours-table td:last-child {
  text-align: right;
  color: rgba(255,255,255,0.6);
}

.hours-table tr:last-child { border-bottom: none; }

.contact-map {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 12px 32px 80px rgba(42,43,47,0.1);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: none;
}

/* Insurance accepted */
.insurance-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.insurance-pill {
  background: rgba(176,90,54,0.12);
  color: var(--blue);
  font-family: 'Inter', system-ui, sans-serif;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  border: 1px solid rgba(176,90,54,0.25);
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--gray-lt);
}

.gallery-item.tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out-expo),
              filter var(--dur-med) var(--ease-out-expo);
  filter: brightness(0.92);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-2);
  border-top: 1px solid rgba(176,90,54,0.2);
  padding: var(--sp-12) 0 var(--sp-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  color: rgba(255,255,255,0.55);
  font-size: var(--t-sm);
  line-height: 1.75;
  margin-top: var(--sp-3);
  max-width: 320px;
}

.footer-brand img {
  height: 40px;
  width: auto;
}

.footer-col-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--sp-3);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: var(--t-sm);
  transition: color var(--dur-fast) ease;
}

.footer-links a:hover { color: var(--white); }

.footer-info {
  color: rgba(255,255,255,0.6);
  font-size: var(--t-sm);
  line-height: 1.8;
}

.footer-info a {
  color: var(--blue);
  font-weight: 600;
}

.footer-info a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.35);
  font-size: var(--t-xs);
  font-family: 'Inter', system-ui, sans-serif;
}

.footer-bottom a {
  color: rgba(176,90,54,0.7);
}

.footer-bottom a:hover { color: var(--blue); }

/* ============================================================
   MOBILE STICKY CTA
   ============================================================ */
.mobile-sticky {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 80;
  background: var(--navy);
  border-top: 1px solid rgba(176,90,54,0.3);
}

.mobile-sticky a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: var(--sp-3);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
  color: var(--white);
  transition: background var(--dur-fast) ease;
}

.mobile-sticky a:first-child { background: var(--blue); }
.mobile-sticky a:first-child:hover { background: var(--blue-dk); }
.mobile-sticky a:last-child { color: rgba(255,255,255,0.8); }
.mobile-sticky a:last-child:hover { background: rgba(255,255,255,0.06); }
.mobile-sticky a svg { width: 18px; height: 18px; }

@media (min-width: 768px) {
  .mobile-sticky { display: none; }
}

/* Add bottom padding on mobile to clear sticky bar */
@media (max-width: 767px) {
  body { padding-bottom: 56px; }
}

/* ============================================================
   MISC COMPONENTS
   ============================================================ */
.divider {
  width: 60px; height: 1px;
  background: var(--gray-lt);
  margin: var(--sp-4) 0;
}

.text-center { text-align: center; }
.text-center .section-label { justify-content: center; }
.text-center .section-label::before { display: none; }
.text-center .divider { margin-inline: auto; }
.text-center .section-body { margin-inline: auto; }

.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }

/* ============================================================
   PRINT / reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Octopuss preview: keep the hero CTA clear of the fixed claim bar --- */
@media (min-width: 900px){
  .hero{ min-height: calc(100svh - 84px); padding-bottom:46px; }
  /* headline is authored as two lines; 800px forced it to wrap to three */
  .hero-content{ max-width: 940px; padding-top: calc(var(--nav-h) + 24px); padding-bottom:24px; }
}

/* ============================================================
   FUNCTION-STYLE ADDITIONS (style-library transplant 2026-07-31)
   ============================================================ */

/* Signature effect: blueprint dot grid w/ radial vignette (aceternity-effects.md,
   pure CSS, alpha <=8% so text contrast is unaffected) */
.section-alt { position: relative; }
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(42,43,47,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 72%);
  pointer-events: none;
}
.section-alt > .container { position: relative; }

/* Hero entrance fallback: if GSAP never loads, reveal at 1.8s (no-JS complete state).
   index.html adds html.gsap-ok when GSAP is driving, which disables these. */
.hero-eyebrow, .hero-sub, .hero-actions { animation: reveal-fallback 0.01ms 1.8s forwards; }
.line-inner { animation: line-fallback 0.01ms 1.8s forwards; }
@keyframes line-fallback { to { transform: translateY(0); } }
html.gsap-ok .hero-eyebrow, html.gsap-ok .hero-sub,
html.gsap-ok .hero-actions, html.gsap-ok .line-inner { animation: none; }
