/* ==========================================================================
   Component Styles + Bootstrap Variable Overrides
   ==========================================================================
   Every visual value references a token from tokens.css.
   Zero hardcoded colors, fonts, spacing, shadows, or radii.
   ========================================================================== */

/* ------------------------------------------------------------------
   Bootstrap CSS Variable Overrides
   These override Bootstrap 5.3's CSS custom properties with our tokens.
   ------------------------------------------------------------------ */
:root {
  --bs-body-font-family: var(--font-body);
  --bs-body-font-size: var(--font-size-base);
  --bs-body-color: var(--color-text);
  --bs-body-bg: var(--color-background);
  --bs-link-color: var(--color-primary);
  --bs-link-hover-color: var(--color-primary-dark);
  --bs-border-color: var(--color-border);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
}

/* ------------------------------------------------------------------
   Base Body
   Subtle warm tinted noise on the page background to add texture
   without fighting readability. Pure flat backgrounds read sterile.
   ------------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  /* Layered backgrounds (top → bottom):
     1. SVG fractal noise — paper-grain texture for Editorial Luxury feel.
     2. Cool primary radial — top-right warmth-counterpoint.
     3. Warm radial — bottom-left earthen anchor.
     Layered directly on body to avoid pseudo-element z-index conflicts
     with sticky navbar dropdowns. */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.27 0 0 0 0 0.16 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    radial-gradient(
      ellipse 80rem 50rem at 100% -10%,
      rgba(var(--rgb-primary), 0.03),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60rem 40rem at -10% 30%,
      rgba(var(--rgb-warm), 0.025),
      transparent 60%
    );
  background-size: 240px 240px, auto, auto;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular figures for data; balanced wraps for headings. */
:where(time, [data-numeric]) {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Inline SVG icons (rendered via partials/icon.ejs).
   Sized in em so they scale with surrounding font-size; color
   inherits via currentColor. align-items: center on flex parents
   pairs them cleanly with adjacent text.
   ------------------------------------------------------------------ */
.icon {
  display: inline-block;
  vertical-align: -0.125em;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Headings
   Heavier weight, tighter tracking, balanced wrapping for presence.
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

h1, .h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: var(--tracking-tight);
}

h2, .h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: var(--tracking-tight);
}

h3, .h3 {
  font-size: var(--font-size-2xl);
}

h4, .h4 {
  font-size: var(--font-size-xl);
}

h5, .h5 {
  font-size: var(--font-size-lg);
}

h6, .h6 {
  font-size: var(--font-size-base);
}

/* Body paragraphs read better with constrained measure and pretty wrap. */
p {
  text-wrap: pretty;
}

.lead {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
  letter-spacing: var(--tracking-snug);
  line-height: var(--line-height-loose);
}

/* Small caps editorial label, used on section eyebrows. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

/* Constrain prose for readability where used. */
.prose,
.prose p {
  max-width: var(--measure-prose);
}

/* ------------------------------------------------------------------
   Links
   ------------------------------------------------------------------ */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ------------------------------------------------------------------
   Skip link – appears only on keyboard focus.
   ------------------------------------------------------------------ */
.skip-link:focus {
  background-color: var(--color-primary-dark);
  color: var(--color-surface);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------
   Navbar Color Tokens
   The actual background, border, blur are owned by .nav-island below
   so the bar-to-pill morph can interpolate them cleanly. We only set
   the Bootstrap color tokens here.
   ------------------------------------------------------------------ */
.navbar {
  --bs-navbar-color: var(--color-text);
  --bs-navbar-hover-color: var(--color-primary);
  --bs-navbar-active-color: var(--color-primary);
  --bs-navbar-brand-color: var(--color-primary-dark);
  --bs-navbar-brand-hover-color: var(--color-primary);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-snug);
}

.nav-link {
  font-weight: var(--font-weight-medium);
  position: relative;
  transition: color var(--transition-fast);
}

/* Underline-grow on hover/focus for primary nav links. */
.navbar .nav-item > .nav-link::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: calc(var(--space-1) * -0.5);
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition-normal);
  border-radius: var(--radius-full);
}

.navbar .nav-item > .nav-link:hover::after,
.navbar .nav-item > .nav-link:focus-visible::after,
.navbar .nav-item > .nav-link.active::after {
  transform: scaleX(1);
}

.dropdown-menu {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--color-surface-tinted);
  color: var(--color-primary-dark);
}

/* ------------------------------------------------------------------
   Buttons
   Pill geometry, haptic press feedback, custom editorial easing.
   Large primary buttons (.btn-primary.btn-lg) carry a nested
   trailing arrow ("button-in-button") via ::after — zero markup
   churn across pages.
   ------------------------------------------------------------------ */
.btn {
  font-family: var(--font-body);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-snug);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  transition:
    background-color var(--transition-normal),
    border-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform 250ms var(--ease-editorial);
  will-change: transform;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: var(--color-primary-dark);
  --bs-btn-hover-border-color: var(--color-primary-dark);
  --bs-btn-active-bg: var(--color-primary-deep);
  --bs-btn-active-border-color: var(--color-primary-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 16px -8px rgba(var(--rgb-primary-dark), 0.25);
}

.btn-primary:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 24px -10px rgba(var(--rgb-primary-dark), 0.35);
}

.btn-outline-primary {
  --bs-btn-color: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: var(--color-primary);
  --bs-btn-hover-border-color: var(--color-primary);
  --bs-btn-active-bg: var(--color-primary-dark);
  --bs-btn-active-border-color: var(--color-primary-dark);
}

.btn-secondary {
  --bs-btn-bg: var(--color-secondary);
  --bs-btn-border-color: var(--color-secondary);
  --bs-btn-hover-bg: var(--color-secondary);
  --bs-btn-hover-border-color: var(--color-secondary);
}

/* ------------------------------------------------------------------
   "Button-in-button" trailing arrow
   Applied automatically to .btn-primary.btn-lg. The arrow lives in
   a circular well flush with the right edge — translates and
   brightens on hover, simulating physical kinetic tension.
   ------------------------------------------------------------------ */
.btn-primary.btn-lg {
  position: relative;
  padding: var(--space-3) calc(var(--space-12) + var(--space-3)) var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-primary.btn-lg::after {
  content: "";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.16);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  transition:
    background-color var(--transition-normal),
    transform 350ms var(--ease-editorial);
}

.btn-primary.btn-lg:hover::after {
  background-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) translateX(3px);
}

.btn-primary.btn-lg:active::after {
  transform: translateY(-50%) translateX(1px) scale(0.96);
}

/* ------------------------------------------------------------------
   Underlined text link — used as the secondary CTA anywhere a
   primary action is the dominant choice. Replaces the visual
   weight of a second outline button without losing affordance.
   ------------------------------------------------------------------ */
.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--color-primary-dark);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.15em;
}

.btn-text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: currentColor;
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform 450ms var(--ease-editorial);
}

.btn-text-link:hover {
  color: var(--color-primary);
}

.btn-text-link:hover::after {
  transform-origin: left center;
  transform: scaleX(0.4);
}

/* ------------------------------------------------------------------
   Cards
   Default chrome — used for non-bezel cards (callout, blog, etc.).
   Specialty cards extend this with the double-bezel pattern below.
   ------------------------------------------------------------------ */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition:
    box-shadow var(--transition-normal),
    transform var(--transition-normal),
    border-color var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.card-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-3);
}

/* ------------------------------------------------------------------
   Sections & Vertical Rhythm
   Macro-whitespace: fluid clamp so mobile breathes without losing
   the editorial cadence on desktop.
   ------------------------------------------------------------------ */
.section {
  padding-top: clamp(var(--space-16), 9vw, var(--space-32));
  padding-bottom: clamp(var(--space-16), 9vw, var(--space-32));
}

.section-lg {
  padding-top: clamp(var(--space-20), 12vw, calc(var(--space-32) + var(--space-8)));
  padding-bottom: clamp(var(--space-20), 12vw, calc(var(--space-32) + var(--space-8)));
}

.section--tinted {
  background-color: var(--color-surface-tinted);
}

.section--warm {
  background-color: var(--color-background-warm);
}

.section-header {
  margin-bottom: var(--space-16);
  text-align: center;
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------------
   Container
   ------------------------------------------------------------------ */
.container {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* ------------------------------------------------------------------
   Utility: Background Variants
   ------------------------------------------------------------------ */
.bg-surface {
  background-color: var(--color-surface);
}

.bg-primary-light {
  background-color: var(--color-primary-light);
}

.text-accent {
  color: var(--color-accent);
}

.text-primary-dark {
  color: var(--color-primary-dark);
}

.text-muted-light {
  color: var(--color-text-light);
}

/* ------------------------------------------------------------------
   Editorial Utilities
   Pulls the most-repeated inline-style combos out of EJS pages so
   markup stays sparse and the system stays consistent.
   ------------------------------------------------------------------ */

/* Body lead paragraphs — used on hero subheads and section intros. */
.prose-lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  line-height: var(--line-height-loose);
  max-width: 42rem;
}

/* Long-form body paragraphs — generous size + line-height for read flow. */
.prose-body {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-loose);
}

/* Vertical rhythm utilities. */
.stack-y-md > * + * { margin-top: var(--space-6); }
.stack-y-lg > * + * { margin-top: var(--space-10); }

/* Editorial callout — hairline border, no colored slab. */
.callout {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-10);
  text-align: center;
}

.callout > * + * {
  margin-top: var(--space-4);
}

.callout--bare {
  background: transparent;
  border: 0;
}

/* About-page editorial sections — vertical rhythm between blocks. */
.about-block + .about-block,
.about-block + .callout {
  margin-top: var(--space-10);
}

.about-block > h2 {
  margin-bottom: var(--space-4);
}

/* Definition-list pattern — hairline-divided rows, no card chrome.
   Used for credentials, fee schedules, and other metadata stacks. */
.dl-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dl-rows > li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-soft);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.dl-rows > li:last-child {
  border-bottom: 0;
}

.dl-rows .icon {
  color: var(--color-primary);
  flex-shrink: 0;
  font-size: 1.1em;
}

/* Section-eyebrow header (eyebrow + heading + lede) inside a column. */
.eyebrow-block .eyebrow {
  margin-bottom: var(--space-3);
}

/* Contact page — location card spacing + map frame. */
.location-card > * + * {
  margin-top: var(--space-2);
}

.location-card h2 {
  margin-bottom: var(--space-4);
}

.location-card .map-frame {
  margin-top: var(--space-4);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
}

.location-card .map-frame iframe {
  display: block;
  border: 0;
}

.contact-actions {
  margin-top: var(--space-4);
}

.contact-action {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  letter-spacing: var(--tracking-snug);
}

.contact-action--social {
  font-size: var(--font-size-xl);
}

/* Small italic note used under fee tables, contact form, etc. */
.form-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-style: italic;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

/* Form success/error states injected by inline script. */
.form-success {
  text-align: center;
  padding: var(--space-8) 0;
}

/* ------------------------------------------------------------------
   Footer
   Layered tints + softer divider.
   ------------------------------------------------------------------ */
.footer {
  background-color: var(--color-primary-dark);
  background-image:
    radial-gradient(
      ellipse 60rem 30rem at 80% 0%,
      rgba(255, 255, 255, 0.05),
      transparent 70%
    );
  color: var(--color-surface);
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

.footer a {
  color: var(--color-footer-link);
  transition: color var(--transition-fast);
}

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

.footer-brand {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-surface);
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-4);
}

.footer-heading {
  color: var(--color-surface);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-4);
}

.footer-meta {
  color: var(--color-primary-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.footer-phone {
  font-weight: var(--font-weight-semibold);
}

.footer-social {
  font-size: var(--font-size-sm);
  margin-top: var(--space-4);
  margin-bottom: 0;
}

.footer-links {
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-notice {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-primary-light);
}

.footer-notice:last-child {
  margin-bottom: 0;
}

.footer-notice p {
  margin-bottom: 0;
}

.footer-notice-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2) !important;
}

.footer-rule {
  border-color: rgba(255, 255, 255, 0.15);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.footer-fineprint p {
  font-size: var(--font-size-sm);
  color: var(--color-primary-light);
  margin-bottom: 0;
}

/* ------------------------------------------------------------------
   Hero Section
   Editorial gravity: eyebrow tag, oversized display H1, lede,
   primary CTA + text-link secondary, double-bezel portrait frame.
   ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
  background-color: var(--color-background);
  background-image:
    radial-gradient(
      ellipse 70rem 40rem at 105% 20%,
      rgba(var(--rgb-primary), 0.10),
      transparent 60%
    ),
    radial-gradient(
      ellipse 50rem 30rem at -10% 90%,
      rgba(var(--rgb-warm), 0.07),
      transparent 60%
    );
  overflow: hidden;
}

/* Pill-shaped location tag — replaces the old uppercase lead text. */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background-color: rgba(var(--rgb-primary), 0.08);
  border: 1px solid rgba(var(--rgb-primary), 0.15);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-8);
}

.hero-tag-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(68, 171, 137, 0.18);
}

.hero h1.hero-display {
  font-size: var(--font-size-5xl);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-6);
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-weight: var(--font-weight-bold);
  max-width: 18ch;
}

.hero-lede {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  line-height: var(--line-height-loose);
  max-width: 38rem;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}

/* Double-bezel headshot frame.
   Outer tray — warm cream, hairline ring, ambient diffused shadow.
   Inner core — flush content, concentric radius via calc(). */
.hero-portrait {
  position: relative;
  display: inline-block;
  padding: var(--space-3);
  border-radius: calc(var(--radius-xl) + var(--space-3));
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(var(--rgb-warm), 0.04) 100%
  );
  background-color: var(--color-surface-warm);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 30px 60px -20px rgba(var(--rgb-primary-dark), 0.18),
    0 12px 24px -12px rgba(var(--rgb-warm), 0.16);
  border: 1px solid rgba(var(--rgb-warm), 0.12);
}

.hero-portrait-inner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgba(var(--rgb-primary-dark), 0.05);
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
}

@media (min-width: 992px) {
  .hero-portrait {
    transform: rotate(0.5deg);
  }
}

/* Tablet/mobile: full-bleed reset, slightly smaller display, tighter rhythm. */
@media (max-width: 992px) {
  .hero {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
  .hero h1.hero-display {
    font-size: var(--font-size-4xl);
  }
  .hero-portrait {
    transform: none;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
  .hero h1.hero-display {
    font-size: var(--font-size-3xl);
    max-width: none;
  }
  .hero-tag {
    margin-bottom: var(--space-6);
  }
  .hero-lede {
    margin-bottom: var(--space-8);
  }
}

/* About-page headshot — same restraint as hero portrait, sidebar-sized. */
.about-headshot {
  width: 100%;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------
   Trust Signals Strip
   Bare icon + label, no badge container. Hairline divider between
   columns on desktop reads as a professional-services strip.
   ------------------------------------------------------------------ */
.trust-signals {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  text-align: center;
}

.trust-signals .icon {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  display: block;
  margin: 0 auto var(--space-2);
}

.trust-signals p {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: 0;
  letter-spacing: var(--tracking-snug);
}

@media (min-width: 768px) {
  .trust-signals .row > [class*="col-"]:not(:last-child) {
    border-right: 1px solid var(--color-border-soft);
  }
}

/* ------------------------------------------------------------------
   Specialty Cards — Double-Bezel architecture
   Outer tray (warm cream, hairline ring, ambient shadow) + inner
   core (white surface, inset highlight, concentric radius). Magnetic
   hover physics — card scales 1.005, icon well shifts and brightens,
   arrow translates with kinetic tension.

   Featured variant (Serious Illness, College Exploration) uses a
   warm cream inner core and a deeper warm tray to read as the
   practice's signature offerings — a real visual hierarchy, not a
   sticker badge.
   ------------------------------------------------------------------ */
.specialty-card {
  position: relative;
  height: 100%;
  background-color: var(--color-surface-warm);
  border: 1px solid rgba(var(--rgb-warm), 0.10);
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 24px -16px rgba(var(--rgb-primary-dark), 0.12);
  transition:
    transform 500ms var(--ease-editorial),
    box-shadow 500ms var(--ease-editorial),
    border-color var(--transition-normal);
}

.specialty-card .card-body {
  position: relative;
  text-align: left;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-8);
  background-color: var(--color-surface);
  border-radius: calc(var(--radius-xl) - var(--space-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  height: 100%;
}

.specialty-card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 24px 40px -20px rgba(var(--rgb-primary-dark), 0.20);
  border-color: rgba(var(--rgb-warm), 0.18);
}

/* Circular icon well — replaces the old square tile. */
.specialty-card .specialty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent-soft);
  color: var(--color-primary-dark);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition:
    background-color 400ms var(--ease-editorial),
    color 400ms var(--ease-editorial),
    transform 400ms var(--ease-editorial),
    box-shadow 400ms var(--ease-editorial);
}

.specialty-card .specialty-icon .icon {
  stroke-width: 1.25;
}

.specialty-card:hover .specialty-icon {
  background-color: var(--color-primary);
  color: var(--color-surface);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 14px -6px rgba(var(--rgb-primary-dark), 0.30);
}

.specialty-card .card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

.specialty-card p {
  color: var(--color-text-light);
  margin-bottom: var(--space-6);
}

.specialty-card .card-link {
  margin-top: auto;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: var(--tracking-snug);
}

/* Arrow lives in markup as a span so it doesn't collide with
   .stretched-link::after click-overlay pseudo-element. */
.card-link-arrow {
  display: inline-block;
  transition: transform 400ms var(--ease-editorial);
}

.specialty-card:hover .card-link-arrow {
  transform: translateX(6px);
}

/* Featured badge — small pill anchored to inner core. */
.specialty-card .badge {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background-color: var(--color-secondary);
  color: var(--color-surface);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 0.3rem var(--space-3);
  border-radius: var(--radius-full);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

/* Featured variant — warm cream inner core, walnut-toned outer tray.
   Reads as the priority specialty pair, not as "regular card with a sticker." */
.specialty-card--dignified {
  background-color: var(--color-secondary-soft);
  border-color: rgba(var(--rgb-secondary), 0.18);
}

.specialty-card--dignified .card-body {
  background-color: var(--color-surface-warm);
}

.specialty-card--dignified .specialty-icon {
  background-color: var(--color-primary-dark);
  color: var(--color-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px -4px rgba(var(--rgb-primary-dark), 0.25);
}

.specialty-card--dignified:hover .specialty-icon {
  background-color: var(--color-primary);
}

.specialty-card--dignified .card-title {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------
   Bento Grid — asymmetric specialty layout.
   With 2 featured + 4 regular cards, features span twice the width
   so the priority specialties read as a banner pair, and the four
   supporting specialties form a clean row beneath.
     - mobile:  1 col, single-file stack
     - md:      2 cols, features = full-bleed pair
     - lg+:     4 cols, features = span 2 each; regulars = span 1
   ------------------------------------------------------------------ */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
  .bento > .bento-feature {
    grid-column: span 2;
  }
}

@media (min-width: 992px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .bento > * {
    grid-column: span 1;
  }
  .bento > .bento-feature {
    grid-column: span 2;
  }
}

/* Cards inside the bento grid fill their cell. */
.bento > .card {
  height: 100%;
}

/* ------------------------------------------------------------------
   Testimonials
   Subtle tinted backdrop; quote mark in accent color.
   ------------------------------------------------------------------ */
.testimonials {
  background-color: var(--color-surface-tinted);
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.testimonial-quote {
  font-style: italic;
  font-size: var(--font-size-lg);
  color: var(--color-text);
  position: relative;
  padding: var(--space-6) var(--space-2) var(--space-2) var(--space-10);
  line-height: var(--line-height-loose);
}

.testimonial-quote::before {
  content: "\201C";
  font-family: var(--font-heading);
  font-size: 4.5rem;
  color: var(--color-accent);
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
}

.testimonial-quote p:last-child {
  font-style: normal;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: var(--space-4);
}

/* ------------------------------------------------------------------
   Focus Indicators (Accessibility)
   Tinted ring for keyboard users; never removed.
   ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.btn:focus-visible {
  outline-offset: 4px;
}

/* ------------------------------------------------------------------
   Subtle entry animation – respects reduced motion via tokens.
   ------------------------------------------------------------------ */
@keyframes ta-fade-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag,
.hero h1,
.hero-lede,
.hero-actions,
.hero-portrait {
  animation: ta-fade-rise var(--duration-editorial) var(--ease-editorial) both;
}

.hero-tag      { animation-delay: 60ms; }
.hero h1       { animation-delay: 140ms; }
.hero-lede     { animation-delay: 220ms; }
.hero-actions  { animation-delay: 320ms; }
.hero-portrait { animation-delay: 180ms; }

/* ------------------------------------------------------------------
   Responsive Adjustments
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  h1, .h1 {
    font-size: var(--font-size-3xl);
  }

  h2, .h2 {
    font-size: var(--font-size-2xl);
  }

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-20);
  }

  .section-lg {
    padding-top: var(--space-20);
    padding-bottom: var(--space-24);
  }

  .card-body,
  .specialty-card .card-body {
    padding: var(--space-6);
  }
}

/* ------------------------------------------------------------------
   Section image divider — framed photographic frames that punctuate
   the home page between content sections. Double-bezel construction:
   the outer .divider-frame is a warm cream tray with a hairline ring
   and ambient diffused shadow; the inner .divider-frame__inner is
   the museum print, concentric radius via calc(). Reads as a framed
   artifact, not a bleed banner.
   ------------------------------------------------------------------ */
.image-divider {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.divider-frame {
  position: relative;
  margin: 0;
  padding: var(--space-3);
  border-radius: calc(var(--radius-xl) + var(--space-3));
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(var(--rgb-warm), 0.04) 100%
  );
  background-color: var(--color-surface-warm);
  border: 1px solid rgba(var(--rgb-warm), 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 30px 60px -24px rgba(var(--rgb-primary-dark), 0.18),
    0 12px 28px -16px rgba(var(--rgb-warm), 0.18);
}

.divider-frame__inner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgba(var(--rgb-primary-dark), 0.06);
  aspect-ratio: 16 / 6;
}

.divider-frame__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0;
  transition: opacity 1200ms var(--ease-editorial);
  will-change: opacity;
}

.divider-frame__slide.is-active {
  opacity: 1;
}

/* Editorial filter presets applied via data attribute on each slide. */
.divider-frame__slide[data-filter="warm"] {
  filter: sepia(0.18) saturate(1.10) brightness(1.02);
}

.divider-frame__slide[data-filter="editorial"] {
  filter: contrast(1.08) saturate(0.85) brightness(1.02);
}

@media (max-width: 992px) {
  .image-divider {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  .divider-frame {
    padding: var(--space-2);
    border-radius: calc(var(--radius-lg) + var(--space-2));
  }
  .divider-frame__inner {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
  }
}

/* ------------------------------------------------------------------
   Bar-to-Island Navigation
   At rest, a full-width white masthead with a hairline bottom rule —
   reads as a magazine cover. On scroll past the hero, the header gains
   floating padding and the nav inside morphs into an elevated glass
   pill. The transition lives on the header (.is-floating) so margin,
   padding, border-radius, and shadow all interpolate together.
   ------------------------------------------------------------------ */
body > header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  padding: 0;
  transition: padding 500ms var(--ease-editorial);
}

body > header.is-floating {
  padding: var(--space-4) var(--space-4) 0;
}

.navbar.nav-island {
  --bs-navbar-padding-y: 0;
  margin: 0;
  padding: var(--space-5) var(--space-8);
  width: 100%;
  max-width: 100%;
  background-color: var(--color-surface);
  border: 1px solid transparent;
  border-bottom-color: var(--color-border-soft);
  border-radius: 0;
  box-shadow: none;
  transition:
    background-color 500ms var(--ease-editorial),
    border-color 500ms var(--ease-editorial),
    border-radius 500ms var(--ease-editorial),
    box-shadow 500ms var(--ease-editorial),
    padding 500ms var(--ease-editorial),
    max-width 500ms var(--ease-editorial);
}

body > header.is-floating .navbar.nav-island {
  max-width: fit-content;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-6);
  background-color: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-color: rgba(var(--rgb-primary-dark), 0.06);
  border-radius: var(--radius-full);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 10px 30px -16px rgba(var(--rgb-primary-dark), 0.18),
    0 4px 10px -6px rgba(var(--rgb-warm), 0.10);
}

.nav-island > .container {
  max-width: 1180px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: gap 500ms var(--ease-editorial);
}

body > header.is-floating .nav-island > .container {
  max-width: none;
  gap: var(--space-3);
}

.nav-island .navbar-brand {
  font-size: var(--font-size-lg);
  letter-spacing: var(--tracking-snug);
  padding: var(--space-1) var(--space-3);
  line-height: 1.15;
}

.nav-island .navbar-brand .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  color: var(--color-text-light);
  letter-spacing: 0.18em;
  margin-top: 4px;
}

.nav-island .navbar-nav {
  gap: var(--space-1);
}

.nav-island .nav-link {
  padding: var(--space-2) var(--space-3) !important;
  font-size: var(--font-size-base);
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.nav-island .nav-link:hover,
.nav-island .nav-link:focus-visible {
  background-color: rgba(var(--rgb-primary), 0.06);
  color: var(--color-primary-dark);
}

/* Replace underline-grow with pill highlight inside the island. */
.nav-island .navbar .nav-item > .nav-link::after,
.navbar.nav-island .nav-item > .nav-link::after {
  display: none;
}

.nav-island .dropdown-menu {
  border-radius: var(--radius-lg);
  margin-top: var(--space-2) !important;
  border: 1px solid rgba(var(--rgb-primary-dark), 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 20px 40px -20px rgba(var(--rgb-primary-dark), 0.20);
}

/* Persistent appointment CTA — always visible in the nav, sized down
   for the bar. Carries through the bar→pill morph unchanged. */
.nav-cta-sticky {
  display: inline-flex;
  align-items: center;
}

.nav-cta-sticky .btn {
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-5);
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-cta-sticky .btn::after {
  content: "";
  width: 1.4rem;
  height: 1.4rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.22);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 350ms var(--ease-editorial);
}

.nav-cta-sticky .btn:hover::after {
  transform: translate(2px, -2px);
}

/* Mobile fallback — keep the bar full-width and skip the morph; the
   toggle needs room and dropdown content needs to expand. */
@media (max-width: 991.98px) {
  body > header,
  body > header.is-floating {
    padding: 0;
  }
  .navbar.nav-island,
  body > header.is-floating .navbar.nav-island {
    max-width: 100%;
    margin: 0;
    padding: var(--space-3) var(--space-4);
    border-radius: 0;
    border-color: transparent;
    border-bottom-color: var(--color-border-soft);
    background-color: var(--color-surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: var(--shadow-sm);
  }
  .nav-island > .container {
    flex-wrap: wrap;
  }
  .nav-island .navbar-collapse {
    flex-basis: 100%;
    margin-top: var(--space-3);
  }
  .nav-cta-sticky {
    display: none;
  }
}
