/* ============================================================
   15-transitions.css — Page fade transitions + page-hero strip
   Shared across all 5 pages.
   ============================================================ */

/* ---- Page transition overlay ---- */
/* This is an invisible white layer that covers the page as you
   navigate away — like pulling a blind before switching rooms. */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-white);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.16s var(--ease-out);
}
.page-transition-overlay.is-leaving {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Reveal animation (moved here from index.html inline style) ---- */
/* Applied to any element with class="reveal" on multi-page builds */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Page hero strip (for interior pages — services, crm, work, about) ---- */
/* Sits below the sticky nav and gives each page a consistent branded entry.
   Lighter than the home hero (no huge badge), but still visually distinctive. */
.page-hero {
  background:
    radial-gradient(ellipse at 110% 0%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at -10% 100%, rgba(21, 97, 45, 0.12) 0%, transparent 50%),
    linear-gradient(160deg, var(--c-navy-dark) 0%, var(--c-navy) 100%);
  color: var(--c-white);
  padding: var(--s-8) 0 var(--s-7);
  border-bottom: 1px solid rgba(255, 215, 0, 0.18);
}
.page-hero .eyebrow {
  color: var(--c-yellow);
}
.page-hero h1 {
  color: var(--c-white);
  max-width: 760px;
  margin-bottom: var(--s-3);
}
.page-hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 0;
}
.page-hero-actions {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-5);
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .page-hero { padding: var(--s-7) 0 var(--s-6); }
  .page-hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .page-hero-actions { flex-direction: column; }
  .page-hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---- Sections on pages with a sub-nav need extra scroll-margin ---- */
/* On services.html and crm.html the sub-nav is sticky at top:80px
   (below the main 80px header), so anchor jumps need ~136px total.
   Add class "has-subnav" to <body> on those pages to activate. */
body.has-subnav section.module {
  scroll-margin-top: 136px;
}
/* Non-section anchor targets inside has-subnav pages
   (e.g. #branding, #lead-gen, #care on service cards) */
body.has-subnav [id]:not(section) {
  scroll-margin-top: 136px;
}

/* ---- Page sub-nav (services page horizontal tabs) ---- */
.page-subnav {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 80px; /* below the 80px desktop header */
  z-index: 90;
}
@media (max-width: 960px) {
  /* Header shrinks to 70px on tablet/mobile */
  .page-subnav { top: 70px; }
  body.has-subnav section.module { scroll-margin-top: 126px; }
  body.has-subnav [id]:not(section) { scroll-margin-top: 126px; }
}
.page-subnav .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-subnav .container::-webkit-scrollbar { display: none; }
.page-subnav a {
  display: block;
  padding: 14px var(--s-4);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.page-subnav a:hover {
  color: var(--c-navy);
}
.page-subnav a.is-spy-active {
  color: var(--c-navy);
  border-bottom-color: var(--c-yellow);
}
.page-subnav a:focus-visible {
  outline: 3px solid var(--c-navy);
  outline-offset: -3px;
  border-radius: 2px;
}

/* ---- Sticky CTA bar (appears after hero scrolls past) ---- */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--c-navy);
  color: var(--c-white);
  padding: 14px var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
  box-shadow: 0 -4px 20px rgba(15, 59, 95, 0.3);
}
.sticky-cta-bar.is-visible {
  transform: translateY(0);
}
.sticky-cta-bar p {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  color: rgba(255,255,255,0.85);
}
.sticky-cta-bar .btn {
  flex-shrink: 0;
}
/* On about.html the contact form is always in view — suppress the sticky bar
   to avoid a duplicate CTA. JS scroll-spy still controls .is-visible,
   so this just removes it from display entirely for that page. */
body[data-page="about"] .sticky-cta-bar {
  display: none !important;
}
/* Sticky bar focus: yellow ring is invisible on navy — use white instead */
.sticky-cta-bar .btn:focus-visible {
  outline: 3px solid var(--c-white);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .sticky-cta-bar p { display: none; }
  .sticky-cta-bar { justify-content: center; }
}

/* ---- Hover micro-interactions on cards ---- */
/* Applies a consistent lift + shadow to every card type.
   Wrapped in @media (hover: hover) so touch devices don't get
   "stuck elevated" cards after a tap — like a button that stays
   pressed after you lift your finger. */
.service-card,
.feature-card,
.crm-card,
.case-study,
.pricing-card,
.testimonial,
.service-teaser-card,
.pricing-teaser-card,
.home-case-card {
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

@media (hover: hover) {
  .service-card:hover,
  .feature-card:hover,
  .crm-card:hover,
  .service-teaser-card:hover,
  .pricing-teaser-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }

  /* feature-card was missing box-shadow on hover — all other card families have it */
  .feature-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  }

  /* case-study card hover — was only changing border, no lift */
  .case-study:hover {
    transform: translateY(-3px);
  }

  /* home-case-card had no hover state at all */
  .home-case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

  /* pricing-teaser cards — add a border accent on hover to match other cards */
  .pricing-teaser-card:hover {
    border-color: var(--c-navy-light);
  }
  .pricing-teaser-card--navy:hover {
    border-color: var(--c-yellow);
  }

  /* service-teaser-card — the "→" arrow already slides; text link should colour too */
  .service-teaser-card:hover .service-teaser-link {
    color: var(--c-green);
  }

  /* testimonial cards — already have hover in 12-testimonials.css; unify transition speed */
  .testimonial:not(.testimonial--placeholder):hover {
    transform: translateY(-4px);
  }

  /* pricing-card lift (keeps the featured card's scale offset) */
  .pricing-card:not(.pricing-card--popular):hover {
    transform: translateY(-4px);
  }
  .pricing-card--popular:hover {
    transform: scale(1.03) translateY(-4px);
  }
}

/* ---- Card :active press feedback (fires on touch tap AND mouse click) ---- */
/* Like pressing a physical button — cards briefly shrink to signal "I felt that". */
.service-card:active,
.feature-card:active,
.crm-card:active,
.pricing-card:active,
.service-teaser-card:active,
.pricing-teaser-card:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-sm);
  transition-duration: 0.08s;
}

/* ---- Stat strip (used inside dark case-study cards on work.html and index.html) ---- */
.stats-strip {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding: var(--s-6) 0;
  border-top: 1.5px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
  margin: var(--s-6) 0;
}
.stats-strip-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}
.stats-strip-num {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--c-yellow);
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.stats-strip-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- CTA block (closing CTA on each page) ---- */
.cta-block {
  background: var(--c-navy);
  color: var(--c-white);
  padding: var(--s-8) 0;
  text-align: center;
}
.cta-block h2 {
  color: var(--c-white);
  margin-bottom: var(--s-3);
}
.cta-block p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto var(--s-5);
}
.cta-block-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Fine-print line under the CTA — used to surface ToS / ownership / paid-access
   notice on the CRM page so visitors see the legal framing before signup. */
.cta-block-fineprint {
  margin-top: var(--s-4);
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.cta-block-fineprint a {
  color: var(--c-yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cta-block-fineprint a:hover { color: var(--c-yellow-dark); }
.cta-block-fineprint a:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Callout block (used on services.html) ---- */
.callout-block {
  background: var(--c-card);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: flex;
  gap: var(--s-5);
  align-items: flex-start;
}
.callout-block-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--c-navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-yellow);
}
.callout-block-icon svg {
  width: 24px; height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.callout-block-body h3 {
  margin-bottom: var(--s-2);
}
.callout-block-body p {
  color: var(--c-muted);
  margin-bottom: var(--s-3);
}
.callout-blocks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
@media (max-width: 720px) {
  .callout-blocks-grid { grid-template-columns: 1fr; }
  .callout-block { flex-direction: column; }
}

/* ---- Pricing teaser cards (home page) ---- */
.pricing-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  max-width: 800px;
  margin: 0 auto var(--s-5);
}
.pricing-teaser-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* transition set once in the central block above */
}
/* Lift + border handled in @media (hover: hover) block above */
.pricing-teaser-card--navy {
  background: var(--c-navy);
  color: var(--c-white);
  border-color: var(--c-navy);
}
.pricing-teaser-card--navy h3 { color: var(--c-yellow); }
.pricing-teaser-card--navy p { color: rgba(255,255,255,0.75); }
.pricing-teaser-from {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--c-navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.pricing-teaser-card--navy .pricing-teaser-from { color: var(--c-yellow); }
.pricing-teaser-sub {
  font-size: 0.82rem;
  color: var(--c-muted);
  font-weight: 600;
}
.pricing-teaser-card--navy .pricing-teaser-sub { color: rgba(255,255,255,0.55); }
@media (max-width: 560px) {
  .pricing-teaser-grid { grid-template-columns: 1fr; }
}

/* ---- Featured case card (home page) ---- */
.home-case-card {
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: center;
  border: 1.5px solid transparent;
}
@media (hover: hover) {
  .home-case-card:hover {
    border-color: rgba(255, 215, 0, 0.35);
  }
}
/* ---- Shared utility classes used on home page ---- */
/* Centred footer note beneath a pricing/teaser grid */
.section-footer-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-top: 0;
}
/* Centred CTA row below a section (testimonials etc.) */
.section-cta-row {
  text-align: center;
  margin-top: var(--s-5);
}

.home-case-logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  margin-bottom: var(--s-4);
  object-fit: cover;
}
.home-case-card h3 { color: var(--c-yellow); }
.home-case-card p { color: rgba(255,255,255,0.8); }
.home-case-num {
  font-family: var(--f-display);
  font-size: 5rem;
  font-weight: 900;
  color: var(--c-yellow);
  line-height: 1;
  letter-spacing: -0.04em;
}
.home-case-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.home-case-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.home-case-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Home-case-photo: wider rectangular photo treatment used on Springcart entry */
.home-case-photo {
  display: block;
  width: 120px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 35%;
  margin-bottom: var(--s-4);
  border: 1.5px solid rgba(255, 215, 0, 0.25);
}
/* 2-up grid wrapper holding two home-case-cards side by side on desktop */
.home-case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
/* When inside the 2-up grid, the internal card layout stacks (text above stats)
   because each card is now half the page width and a 2-col internal split gets tight */
.home-case-grid .home-case-card {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.home-case-grid .home-case-card .home-case-stats {
  margin-top: var(--s-4);
}
.home-case-grid .home-case-num {
  font-size: 3.2rem;
}
.home-case-grid .home-case-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
@media (max-width: 960px) {
  .home-case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .home-case-card { grid-template-columns: 1fr; }
  .home-case-grid .home-case-stats { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 480px) {
  .home-case-grid .home-case-stats { grid-template-columns: 1fr; }
  .home-case-grid .home-case-num { font-size: 2.6rem; }
}

/* ---- Service teaser cards (home page) ---- */
.service-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.service-teaser-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* transition set once in the central block above */
}
/* Lift + link colour handled in @media (hover: hover) block above */
.service-teaser-icon {
  width: 48px; height: 48px;
  background: var(--c-navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-yellow);
  margin-bottom: var(--s-2);
}
.service-teaser-icon svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-teaser-card h3 { margin-bottom: 0; font-size: 1.15rem; }
.service-teaser-card p { color: var(--c-muted); font-size: 0.92rem; flex: 1; }
.service-teaser-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s var(--ease-out);
}
.service-teaser-link::after {
  content: "→";
  transition: transform 0.18s var(--ease-spring);
}
.service-teaser-card:hover .service-teaser-link::after {
  transform: translateX(3px);
}
/* 720px was collapsing the 3-column teaser grid on iPads (768px) one step too early.
   The grid holds fine down to ~600px — below that, a single column reads better. */
@media (max-width: 600px) {
  .service-teaser-grid { grid-template-columns: 1fr; }
}

/* ---- Testimonials on home page (2-up layout) ---- */
.home-testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 720px) {
  .home-testimonials-grid { grid-template-columns: 1fr; }
}

/* ---- "Why hand-coded" philosophy block (about page) ---- */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}
.philosophy-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.philosophy-item {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.philosophy-num {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-yellow);
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  text-align: right;
}
.philosophy-copy h4 { margin-bottom: 4px; }
.philosophy-copy p { color: var(--c-muted); font-size: 0.92rem; margin: 0; }
@media (max-width: 720px) {
  .philosophy-grid { grid-template-columns: 1fr; }
}

/* ---- Philosophy sidebar cards (about page) ---- */
.philosophy-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.philosophy-quote-card {
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.philosophy-quote-card blockquote {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--c-yellow);
  line-height: 1.25;
  margin: 0 0 var(--s-3);
  font-style: normal;
}
.philosophy-quote-card cite {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-style: normal;
}
.philosophy-proof-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.philosophy-proof-card strong {
  display: block;
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.philosophy-proof-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.philosophy-proof-list li {
  font-size: 0.9rem;
  color: var(--c-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.philosophy-proof-list li .proof-tick {
  color: var(--c-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- CRM "why flat pricing" explainer (crm.html) ---- */
.flat-pricing-block {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-dark) 100%);
  color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
.flat-pricing-block h2 { color: var(--c-white); }
.flat-pricing-block p { color: rgba(255,255,255,0.8); }
.flat-pricing-callout {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.flat-pricing-row {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.flat-pricing-badge {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--c-black);
  background: var(--c-yellow);
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1.4;
}
.flat-pricing-row p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
}
@media (max-width: 720px) {
  .flat-pricing-block { grid-template-columns: 1fr; padding: var(--s-5); }
}
