/* Minimal extras on top of Tailwind CDN to match React demo behavior */
html { scroll-behavior: smooth; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Motion-like utilities: keep content visible across all devices */
[data-animate] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform;
}
[data-animate="fade-up"] { transform: translate3d(0, 0, 0); }
[data-animate="fade-in"] { transform: none; }
[data-animate="slide-in-left"] { transform: translate3d(0, 0, 0); }
[data-animate="slide-in-right"] { transform: translate3d(0, 0, 0); }
[data-animate="slide-in-up"] { transform: translate3d(0, 0, 0); }

.in-view {
  opacity: 1 !important;
  transform: translate3d(0,0,0) !important;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.in-view.slow { transition-duration: 1.2s; }
.in-view.fast { transition-duration: 0.6s; }

/* Bars */
.bar-track { position: relative; overflow: hidden; }
.bar-fill { width: 0; height: 100%; }
.bar-animate { transition: width 1.5s cubic-bezier(.22,1,.36,1); }
.bar-animate.delay { transition-delay: .3s; }

/* Mobile drawer */
#mobileMenu { display: none; }
#mobileMenu.open { display: block; }

/* Active underline (desktop) */
.nav-active { color: rgb(15 23 42); }
.nav-inactive { color: rgb(100 116 139); }

/* Prevent horizontal overflow and improve wrapping on small screens */
html, body { overflow-x: hidden; }

/* Ensure long inline text wraps nicely on small screens */
p, li, a {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  white-space: normal;
}

/* Keep headings on word boundaries (prevent CONTRO + L breaks) */
h1, h2, h3, h4, h5 {
  word-wrap: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
}

/* Homepage hero: never break inside words */
.home-hero-title {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  line-height: 0.8 !important;
  letter-spacing: -0.03em !important;
  font-size: clamp(3.2rem, 13vw, 4.8rem) !important;
  max-width: 100%;
}

.home-hero-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 0.18em;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

.home-hero-word {
  display: inline-block;
  white-space: nowrap !important;
  word-break: keep-all !important;
  hyphens: none !important;
}

.home-hero-eyebrow {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

/* Responsive clamp for hero/large headings (h1) */
.text-responsive-clamp {
  font-size: clamp(4.5rem, 7.5vw, 9.5rem);
  line-height: 0.95;
  word-break: break-word;
}

/* Responsive clamp for large section headings (h2, h3) */
.text-6xl, .text-7xl {
  font-size: clamp(2.75rem, 5.5vw, 4.5rem) !important;
  line-height: 1.1 !important;
  word-break: break-word;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}

/* Extra specificity for h2/h3 with these size classes */
h2.text-6xl, h2.text-7xl, h3.text-6xl, h3.text-7xl {
  font-size: clamp(2.75rem, 5.5vw, 4.5rem) !important;
  line-height: 1.1 !important;
}

/* Tighten Tailwind large-heading utilities on small screens to avoid overflow */
@media (max-width: 640px) {
  .text-9xl { font-size: 5.5rem !important; line-height: 1 !important; }
  .text-8xl { font-size: 4.5rem !important; line-height: 1 !important; }
  .text-7xl { font-size: 3.5rem !important; }
  .text-6xl { font-size: 2.75rem !important; }
}

@media (max-width: 767px) {
  .home-hero-line {
    flex-wrap: wrap;
    gap: 0 0.14em;
  }

  .home-hero-title {
    font-size: clamp(4.45rem, 16.8vw, 5.15rem) !important;
  }
}

@media (min-width: 768px) {
  .home-hero-line {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .home-hero-title {
    font-size: clamp(4.6rem, 9.5vw, 11rem) !important;
  }
}

/* Extra small phones: reduce hero title to prevent character-level wraps */
@media (max-width: 420px) {
  .home-hero-title {
    font-size: clamp(4.1rem, 16.8vw, 4.8rem) !important;
    line-height: 0.82 !important;
  }
}

@media (min-width: 640px) {
  .home-hero-title {
    font-size: clamp(4.4rem, 10vw, 11rem) !important;
  }
}
