/* ================================================================
   VARIABLES — swap colors here to restyle the whole site
================================================================ */
:root {
  /* Brand palette */
  --clr-primary:       #0EA5E9;   /* sky blue — main brand */
  --clr-primary-dark:  #0284C7;   /* deeper blue — hover states */
  --clr-primary-glow:  rgba(14, 165, 233, 0.35);
  --clr-secondary:     #0F172A;   /* near-black navy — headings, footer bg */
  --clr-accent:        #38BDF8;   /* lighter blue — highlights */
  --clr-bg:            #FFFFFF;
  --clr-bg-alt:        #F0F9FF;   /* soft blue-tinted off-white — alternate sections */
  --clr-text:          #1E293B;
  --clr-text-muted:    #64748B;
  --clr-border:        #E2E8F0;

  /* Spacing scale */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   1.5rem;
  --sp-lg:   2rem;
  --sp-xl:   3rem;
  --sp-2xl:  5rem;
  --sp-3xl:  8rem;

  /* Type scale (mobile-first) */
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.5rem;
  --text-5xl:  3.25rem;

  /* UI tokens */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --ease:      200ms ease;
  --nav-h:     68px;
}

/* ================================================================
   RESET / BASE
================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Lock scroll when mobile menu is open */
body.nav-open { overflow: hidden; }

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

ul[role="list"] { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ================================================================
   TYPOGRAPHY
================================================================ */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--clr-secondary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl);  }

.section-title {
  text-align: center;
  margin-bottom: var(--sp-sm);
}

.section-sub {
  text-align: center;
  color: var(--clr-text-muted);
  font-size: var(--text-lg);
  max-width: 54ch;
  margin: 0 auto var(--sp-xl);
  line-height: 1.65;
}

/* ================================================================
   LAYOUT — CONTAINER
================================================================ */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: var(--sp-md);
}

section { padding-block: var(--sp-2xl); }

/* ================================================================
   COMPONENTS — BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.btn-primary:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  box-shadow: 0 4px 16px var(--clr-primary-glow);
}

.btn-lg {
  font-size: var(--text-lg);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.65);
}

/* ================================================================
   COMPONENTS — CARDS (shared base)
================================================================ */
.card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ================================================================
   SECTION — NAV
================================================================ */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}

#site-nav.scrolled {
  border-bottom-color: var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.nav-logo {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--clr-secondary);
  letter-spacing: -0.03em;
  flex-shrink: 0;
  transition: color var(--ease);
}
.nav-logo:hover { color: var(--clr-primary); }

/* Hidden on mobile — shown at 768px+ */
.nav-links {
  display: none;
  list-style: none;
  gap: var(--sp-lg);
  margin-left: auto;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--ease);
}
.nav-links a:hover { color: var(--clr-primary); }

.nav-cta {
  margin-left: auto;  /* pushes to far right on mobile */
  font-size: var(--text-sm);
  padding: 0.55rem 1.1rem;
}

/* ================================================================
   MOBILE MENU — hamburger
================================================================ */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-secondary);
  border-radius: 2px;
  transition: transform 300ms ease, opacity 300ms ease;
}

/* Animate to × when open */
.nav-open .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================================================================
   MOBILE MENU — overlay panel
================================================================ */
.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--clr-bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  /* Hidden by default — slide in from right */
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu[aria-hidden="false"] {
  transform: translateX(0);
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
}

.mobile-menu a {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--clr-secondary);
  letter-spacing: -0.02em;
  transition: color var(--ease);
}
.mobile-menu a:hover { color: var(--clr-primary); }

/* ================================================================
   SECTION — HERO
================================================================ */
#hero {
  background: linear-gradient(140deg, var(--clr-secondary) 0%, #1E3A5F 55%, #075985 100%);
  padding-block: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

/* Decorative glowing orb — CSS only, no JS */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(14,165,233,0.30) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(56,189,248,0.15) 0%, transparent 65%);
  pointer-events: none;
  animation: hero-orb 10s ease-in-out infinite alternate;
}

@keyframes hero-orb {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-md);
  max-width: 680px;
}

#hero h1 {
  color: #fff;
  font-size: var(--text-3xl);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-lg);
  line-height: 1.65;
  max-width: 52ch;
}

/* ================================================================
   SECTION — PROBLEMS → OUTCOMES
================================================================ */
#problems { background: var(--clr-bg-alt); }

.problems-grid {
  display: grid;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
}

.problems-col {
  padding: var(--sp-lg);
  border-radius: var(--radius-lg);
}

.problems-col--pain    { background: #FFF5F5; border: 1px solid #FED7D7; }
.problems-col--outcome { background: #F0FFF4; border: 1px solid #C6F6D5; }

.col-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-md);
}

.col-label--pain    { color: #C53030; }
.col-label--outcome { color: #276749; }

.icon-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.icon-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  line-height: 1.55;
  font-size: var(--text-base);
}

.icon-list__icon {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.2em;
  width: 1.1em;
  text-align: center;
}

.problems-col--pain    .icon-list__icon { color: #C53030; }
.problems-col--outcome .icon-list__icon { color: #276749; }

/* ================================================================
   SECTION — SERVICES
================================================================ */
.services-grid {
  display: grid;
  gap: var(--sp-md);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: var(--sp-sm);
}

.card h3 { margin-bottom: var(--sp-xs); font-size: var(--text-lg); }
.card p   { color: var(--clr-text-muted); font-size: var(--text-sm); line-height: 1.65; }

/* ================================================================
   SECTION — TOOLS STRIP
================================================================ */
#tools {
  padding-block: var(--sp-xl);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.tools-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-md);
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem var(--sp-sm);
  list-style: none;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--clr-secondary);
  letter-spacing: -0.01em;
}

.tools-dot {
  color: var(--clr-border);
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1;
  pointer-events: none;
}

/* ================================================================
   SECTION — REVIEWS
================================================================ */
#reviews { background: var(--clr-bg-alt); }

.reviews-grid {
  display: grid;
  gap: var(--sp-md);
}

.review-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.review-card blockquote {
  position: relative;
  padding-top: var(--sp-md);
}

/* Decorative opening quote mark */
.review-card blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: -0.25rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--clr-primary);
  opacity: 0.2;
  font-weight: 700;
  pointer-events: none;
}

.review-card blockquote p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--clr-text);
  font-style: italic;
}

.review-card cite {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  margin-top: auto;
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--clr-border);
}

.review-card cite strong {
  font-size: var(--text-sm);
  color: var(--clr-secondary);
}

.review-card cite span {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

/* ================================================================
   SECTION — HOW IT WORKS
================================================================ */
.steps-grid {
  display: grid;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.step {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
}

.step-num {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--clr-primary);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.05em;
}

.step h3 { margin-bottom: var(--sp-xs); font-size: var(--text-lg); }
.step p   { color: var(--clr-text-muted); font-size: var(--text-sm); line-height: 1.65; }

.why-us {
  background: var(--clr-secondary);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}

.why-us h3 {
  color: var(--clr-accent);
  margin-bottom: var(--sp-md);
  font-size: var(--text-xl);
}

.why-us ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.why-us li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--text-base);
  line-height: 1.55;
}

.why-us li::before {
  content: '→';
  color: var(--clr-accent);
  flex-shrink: 0;
  font-weight: 700;
}

/* ================================================================
   SECTION — BOOKING
================================================================ */
#booking { background: var(--clr-bg-alt); }

.calendly-inline-widget {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  background: var(--clr-bg);
  box-shadow: var(--shadow-sm);
}

.noscript-booking {
  text-align: center;
  padding: var(--sp-xl);
  color: var(--clr-text-muted);
}

.noscript-booking a {
  color: var(--clr-primary);
  text-decoration: underline;
}

/* ================================================================
   FOOTER
================================================================ */
#site-footer {
  background: var(--clr-secondary);
  color: rgba(255, 255, 255, 0.72);
  padding-top: var(--sp-xl);
  padding-bottom: var(--sp-lg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-logo {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-xs);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-links a[href^="mailto"] {
  color: var(--clr-accent);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: opacity var(--ease);
}
.footer-links a[href^="mailto"]:hover { opacity: 0.75; }

.footer-bottom {
  margin-top: var(--sp-md);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.35);
}

/* ================================================================
   ANIMATIONS — scroll reveal
   JS adds .visible when an element enters the viewport.
   Stagger delays are defined per-grid below.
================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger: services cards */
.services-grid .reveal:nth-child(2) { transition-delay:  60ms; }
.services-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.services-grid .reveal:nth-child(4) { transition-delay: 180ms; }
.services-grid .reveal:nth-child(5) { transition-delay: 240ms; }

/* Stagger: review cards */
.reviews-grid .reveal:nth-child(2) { transition-delay:  80ms; }
.reviews-grid .reveal:nth-child(3) { transition-delay: 160ms; }

/* Stagger: steps */
.steps-grid .reveal:nth-child(2) { transition-delay:  60ms; }
.steps-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.steps-grid .reveal:nth-child(4) { transition-delay: 180ms; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #hero::before { animation: none; }
  html  { scroll-behavior: auto; }
  .btn  { transition: none; }
}

/* ================================================================
   MEDIA QUERIES — tablet (640px+)
================================================================ */
@media (min-width: 640px) {
  .problems-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Services: 2-col at tablet; center 5th card */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid .card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - var(--sp-md) / 2);
    justify-self: center;
  }

  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-links {
    align-items: flex-end;
  }
}

/* ================================================================
   MEDIA QUERIES — desktop (768px+)
================================================================ */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

  #hero h1 { font-size: var(--text-4xl); }

  /* Reveal desktop nav links, hide hamburger */
  .hamburger  { display: none; }
  .nav-links  { display: flex; }
  .nav-cta    { margin-left: 0; }  /* margin-left: auto on .nav-links handles spacing */
}

/* ================================================================
   MEDIA QUERIES — wide desktop (1024px+)
================================================================ */
@media (min-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  #hero h1 { font-size: var(--text-5xl); }

  /*
    Services: 6-virtual-column trick so 5 cards look balanced.
    Row 1: cards 1–3 (each span 2 of 6 = 3 equal columns)
    Row 2: cards 4–5 centred  (offset by 1 column each side)
  */
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .services-grid .card,
  .services-grid .card:last-child {
    /* Reset the tablet :last-child centering */
    grid-column: span 2;
    max-width: none;
    justify-self: auto;
  }
  .services-grid .card:nth-child(4) { grid-column: 2 / 4; }
  .services-grid .card:nth-child(5) { grid-column: 4 / 6; }

  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
