/* White and Associates LLC — custom layer
   Tailwind handles 95% via CDN. This file is for:
   - Components Tailwind utility classes don't express cleanly (CTAs, focus rings, staging ribbon)
   - WCAG 2.1 AA polish (focus-visible, skip link, contrast-safe hover states)
*/

:root {
  --navy:#0F2A47;
  --gold:#C8A35C;        /* bright gold — use ONLY on dark (navy/charcoal) bg. 6.13:1 on navy. */
  --gold-dark:#8B6914;   /* AA-safe gold for use on cream/softgray bg. 4.86:1 on cream. */
  --gold-hover:#A8853F;  /* CTA hover state (bg gets darker, contrast vs. navy text stays ≥4.5:1) */
  --cream:#FAFAF7;
  --softgray:#F5F5F5;
  --charcoal:#1A1A1A;
  --muted:#5A5A5A;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Skip link — WCAG 2.1 AA, visible on focus only */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: .75rem 1rem;
  z-index: 100;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; outline: 2px solid var(--gold); outline-offset: 2px; }

/* Global focus-visible — keyboard nav contrast */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* CTAs */
.cta-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  padding: .9rem 1.6rem;
  border-radius: 2px;
  text-align: center;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  letter-spacing: .01em;
  min-height: 44px;
  line-height: 1.4;
}
.cta-primary:hover { background: var(--gold-hover); color: var(--navy); }
.cta-primary:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.cta-secondary {
  display: inline-block;
  background: transparent;
  color: var(--cream);
  border: 1.5px solid var(--cream);
  padding: .9rem 1.6rem;
  border-radius: 2px;
  font-weight: 600;
  text-align: center;
  transition: background .2s ease, color .2s ease;
  min-height: 44px;
  line-height: 1.4;
}
.cta-secondary:hover { background: var(--cream); color: var(--navy); }
.cta-secondary--dark {
  color: var(--navy);
  border-color: var(--navy);
}
.cta-secondary--dark:hover { background: var(--navy); color: var(--cream); }

/* Nav links — active state underline */
.nav-link { position: relative; padding: .25rem 0; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gold);
}

/* Service cards */
.service-card {
  background: var(--cream);
  border: 1px solid rgba(15, 42, 71, 0.08);
  padding: 2rem;
  border-radius: 2px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(15, 42, 71, 0.18);
  border-color: rgba(200, 163, 92, 0.4);
}
.service-card--featured {
  position: relative;
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, var(--cream) 0%, #FFF6E2 100%);
  box-shadow: 0 18px 40px -22px rgba(200, 163, 92, 0.45);
  transform: translateY(-8px);
}
.service-card--featured::before {
  content: "OUR DIFFERENTIATOR";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--gold);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .25em;
  padding: .35rem 1rem;
  border-radius: 2px;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .service-card--featured { transform: none; }
}

.tier-badge {
  display: inline-block;
  padding: .35rem .75rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: rgba(15, 42, 71, 0.08);
  color: var(--navy);
  border-radius: 2px;
}
.tier-badge--gold {
  background: rgba(200, 163, 92, 0.18);
  color: #6E5A2E;
}

.learn-more {
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--navy);
  font-weight: 600;
  font-size: .9rem;
  align-self: flex-start;
  transition: color .15s ease, transform .15s ease;
}
.learn-more:hover { color: var(--gold-dark); }  /* uses AA-safe gold on cream */
.learn-more:hover span { transform: translateX(3px); display: inline-block; transition: transform .15s ease; }

/* Service item bullets */
.service-item {
  position: relative;
  padding-left: 1.25rem;
  padding-top: .25rem;
  padding-bottom: .25rem;
  font-size: .98rem;
}
.service-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85rem;
  width: 6px; height: 6px;
  background: var(--navy);
  border-radius: 50%;
}
.service-item--gold::before { background: var(--gold-dark); }  /* visible on light bg */

/* Industry tiles */
.industry-tile {
  background: var(--cream);
  border: 1px solid rgba(15, 42, 71, 0.1);
  padding: 1.25rem 1.25rem;
  border-radius: 2px;
  font-weight: 600;
  color: var(--navy);
  font-size: .98rem;
  transition: border-color .2s ease;
}
.industry-tile:hover { border-color: var(--gold-dark); }  /* 3:1 vs cream */
.industry-tile__sub {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: .85rem;
  margin-top: .25rem;
}

/* Form */
.form-input {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--cream);
  border: 1px solid rgba(15, 42, 71, 0.15);
  border-radius: 2px;
  font-size: 1rem;
  color: var(--charcoal);
  transition: border-color .15s ease, box-shadow .15s ease;
  min-height: 44px;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 163, 92, 0.2);
}
.form-input[aria-invalid="true"] {
  border-color: #B91C1C;
}
.form-error {
  color: #B91C1C;
  font-size: .85rem;
  margin-top: .35rem;
}

/* Header scroll shadow — JS adds .scrolled when window.scrollY > 10 */
header {
  transition: box-shadow .2s ease, border-color .2s ease;
}
header.scrolled {
  box-shadow: 0 4px 18px -10px rgba(15, 42, 71, 0.2);
  border-bottom-color: transparent;
}

/* Mobile menu slide-in animation */
#mobile-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .25s ease, opacity .2s ease;
}
#mobile-menu.is-open {
  max-height: 480px;
  opacity: 1;
}
#mobile-menu.is-open:not(.hidden) { display: block; }

/* Calendly loading skeleton */
.calendly-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
}
.calendly-loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(15, 42, 71, 0.15);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.calendly-loader__label {
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* FAQ accordion */
.faq-item {
  border-top: 1px solid rgba(15, 42, 71, 0.1);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: 1px solid rgba(15, 42, 71, 0.1); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  color: var(--gold-dark);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.faq-item[open] summary::after {
  content: "−";
  transform: rotate(0deg);
}
.faq-item__body {
  margin-top: 1rem;
  color: var(--charcoal);
  font-size: 1rem;
  line-height: 1.7;
}

/* Process steps */
.process-step {
  position: relative;
  padding-top: 1rem;
}
.process-step__num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  color: var(--gold-dark);
  line-height: 1;
  font-weight: 700;
}
.process-step__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 600;
  margin-top: .5rem;
}
.process-step__body {
  margin-top: .75rem;
  color: var(--charcoal);
  line-height: 1.6;
}

/* Popular pages cards (404) */
.popular-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--cream);
  border: 1px solid rgba(15, 42, 71, 0.1);
  border-radius: 2px;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease;
}
.popular-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
}
.popular-card__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.popular-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-top: .35rem;
}
.popular-card__hint {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* Honeypot — keep accessible-hidden, NOT display:none (some bots ignore display:none) */
.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Staging ribbon — fixed top-right.
   Remove the surrounding HTML comment block (STAGING_RIBBON_START / STAGING_RIBBON_END) in Phase 4. */
.staging-ribbon {
  position: fixed;
  top: 14px;
  right: -38px;
  background: #B91C1C;
  color: #FFFFFF;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .25em;
  padding: .35rem 3rem;
  transform: rotate(45deg);
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: none;
  user-select: none;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Financial Operations team grid.
   Written as real CSS on purpose: assets/css/tailwind.css is a curated subset,
   so gap-x-10 / gap-y-14 / object-top / mt-14 / duration-700 do not exist in it.
   Relying on those silently produced a zero-gutter layout.
   --------------------------------------------------------------------------- */
/* Mirrors the founder bio grid exactly (lg:grid-cols-12 + lg:col-span-4 + lg:gap-16)
   so Leanne and Peg render at the same size as Ben rather than a guessed width. */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2.5rem;
  margin-top: 3.5rem;
}
/* Stays single-column until 1024px so it changes shape at the SAME breakpoint as the
   founder bio grid. Splitting at 640px made Leanne and Peg half-width while Ben was
   still full-width, so the three portraits differed at every width from 640 to 1023. */
@media (min-width: 1024px) {
  .team-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4rem; }
  .team-member { grid-column: span 4 / span 4; }
}

/* Shared size contract: Ben, Leanne and Peg render identically at every viewport.
   The cap stops any portrait ballooning to full width on tablet. */
.founder-portrait,
.team-portrait { max-width: 340px; }

.team-portrait {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--softgray);
  /* Same card treatment as the founder portrait. */
  border: 1px solid rgba(15, 42, 71, 0.1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}
.team-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Headroom bias: these are square-ish sources cropped to 4:5, so favour the face. */
  object-position: 50% 22%;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.team-portrait::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: var(--gold);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .team-member:hover .team-portrait img { transform: scale(1.02); }
}

/* Print */
@media print {
  .staging-ribbon, header nav, footer { display: none; }
  body { background: white; color: black; }
}
