/* ============ HERO SECTIONS ============ */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6.7rem 0;
  text-align: center;
  position: relative; 
  height: calc(100vh - 137px);
  min-height: calc(100vh - 137px);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--fg-2);
  margin-bottom: 3rem;
  letter-spacing: -0.005em;
}

.hero-pill-badge {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.5vw, 6.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 auto 2.5rem;
}

.hero-title .light {
  font-weight: 300;
  color: var(--fg-2);
}

.hero-lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 auto 3.5rem;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  font-family: var(--sans);
  letter-spacing: -0.005em;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  color: var(--fg);
  border-color: var(--line-2);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--fg-3); background: var(--surface); }

.btn .arr { transition: transform 0.2s; display: inline-block; }
.btn:hover .arr { transform: translateX(3px); }

.hero > .container { position: relative; z-index: 1; }

/* ============ COMPACT SUB-PAGE HEADER ============ */
.page-header {
  height: calc(100vh - 61px);
  min-height: calc(100vh - 61px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
  padding-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.node-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.page-header .container {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
}

.page-header .section-label {
  text-align: left;
  margin-bottom: 1rem;
}

.page-title {
  font-family: var(--sans);
  font-size: clamp(3rem, 7vw, 6.1rem); /* Scales beautifully to 6.1rem on large screens */
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 14ch;
  margin: 0 0 1.25rem;
}

.page-lead {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--fg-2);
  margin: 0;
}

/* ============ BOTTOM-ANCHORED HERO LAYOUT ============ */
.bottom-hero-header {
  position: relative;
  height: calc(100vh - 61px);
  min-height: calc(100vh - 61px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
}

body:has(.trust-strip) .page-header {
  height: calc(100vh - 137px);
  min-height: calc(100vh - 137px);
}

body:has(.trust-strip) .page-header .container{
  padding-bottom: 0;
}

.hero-visual-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 50%, rgba(10, 10, 10, 1) 100%), rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.hero-visual-wrapper.is-home {
  height: 100%;
  z-index: 0;
}

.hero-visual-overlay.is-home {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 30%, rgba(10, 10, 10, 1) 100%), rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1.3px);
  -webkit-backdrop-filter: blur(1.3px);
}

.hero-content-bottom {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: flex;
  align-items: center;
  padding-bottom: 140px;
}

.hero-text-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-text-stack .section-label {
  margin-bottom: 0.75rem;
}

.hero-text-stack .page-title {
  margin: 0 0 1rem 0 !important;
  font-size: clamp(2.2rem, 4.5vw, 3rem) !important;
  line-height: 1.15;
  text-align: left;
  max-width: 900px;
}

.hero-text-stack .page-lead {
  margin: 0 0 1.5rem 0 !important;
  max-width: 80ch;
  text-align: left;
  font-size: 1rem;
  color: var(--fg-2);
}

.hero-text-stack .hero-cta-row {
  display: flex;
  gap: 1.25rem;
  margin-top: 0 !important;
}

/* Animations will now be handled globally via .reveal in main.js and global.css */

.node-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allows users to click buttons through it */
  z-index: 0;
  opacity: 0.85;
  background: radial-gradient(circle at center, #111111 0%, #020202 100%);
}


@media (max-width: 992px) {
  .bottom-hero-header {
    height: auto;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .hero-content-bottom {
    position: relative;
    height: auto;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
    display: flex;
    align-items: center;
  }

  .hero-visual-overlay.is-home {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0) 30%, rgba(10, 10, 10, 1) 100%), rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0.7);
    -webkit-backdrop-filter: blur(0.7px);
  }
}

/* ============ RESPONSIVE: TABLET (≤ 768px) ============ */
@media (max-width: 768px) {
  /* Unlocks from desktop nav height; mobile nav is ~60px */
  .hero {
    height: auto;
    min-height: calc(100svh - 60px);
    padding: 4rem 0;
  }

  .hero-pill {
    margin-bottom: 2rem;
  }

  /* Fixed 1.2rem is fine on tablet; trim bottom spacing */
  .hero-lead {
    margin-bottom: 2.5rem;
  }

  /* Sub-page header: loosen min-height so content breathes */
  .page-header {
    min-height: 70svh;
    padding-top: 4.5rem;
    padding-bottom: 2rem;
  }

  /* 3rem minimum is too large at this width - pull floor down */
  .page-title {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    letter-spacing: -0.035em;
  }

  .page-lead {
    font-size: 0.975rem;
    line-height: 1.7;
  }

  /* Bottom-hero text: tighten title and lead at tablet */
  .hero-text-stack .page-title {
    font-size: clamp(1.85rem, 4.5vw, 2.5rem) !important;
  }

  .hero-text-stack .page-lead {
    font-size: 0.95rem !important;
  }

  .hero-text-stack .hero-cta-row {
    gap: 0.75rem;
  }
}

/* ============ RESPONSIVE: PHONE (≤ 480px) ============ */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 0;
  }

  .hero-pill {
    font-size: 0.78rem;
    margin-bottom: 1.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  }

  .hero-pill-badge {
    font-size: 0.62rem;
  }

  /* Tighten letter-spacing at small sizes so it doesn't cramp */
  .hero-title {
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  /* Stack CTA buttons full-width so neither gets clipped */
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    padding: 0.8rem 1.25rem;
    font-size: 0.875rem;
  }

  /* Sub-page header */
  .page-header {
    min-height: 65svh;
    padding-top: 4rem;
  }

  .page-title {
    font-size: clamp(1.9rem, 8vw, 2.75rem);
    letter-spacing: -0.028em;
    line-height: 1.05;
  }

  .page-lead {
    font-size: 0.925rem;
  }

  /* Bottom-hero stack: keep CTAs as row but let them wrap */
  .hero-text-stack .page-title {
    font-size: clamp(1.65rem, 6vw, 2rem) !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-text-stack .page-lead {
    font-size: 0.9rem !important;
    margin-bottom: 1.25rem !important;
  }

  .hero-text-stack .hero-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero-content-bottom {
    padding-bottom: 2.5rem;
  }
}

/* ============ RESPONSIVE: SMALL PHONE (≤ 360px → 320px) ============ */
@media (max-width: 360px) {
  .hero {
    padding: 2.5rem 0;
  }

  .hero-pill {
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 9vw, 1.9rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
  }

  .hero-lead {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .page-header {
    min-height: 60svh;
  }

  .page-title {
    font-size: clamp(1.65rem, 9vw, 2rem);
    letter-spacing: -0.022em;
  }

  .page-lead {
    font-size: 0.875rem;
    line-height: 1.65;
  }

  .hero-text-stack .page-title {
    font-size: clamp(1.45rem, 9vw, 1.7rem) !important;
    line-height: 1.1 !important;
  }

  .hero-text-stack .page-lead {
    font-size: 0.85rem !important;
  }

  /* At 320px, stack bottom-hero CTAs vertically */
  .hero-text-stack .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}


