/* ==========================================================================
   SiteSurgeon — Core Design System & Theme CSS
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Brand Colors */
  --primary: #0E7A5F;
  --primary-hover: #0A5C47;
  --primary-light: #E6F4F1;
  --accent: #2CB68F;

  /* Dark Theme Surfaces & Backgrounds (reserved for footer + showcase — see design-system.md) */
  --bg-dark: #0F1715;
  --surface-dark: #16221F;
  --surface-dark-card: #1D2C28;
  --border-dark: #2A3E39;

  /* Neutral Color Scale */
  --bg-light: #FFFFFF;
  --bg-alt: #F8FAF9;
  --text-main: #111827;
  --text-muted: #4B5563;
  --text-light: #9CA3AF;

  --text-on-dark: #F9FAFB;
  --text-on-dark-400: #9CA3AF;

  --paper-border: #E5E7EB;
  --paper-border-hover: #D1D5DB;

  /* Badges & Highlights */
  --badge-emerald-bg: #E6F4F1;
  --badge-emerald-text: #0E7A5F;
  --badge-pay-bg: #ECFDF5;
  --badge-pay-text: #047857;
  --badge-pay-border: #A7F3D0;

  /* Pain / problem indicators */
  --pain-bg: #FEE2E2;
  --pain-text: #991B1B;

  /* Category tag colors (blog) */
  --tag-search-bg: #E6F4F1;   --tag-search-text: #0E7A5F;
  --tag-cart-bg: #FEF3C7;     --tag-cart-text: #92400E;
  --tag-dev-bg: #E0E7FF;      --tag-dev-text: #3730A3;
  --tag-lms-bg: #FCE7F3;      --tag-lms-text: #9D174D;
  --tag-speed-bg: #DBEAFE;    --tag-speed-text: #1E40AF;

  /* Radii & Shadows */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Travelling border */
  --tb-color: var(--primary);
  --tb-highlight: var(--accent);
  --tb-width: 1.5px;
  --tb-gap: 4px;
  --tb-speed: 4.6s;
  --tb-tail: 84deg;
  --tb-static: rgba(14, 122, 95, 0.55);
  --tb-slot: 2.6s;
  --tb-count: 4;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  vertical-align: middle;
}

table {
  border-collapse: collapse;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Layout Containers & Utilities --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--tight {
  padding: 56px 0;
}

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

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark-400);
}

.grid {
  display: grid;
  gap: 24px;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.center { text-align: center; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

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

/* Section Typography Headers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section--dark .eyebrow {
  color: var(--accent);
}

.section-head h2, h1, h2, h3 {
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.25;
}

.section-head {
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 60ch;
}

.section--dark .section-head p {
  color: var(--text-on-dark-400);
}

.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}

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

/* --- Buttons & Badges --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--r-md);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(14, 122, 95, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(14, 122, 95, 0.3);
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  border: 1.5px solid var(--paper-border);
  color: var(--text-main);
}

.btn-outline-light:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-block { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.btn-ghost svg { transition: transform 0.2s ease; }
.btn-ghost:hover { color: var(--primary-hover); }
.btn-ghost:hover svg { transform: translateX(3px); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pay {
  background-color: var(--badge-pay-bg);
  color: var(--badge-pay-text);
  border: 1px solid var(--badge-pay-border);
}

.badge-emerald {
  background-color: var(--badge-emerald-bg);
  color: var(--badge-emerald-text);
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
}

.badge-outline {
  border: 1px solid var(--paper-border);
  background: transparent;
  color: var(--text-muted);
}

.tag-pill {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--tag-search-bg);
  color: var(--tag-search-text);
}
.tag-pill[data-cat="Abandoned Cart & Funnel"] { background: var(--tag-cart-bg); color: var(--tag-cart-text); }
.tag-pill[data-cat="Custom WordPress Development"] { background: var(--tag-dev-bg); color: var(--tag-dev-text); }
.tag-pill[data-cat="Membership, LMS & B2B"] { background: var(--tag-lms-bg); color: var(--tag-lms-text); }
.tag-pill[data-cat="Speed & Performance"] { background: var(--tag-speed-bg); color: var(--tag-speed-text); }

.pain-chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--pain-bg);
  color: var(--pain-text);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--paper-border);
}

/* backdrop-filter lives on a pseudo-element rather than the header itself.
   filter/backdrop-filter on an element makes it a containing block for its
   position:fixed descendants — applying it directly here would trap the
   full-screen mobile nav panel inside the header's own 72px-tall box
   instead of letting it cover the viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  padding: 6px;
  color: var(--text-main);
}

/* Mobile nav drawer */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg-light);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links a { font-size: 1.15rem; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-actions .btn { display: none; }
  body.nav-open .nav-actions .btn { display: inline-flex; }
}

/* --- HERO SECTION --- */
.hero {
  padding: 80px 0 96px;
  background: radial-gradient(circle at 90% 10%, rgba(44, 182, 143, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.3rem);
  margin-bottom: 20px;
  color: var(--text-main);
  text-wrap: balance;
}

/* Highlighted phrase inside a headline: brand green (solid green keeps large-text contrast ~5:1 on white)
   with an underline that draws itself in once, then carries a very soft glint every few seconds. */
.hl {
  --hl-line: rgba(44, 182, 143, 0.45);
  --hl-h: 0.09em;
  color: var(--primary);
  white-space: nowrap;
  /* layer 1 (top): the glint · layer 2: the underline itself */
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)),
    linear-gradient(var(--hl-line), var(--hl-line));
  background-repeat: no-repeat;
  background-position: -45% 100%, 0 100%;
  background-size: 30% var(--hl-h), 0% var(--hl-h);
  animation:
    hl-draw 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s forwards,
    hl-glint 7s ease-in-out 2s infinite;
}

@keyframes hl-draw {
  to { background-size: 30% var(--hl-h), 100% var(--hl-h); }
}

@keyframes hl-glint {
  0%        { background-position: -45% 100%, 0 100%; }
  20%, 100% { background-position: 145% 100%, 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hl { animation: none; background-size: 0% var(--hl-h), 100% var(--hl-h); }
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: var(--bg-alt);
  border: 1px solid var(--paper-border);
  border-radius: var(--r-full);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.hero-chip svg { color: var(--primary); flex-shrink: 0; }

.hero-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 20px;
}
.hero-actions .btn { flex: 0 0 auto; }
@media (max-width: 560px) {
  .hero-actions { flex-wrap: wrap; }
  .hero-actions .hero-note { flex-basis: 100%; }
}
.hero-note {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.825rem;
  color: var(--text-light);
}

/* Hero Mockup Component */
.mockup {
  background: #ffffff;
  border-radius: var(--r-lg);
  border: 1px solid var(--paper-border);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  position: relative;
}

.mockup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mockup-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--paper-border);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-main);
}

.mockup-search svg { color: var(--primary); flex-shrink: 0; }

.mockup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid #F3F4F6;
  transition: var(--transition);
  border-radius: var(--r-sm);
  gap: 12px;
}

.mockup-row:last-of-type { border-bottom: none; }

.mockup-row:hover { background-color: var(--bg-alt); }

.mockup-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.mockup-row-title { font-size: 0.875rem; font-weight: 600; color: var(--text-main); }
.mockup-row-sub { font-size: 0.75rem; color: var(--text-light); }
.mockup-price { font-size: 0.875rem; font-weight: 700; color: var(--primary); }

.mockup-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--paper-border);
}

/* --- SHOWCASE CAROUSEL SECTION (dark anchor #1) --- */
.showcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.showcase-controls { display: flex; gap: 10px; }

.showcase-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-dark);
  color: var(--text-on-dark);
  background: var(--surface-dark);
  transition: var(--transition);
}

.showcase-arrow:hover { background: var(--primary); border-color: var(--primary); }

.showcase-viewport { overflow: hidden; }

.showcase-track {
  display: flex;
  gap: 20px;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.showcase-card {
  flex: 0 0 340px;
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: var(--transition);
}

.showcase-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.showcase-thumb {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.showcase-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}
.showcase-thumb span {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 21, 0.4);
  padding: 6px 14px;
  border-radius: var(--r-full);
  backdrop-filter: blur(4px);
  font-size: 0.82rem;
  text-transform: none;
}

.showcase-body { padding: 20px; }

.showcase-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.showcase-body h3 { font-size: 1.1rem; color: var(--text-on-dark); margin-bottom: 8px; }
.showcase-body p { font-size: 0.875rem; color: var(--text-on-dark-400); margin-bottom: 16px; }

.showcase-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #34D399;
  padding-top: 14px;
  border-top: 1px solid var(--border-dark);
}

.showcase-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.showcase-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-dark);
  transition: var(--transition);
}
.showcase-dot.is-active { background: var(--accent); width: 22px; border-radius: 5px; }

.showcase-placeholder-note {
  text-align: center;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-on-dark-400);
  margin-top: 16px;
}

/* --- SERVICES OVERVIEW SECTION --- */
.service-card {
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.service-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

.service-card-full { grid-column: 1 / -1; }

.service-card-featured {
  border: 1.5px solid var(--primary);
  background: linear-gradient(180deg, var(--primary-light) 0%, #ffffff 45%);
}

.service-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.service-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.service-card-head h3 { font-size: 1.25rem; color: var(--text-main); }

.service-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  background: var(--bg-alt);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.service-check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.service-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.service-check-list svg { color: var(--primary); flex-shrink: 0; margin-top: 3px; }

/* Full-width service detail rows on the services page */
.service-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 4px 20px;
  border-bottom: 1px solid var(--paper-border);
}
.service-row-head h3 { font-size: 1.3rem; margin-top: 6px; }

/* --- FEATURE TILES (service detail: what changes / capabilities) --- */
.feature-tile {
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-md);
  padding: 22px;
}
.feature-tile h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 8px; }
.feature-tile p { font-size: 0.88rem; color: var(--text-muted); }
.feature-tile-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

/* --- STEP LIST (how it works) --- */
.step-num {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}
.step h4 { font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; color: var(--text-muted); }

/* --- SOLID PRIMARY BAND (price banner / CTA strips) --- */
.band-primary {
  background: var(--primary);
  color: #ffffff;
}
.band-primary .service-num { color: rgba(255,255,255,0.75); }
.band-primary .badge-outline { border-color: rgba(255,255,255,0.4); color: #ffffff; }
.band-primary .badge-pay { background: rgba(255,255,255,0.16); color: #ffffff; border-color: rgba(255,255,255,0.35); }
.band-primary .btn-primary { background: #ffffff; color: var(--primary); box-shadow: none; }
.band-primary .btn-primary:hover { background: var(--bg-alt); color: var(--primary-hover); }

/* --- FREE ANALYSIS / SUBSCRIBE SECTION --- */
.analysis-panel, .subscribe-panel {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.analysis-panel h3, .subscribe-panel h3 { font-size: 1.35rem; margin-bottom: 24px; }

.analysis-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
}

.subscribe-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 440px;
  margin-inline: auto;
}

.analysis-form input, .subscribe-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-md);
  outline: none;
  transition: var(--transition);
  background: var(--bg-light);
  color: var(--text-main);
}

.analysis-form input:focus, .subscribe-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, 0.1);
}

.form-note { font-size: 0.8rem; color: var(--text-light); }

.form-success {
  display: none;
  font-size: 0.85rem;
  color: var(--primary);
  margin-top: 12px;
  font-weight: 500;
}

/* --- GUARANTEE CARDS --- */
.guarantee-card {
  background: var(--primary-light);
  border: 1px solid rgba(14, 122, 95, 0.2);
  border-radius: var(--r-md);
  padding: 24px;
}
.guarantee-card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.guarantee-card p { font-size: 0.9rem; color: var(--text-muted); }
.badge-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-hover);
  margin-bottom: 10px;
}

/* --- FAQ SECTION --- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item.is-open { border-color: var(--paper-border-hover); }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-main);
  transition: transform 0.25s ease;
}
.faq-icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-icon::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item.is-open .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0, 1, 0, 1); }
.faq-answer-inner { padding: 0 24px 20px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; max-width: 70ch; }
.faq-answer-inner p + p { margin-top: 12px; }

/* --- BLOG ARCHIVE --- */
.blog-grid-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .blog-grid-layout { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
}
.blog-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card h3 { font-size: 1.05rem; margin: 12px 0 8px; line-height: 1.3; color: var(--text-main); }
.blog-card p { font-size: 0.9rem; color: var(--text-muted); flex-grow: 1; }

.blog-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--paper-border);
  font-size: 0.78rem; color: var(--text-light);
}

.category-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 96px; }
.category-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 10px; padding-left: 14px;
}
.category-list button {
  text-align: left; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 0.9rem; color: var(--text-muted); border: 1px solid transparent;
  transition: var(--transition);
}
.category-list button.is-active {
  background: var(--primary-light); color: var(--primary); border-color: rgba(14,122,95,0.2); font-weight: 600;
}
.category-list button:hover:not(.is-active) { background: var(--bg-alt); }

.related-card {
  border: 1px solid var(--paper-border);
  border-radius: var(--r-md);
  padding: 20px;
  background: #ffffff;
  transition: var(--transition);
  display: block;
}
.related-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.related-card h4 { font-size: 0.98rem; margin: 10px 0 8px; color: var(--text-main); }
.related-card p { font-size: 0.86rem; color: var(--text-muted); }

/* --- SINGLE POST --- */
.post-layout { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0 28px; }
.table-wrap .data-table { margin: 0; min-width: 480px; }

.post-body h2 { font-size: 1.5rem; margin: 44px 0 16px; }
.post-body h3 { font-size: 1.15rem; margin: 28px 0 12px; }
.post-body p { margin-bottom: 16px; color: var(--text-muted); max-width: 70ch; }
.post-body code {
  background: var(--bg-alt); border: 1px solid var(--paper-border); border-radius: 4px;
  padding: 2px 6px; font-size: 0.85em;
}
.post-body ul { margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.post-body ul li { display: flex; gap: 10px; font-size: 0.96rem; color: var(--text-muted); }
.post-body ul li::before { content: "—"; color: var(--primary); font-weight: 700; flex-shrink: 0; }

.callout {
  background: var(--primary-light);
  border: 1px solid rgba(14,122,95,0.2);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 28px 0;
}
.callout h4 { font-size: 0.95rem; color: var(--primary-hover); margin-bottom: 10px; }
.callout ul li::before { color: var(--primary); }

.callout-cta {
  background: var(--primary);
  color: rgba(255,255,255,0.9);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 28px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.callout-cta p { color: #ffffff; margin: 0; font-weight: 600; }
.callout-cta .btn-primary { background: #ffffff; color: var(--primary); }
.callout-cta .btn-primary:hover { background: var(--bg-alt); }

.data-table { width: 100%; border-collapse: collapse; margin: 20px 0 28px; font-size: 0.9rem; }
.data-table th, .data-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--paper-border); vertical-align: top;
}
.data-table th {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); font-weight: 700;
}

.toc-box { background: var(--bg-alt); border-radius: var(--r-md); padding: 22px; margin-bottom: 24px; }
.toc-box h4 { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); margin-bottom: 14px; }
.toc-box ol { display: flex; flex-direction: column; gap: 10px; counter-reset: toc; }
.toc-box ol li { counter-increment: toc; font-size: 0.9rem; color: var(--text-main); display: flex; gap: 10px; }
.toc-box ol li::before { content: counter(toc); color: var(--primary); font-weight: 700; }

.post-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* --- Smart sticky sidebar (see js/smart-sticky.js) --- */
.smart-sticky { --ss-top: 96px; --ss-bottom: 24px; }
@media (min-width: 960px) {
  .smart-sticky { position: sticky; top: var(--ss-top); }
  .smart-sticky[data-ss="free"] { position: relative; top: var(--ss-offset, 0px); }
  .smart-sticky[data-ss="pin-top"] { position: sticky; top: var(--ss-top); }
  .smart-sticky[data-ss="pin-bottom"] { position: sticky; top: var(--ss-pin-bottom); }
}

/* Dark promo card — a small, deliberate accent alongside footer/showcase */
.promo-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-md);
  padding: 22px;
  color: var(--text-on-dark-400);
}
.promo-card .badge { margin-bottom: 12px; }
.promo-card h4 { color: var(--text-on-dark); font-size: 1rem; margin-bottom: 6px; }
.promo-price { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin: 10px 0 4px; }
.promo-price small { font-size: 0.7rem; color: var(--text-on-dark-400); font-weight: 500; }
.promo-card ul { margin: 14px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.promo-card ul li { font-size: 0.82rem; display: flex; gap: 8px; color: var(--text-on-dark-400); }
.promo-card ul li::before { content: "✓"; color: var(--accent); }
.promo-disclosure { font-size: 0.7rem; color: var(--text-on-dark-400); margin-top: 10px; font-style: italic; }

/* --- FOOTER (dark anchor #2) --- */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-400);
  padding: 80px 0 32px;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-dark);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand .brand { color: var(--text-on-dark); margin-bottom: 16px; }
.footer-brand .brand-mark { background: var(--accent); }
.footer-brand p { max-width: 280px; }

.footer-col h5 {
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a:hover { color: var(--text-on-dark); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Travelling border --- */
@property --tb-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.travel-border { position: relative; }

.travel-border::after {
  content: "";
  position: absolute;
  inset: var(--tb-gap);
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  padding: var(--tb-width);
  background: conic-gradient(from var(--tb-angle),
    rgba(0,0,0,0) 0deg,
    rgba(0,0,0,0) calc(360deg - var(--tb-tail) - 40deg),
    var(--tb-color) calc(360deg - var(--tb-tail)),
    var(--tb-highlight) calc(360deg - var(--tb-tail) * 0.35),
    rgba(0,0,0,0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .45s cubic-bezier(.22,.61,.36,1);
}

.travel-border:hover::after,
.travel-border:focus-within::after,
.travel-border--live::after {
  opacity: 1;
  animation: tb-run var(--tb-speed) linear infinite;
}

/* Sequenced: each element takes one lap in its own slot, then hands off to the next */
.travel-border--seq::after {
  animation: tb-seq calc(var(--tb-slot) * var(--tb-count)) linear infinite;
  animation-delay: calc(var(--tb-slot) * var(--tb-i, 0));
}
.travel-border--seq:hover::after,
.travel-border--seq:focus-within::after {
  animation: tb-seq calc(var(--tb-slot) * var(--tb-count)) linear infinite;
  animation-delay: calc(var(--tb-slot) * var(--tb-i, 0));
  opacity: 0;
}

.hero-chip { --tb-gap: 3px; }
/* Outward placement: ring sits --tb-gap outside the element. Needs --tb-radius = the host radius so the ring stays concentric. */
.travel-border--out::after {
  inset: calc(var(--tb-gap) * -1);
  border-radius: calc(var(--tb-radius, 0px) + var(--tb-gap));
}
.mockup { --tb-gap: 12px; --tb-radius: var(--r-lg); }

@keyframes tb-run {
  to { --tb-angle: 360deg; }
}

@keyframes tb-seq {
  0%   { --tb-angle: 0deg;   opacity: 0; }
  2%   { opacity: 1; }
  22%  { --tb-angle: 360deg; opacity: 1; }
  25%  { --tb-angle: 360deg; opacity: 0; }
  100% { --tb-angle: 360deg; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .travel-border--live::after {
    animation: none !important;
    opacity: 1;
    background: var(--tb-static);
  }
  .travel-border--seq::after { animation: none !important; opacity: 0; }
}

/* --- Floating icons --- */
:root {
  --fi-opacity: 0.2;
  --fi-color: var(--primary);
}

.has-float-icons { position: relative; overflow: hidden; }
.has-float-icons > .container { position: relative; z-index: 1; }

.float-icons {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  --fi-scale: 0.8;
}

.float-icon {
  position: absolute;
  left: var(--x, auto);
  right: var(--r, auto);
  top: var(--y, auto);
  bottom: var(--b, auto);
  width: calc(var(--size, 28px) * var(--fi-scale, 1));
  height: calc(var(--size, 28px) * var(--fi-scale, 1));
  color: var(--fi-color);
  opacity: var(--fi-opacity);
  display: none;
  will-change: transform;
  animation:
    fi-in 1.4s ease-out var(--in, 0s) both,
    fi-float var(--dur, 11s) ease-in-out var(--delay, 0s) infinite;
}

.float-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.float-icon--accent { --fi-color: var(--accent); }

/* Visibility ladder: phones show only .fi-m; tablets add the rest; wide screens add margin icons */
.float-icon.fi-m { display: block; }
@media (min-width: 768px) {
  .float-icons { --fi-scale: 1; }
  .float-icon:not(.fi-wide):not(.fi-lg):not(.fi-xl) { display: block; }
}
@media (min-width: 1024px) { .float-icon.fi-lg { display: block; } }
@media (min-width: 1360px) { .float-icon.fi-wide { display: block; } }
@media (min-width: 1400px) { .float-icon.fi-xl   { display: block; } }

@keyframes fi-in {
  from { opacity: 0; }
  to   { opacity: var(--fi-opacity); }
}

@keyframes fi-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(var(--dx, 6px), var(--dy, -12px), 0) rotate(var(--rot, 5deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .float-icon { animation: none; }
}

/* --- Why section: checklist card + floating pills --- */
.why-grid { align-items: stretch; gap: 64px; }
@media (max-width: 1024px) { .why-grid { gap: 44px; } }
@media (max-width: 768px) { .why-grid { gap: 40px; } }

/* Equal-height card (stretches to the copy column), evenly spaced items, travelling border 12px outside */
.checklist-card {
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  --tb-gap: 12px;
  --tb-radius: var(--r-lg);
}
.checklist-card li { font-size: 1rem; line-height: 1.5; }
.checklist-card li strong { color: var(--text-main); }
@media (max-width: 768px) { .checklist-card { padding: 28px 22px; gap: 24px; } }
@media (max-width: 400px) { .checklist-card { padding: 24px 16px; } }

/* Floating pills: staggered entrance when scrolled into view, then a slow, subtle drift */
.float-pills { display: flex; flex-wrap: wrap; gap: 14px; }
.float-pills .pain-chip { margin: 0; }

.float-pill { opacity: 0; will-change: transform; }
.float-pills.is-visible .float-pill {
  animation:
    fp-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) calc(var(--i, 0) * 0.16s) both,
    fp-float var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes fp-in {
  from { opacity: 0; translate: 0 14px; scale: 0.92; }
  to   { opacity: 1; translate: 0 0;    scale: 1; }
}

@keyframes fp-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(var(--dx, 4px), var(--dy, -5px), 0) rotate(var(--rot, 1deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .float-pill, .float-pills.is-visible .float-pill { opacity: 1; animation: none; }
}

/* --- Scroll reveal --- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section--tight { padding: 40px 0; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .analysis-form, .subscribe-form { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; }

  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .service-row-head { flex-direction: column; }
}
