/* Critical, first-request styling for the crawler-readable homepage.
   Keep this visually aligned with src/components/HeroSection.tsx. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

.seo-first-paint,
.seo-first-paint *,
.seo-first-paint *::before,
.seo-first-paint *::after { box-sizing: border-box; }
.seo-first-paint {
  position: relative;
  min-height: 100vh;
  background: #060504;
}
.seo-first-paint-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: #060504;
  color: hsl(40 20% 92%);
  text-align: center;
}
.seo-first-paint-photo,
.seo-first-paint-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.seo-first-paint-photo {
  background: url('/digital-scent-energy-hero.webp') center / cover no-repeat;
  transform: scale(1.07);
}
.seo-first-paint-shade {
  background:
    radial-gradient(ellipse 42% 48% at 50% 42%,
      rgba(3, 3, 3, .43), rgba(3, 3, 3, .25) 60%, transparent 100%),
    linear-gradient(to bottom, rgba(0,0,0,.05), transparent 72%, rgba(5,4,3,.40));
}
.seo-first-paint-content {
  position: relative;
  z-index: 1;
  /* React's max-w-3xl hero wrapper is a shrink-to-fit flex item. */
  width: auto;
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.seo-first-paint-eyebrow {
  margin: 0 0 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: hsl(0 0% 57%);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.seo-first-paint h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.025em;
}
.seo-first-paint h1 span {
  font-weight: 300;
  font-style: italic;
  color: hsl(40 68% 54%);
}
.seo-first-paint-description {
  max-width: 32rem;
  margin: 2rem auto 0;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 300;
  line-height: 1.625;
  color: hsl(0 0% 57%);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.seo-first-paint-description span {
  color: hsl(40 20% 92% / .72);
}
.seo-first-paint-cta { margin-top: 3rem; }
.seo-first-paint-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 1.5rem 2.5rem;
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  color: hsl(0 0% 4%);
  background: hsl(40 68% 54%);
  box-shadow: 0 0 40px hsl(40 68% 54% / .3), 0 0 80px hsl(40 68% 54% / .1);
}
.seo-first-paint-scroll-indicator { width: 1px; height: 3rem; margin: 6rem auto 0;
  background: linear-gradient(to bottom, transparent, hsl(40 68% 54% / .4), transparent);
}
/* Show the SEO H1 immediately during JavaScript/React boot, instead of
   leaving the center empty until the lazy route, image and fonts load. Keep
   the rest of the temporary layout hidden so CTA/description never jump.
   CSS visibility can be overridden on a descendant without showing siblings.
   The existing atomic handoff replaces this with the real React H1. */
.ek-hero-title-pending .seo-first-paint-content { visibility: hidden; }
.ek-hero-title-pending .seo-first-paint-content h1 {
  visibility: visible;
  /* Match the vertical position of the final React headline at handoff. */
  transform: translateY(10px);
}
@media (min-width: 768px) {
  .ek-hero-title-pending .seo-first-paint-content h1 {
    transform: translateY(12px);
  }
}
body.ek-first-paint-pending #root { visibility: hidden; }
/* Hold the SEO hero above the React tree for a compositor-safe handoff.
   Removing the DOM on the same frame as revealing React caused H1 blinking. */
body.ek-first-paint-pending > .seo-first-paint,
body.ek-first-paint-overlay > .seo-first-paint {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  opacity: 1;
  transition: opacity 220ms ease-out;
}
/* Opacity stays at 1 while React mounts and stabilizes. Only after 6
   visibly rendered frames does JavaScript add the handoff class. */
body.ek-first-paint-overlay.ek-first-paint-handoff > .seo-first-paint {
  opacity: 0;
  pointer-events: none;
}
/* Keep the actual hero text continuously visible at handoff, even after
   subsequent React rerenders. Only the initial hero animations are suppressed. */
body.ek-skip-initial-hero-animation #root [data-testid='hero-section'] .animate-reveal-up {
  animation: none !important;
  opacity: 1;
  transform: none;
  filter: none;
}
@media (min-width: 640px) {
  .seo-first-paint h1 { font-size: 3rem; }
}
@media (min-width: 768px) {
  .seo-first-paint h1 { font-size: 3.75rem; }
  .seo-first-paint-description { font-size: 1rem; }
}
@media (min-width: 1024px) {
  .seo-first-paint h1 { font-size: 4.5rem; }
}
@media (max-width: 767px) {
  /* The mobile first paint uses the SAME single image and center crop as React.
     Never stitch the image from independently positioned left/right halves. */
  .seo-first-paint-photo {
    background-image: url('/mobile-hero-original.jpg');
    background-position: center;
    background-size: cover;
    transform: none;
  }
  .seo-first-paint-shade {
    background:
      radial-gradient(ellipse 86% 50% at 50% 42%,
        rgba(3,3,3,.70), rgba(3,3,3,.49) 60%, transparent),
      linear-gradient(to bottom, rgba(2,2,2,.13), transparent 60%, rgba(4,3,2,.46));
  }
}
