/* ============================================================================
   LANDING PAGE — mirrors the tradeworklabs.com marketing aesthetic.
   Cream canvas, Playfair display serifs, Geist body, terracotta accents,
   refined dotted texture. All rules scoped to `body.landing-page` so the
   admin UI is unaffected.
   ============================================================================ */

body.landing-page {
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--color-cream);
  color: var(--color-ink-900);
  font-feature-settings: 'ss01', 'cv11';
}

body.landing-page,
body.landing-page * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body offset — nav is fixed, hero-section clears it with its own top padding. */
body.landing-page.has-site-nav {
  padding-top: 0;
}

/* ============================================================================
   NAV — transparent over orange hero, inverts to cream/ink after scroll
   ============================================================================ */

body.landing-page .site-nav {
  transition: background-color 0.3s ease, border-color 0.3s ease,
              backdrop-filter 0.3s ease;
}

/* Over-hero state — transparent, white text/logo */
body.landing-page .site-nav:not(.site-nav--scrolled) {
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__brand {
  color: #fff;
  border-right-color: rgba(255, 255, 255, 0.22);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__logo {
  filter: brightness(0) invert(1);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__link {
  color: rgba(255, 255, 255, 0.85);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__link--active {
  color: #fff;
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__link--active::after {
  background: #fff;
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__separator {
  background: rgba(255, 255, 255, 0.22);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__org-label,
body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__dropdown-arrow {
  color: rgba(255, 255, 255, 0.75);
}

/* What's New bell over the orange hero — white icon, white dot (the default
   orange dot would vanish into the hero). Reverts to defaults once scrolled. */
body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__whatsnew {
  color: rgba(255, 255, 255, 0.85);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__whatsnew:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__whatsnew-dot {
  background: #fff;
  box-shadow: 0 0 0 2px hsl(var(--brand-orange));
}

body.landing-page .site-nav.site-nav--scrolled .site-nav__whatsnew {
  color: var(--color-ink-700);
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__cta {
  background: #fff;
  color: hsl(var(--brand-orange));
  border-radius: 9999px;
  padding: 8px 20px;
  font-weight: 600;
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__cta:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: none;
}

body.landing-page .site-nav:not(.site-nav--scrolled) .site-nav__mobile-toggle .site-nav__hamburger span {
  background: #fff;
}

/* Scrolled (post-hero) state — cream/ink */
body.landing-page .site-nav.site-nav--scrolled {
  background: rgba(251, 241, 236, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-ink-200);
}

body.landing-page .site-nav.site-nav--scrolled .site-nav__brand {
  color: var(--color-ink-900);
  border-right-color: var(--color-ink-200);
}

body.landing-page .site-nav.site-nav--scrolled .site-nav__link {
  color: var(--color-ink-700);
}

body.landing-page .site-nav.site-nav--scrolled .site-nav__link:hover {
  color: var(--color-ink-900);
}

body.landing-page .site-nav.site-nav--scrolled .site-nav__cta {
  border-radius: 9999px;
  padding: 8px 20px;
}

body.landing-page .site-nav__brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ============================================================================
   HERO — full-width orange slab, white Playfair headline, cursor bloom
   ============================================================================ */

.hero-wrapper {
  position: relative;
  overflow: hidden;
  background: hsl(var(--brand-orange));
}

/* Subtle dotted texture over the orange so the slab feels made of paper,
   not a plain fill. Masked so the dots fade to the edges. */
.hero-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 110% 90% at 50% 50%, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 110% 90% at 50% 50%, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Living dot-field canvas (injected by /js/hero-particles.js) — sits under
   the content, over the orange fill, alongside the static paper dots. */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-section {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 148px 28px 116px;
  text-align: center;
}

.hero-section--compact {
  padding: 128px 28px 88px;
}

/* Eyebrow label above headline — white, uppercase, tracked */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 28px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(46px, 6.6vw, 82px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
}

/* Thin white accent between headline and subtitle */
.hero-accent {
  width: 56px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  margin: 30px auto 28px;
  opacity: 0.85;
}

.hero-description {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  margin: 0 auto 44px;
  max-width: 580px;
  font-weight: 400;
}

.hero-description strong {
  color: #fff;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 9999px;
  transition: background-color 0.18s ease, transform 0.18s ease,
              box-shadow 0.18s ease, color 0.18s ease;
}

/* White pill CTA sits on the orange slab */
.hero-cta .btn-primary-orange {
  background: #fff;
  color: hsl(var(--brand-orange));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06),
              0 12px 24px -10px rgba(0, 0, 0, 0.25);
}

.hero-cta .btn-primary-orange:hover {
  background: #fff;
  color: hsl(var(--brand-orange-hover));
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
              0 16px 28px -12px rgba(0, 0, 0, 0.3);
}

/* Ghost secondary link — white on orange */
.hero-cta .btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.hero-cta .btn-ghost:hover {
  color: #fff;
}

.hero-cta .btn-ghost .btn-ghost__arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.hero-cta .btn-ghost:hover .btn-ghost__arrow {
  transform: translateX(3px);
}

/* ============================================================================
   ENTRANCE ANIMATIONS — staggered reveal
   ============================================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-section .hero-eyebrow  { animation: fadeUp 0.7s ease-out both; }
.hero-section .hero-title    { animation: fadeUp 0.75s ease-out 0.1s both; }
.hero-section .hero-accent   { animation: fadeUp 0.75s ease-out 0.25s both; }
.hero-section .hero-description { animation: fadeUp 0.75s ease-out 0.35s both; }
.hero-section .hero-cta      { animation: fadeUp 0.75s ease-out 0.45s both; }

/* Scroll-triggered reveal for lifecycle stages and section header.
   Uses CSS animation (more reliable than transition+class-swap timing).
   Element starts hidden; `is-visible` triggers the animation. */
.lifecycle-stage {
  opacity: 0;
  transform: translateY(28px);
}
.lifecycle-stage.is-visible {
  animation: fadeUp 0.65s ease-out forwards;
}
.lifecycle-stage:nth-child(2).is-visible { animation-delay: 0.08s; }
.lifecycle-stage:nth-child(3).is-visible { animation-delay: 0.16s; }

.features-section-label,
.features-section-title {
  opacity: 0;
  transform: translateY(14px);
}
.features-section-label.is-visible { animation: fadeUp 0.55s ease-out forwards; }
.features-section-title.is-visible { animation: fadeUp 0.55s ease-out 0.08s forwards; }

.hero-hidden { display: none !important; }

/* ============================================================================
   LIFECYCLE SECTION — editorial vertical flow, no cards
   Big Playfair numerals, wide type, a continuous terracotta rule running
   through all three stages to imply the arc.
   ============================================================================ */

#features {
  background: var(--color-cream);
  max-width: none;
  padding: 0;
  position: relative;
  border-top: 1px solid var(--color-ink-200);
}

/* Subtle paper grain texture */
#features::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
  z-index: 0;
}

#features > * {
  position: relative;
  z-index: 1;
}

.lifecycle-section {
  padding: 0;
}

.lifecycle-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 32px 132px;
}

.features-section-label {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-terracotta-500);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 20px;
}

.features-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 500;
  color: var(--color-ink-900);
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0 0 96px;
  max-width: 780px;
}

/* The ordered list — positioned so the numerals share a vertical rail and
   a thin terracotta line connects all three stages. */
.lifecycle {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  counter-reset: lifecycle;
}

/* The connecting rail — a faint ink line behind the numerals */
.lifecycle::before {
  content: '';
  position: absolute;
  left: 68px; /* centered under the numerals */
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0,
    var(--color-ink-200) 8%,
    var(--color-ink-200) 92%,
    transparent 100%
  );
}

.lifecycle-stage {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 40px;
  padding: 56px 0;
  position: relative;
  border-bottom: 1px solid var(--color-ink-200);
}

.lifecycle-stage:first-child { padding-top: 0; }
.lifecycle-stage:last-child { border-bottom: none; padding-bottom: 0; }

/* Large editorial numeral */
.lifecycle-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 88px;
  font-weight: 400;
  color: var(--color-terracotta-500);
  line-height: 1;
  letter-spacing: -0.03em;
  grid-column: 1;
  align-self: start;
  position: relative;
  /* cover the rail where the numeral sits */
  background: var(--color-cream);
  padding: 2px 0 8px;
}

.lifecycle-body {
  grid-column: 2;
  max-width: 680px;
  padding-top: 6px;
}

.lifecycle-eyebrow {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-500);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 14px;
}

.lifecycle-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  color: var(--color-ink-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
}

.lifecycle-prose {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 17px;
  color: var(--color-ink-700);
  line-height: 1.65;
  margin: 0 0 22px;
  max-width: 620px;
}

/* Signature capability — italic Playfair words inline with Geist */
.lifecycle-signature {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 14.5px;
  color: var(--color-ink-900);
  line-height: 1.5;
  margin: 0;
  padding-top: 2px;
}

.lifecycle-signature em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--color-terracotta-700);
  letter-spacing: -0.005em;
}

.lifecycle-signature__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-terracotta-500);
  flex-shrink: 0;
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(213, 90, 46, 0.12);
}

/* ============================================================================
   SOCIAL PROOF BAND — dark ink band, paper text, Playfair pull-quote feel
   ============================================================================ */

.proof-section {
  background: var(--color-ink-900);
  padding: 88px 24px;
  text-align: center;
  color: var(--color-paper);
  position: relative;
  overflow: hidden;
}

.proof-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 253, 250, 0.06) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 0%, transparent 100%);
  pointer-events: none;
}

.proof-text {
  position: relative;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--color-paper);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.proof-text strong {
  font-family: 'Geist', system-ui, sans-serif;
  font-style: normal;
  font-weight: 600;
  color: var(--color-terracotta-300);
  letter-spacing: 0.01em;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.landing-footer {
  background: var(--color-ink-900);
  border-top: 1px solid rgba(255, 253, 250, 0.06);
  padding: 56px 24px 40px;
  text-align: center;
  position: relative;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.landing-footer-logo {
  height: 22px;
  width: auto;
  opacity: 0.6;
  filter: brightness(0) invert(1);
}

.landing-footer-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(255, 253, 250, 0.8);
  letter-spacing: -0.01em;
}

.landing-footer-links {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-bottom: 20px;
}

.landing-footer-links a {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255, 253, 250, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}

.landing-footer-links a:hover {
  color: var(--color-terracotta-300);
}

.landing-footer-copyright {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255, 253, 250, 0.35);
  margin: 0;
  letter-spacing: 0.01em;
}

/* ============================================================================
   MOBILE
   ============================================================================ */

@media (max-width: 860px) {
  .lifecycle-stage {
    grid-template-columns: 88px 1fr;
    gap: 24px;
  }

  .lifecycle::before {
    left: 44px;
  }

  .lifecycle-num {
    font-size: 64px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 124px 18px 72px;
  }

  .hero-title {
    font-size: clamp(36px, 9vw, 48px);
    letter-spacing: -0.022em;
  }

  .hero-accent {
    margin: 22px auto 20px;
  }

  .hero-description {
    font-size: 16.5px;
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  body.landing-page .hero-section {
    padding-top: 112px;
  }

  .lifecycle-inner {
    padding: 84px 20px 96px;
  }

  .features-section-title {
    font-size: clamp(28px, 8vw, 38px);
    margin-bottom: 56px;
  }

  /* On mobile, drop the grid and stack the numeral above the body for easier reading */
  .lifecycle-stage {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 44px 0;
  }

  .lifecycle::before {
    display: none;
  }

  .lifecycle-num {
    font-size: 56px;
    padding: 0;
    background: transparent;
  }

  .lifecycle-body {
    padding-top: 0;
  }

  .lifecycle-title {
    font-size: clamp(24px, 6.5vw, 30px);
  }

  .lifecycle-prose {
    font-size: 16px;
  }

  .proof-section {
    padding: 64px 18px;
  }

  .landing-footer {
    padding: 40px 18px 28px;
  }

  .landing-footer-links {
    flex-direction: column;
    gap: 14px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-section .hero-eyebrow,
  .hero-section .hero-title,
  .hero-section .hero-accent,
  .hero-section .hero-description,
  .hero-section .hero-cta {
    animation: none;
  }

  .lifecycle-stage,
  .features-section-label,
  .features-section-title {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
