/* ---------- HERO ---------- */

#home-page .hero {
  position: relative;
  height: 80vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  background: var(--bg-000);
}
/* .hero::after{
    position:absolute;
    content:"";
    inset: 0;
  }

  .hero h1, h2{

  } */

/* content sits at 45% vertical alignment, per spec, rather than dead-centre */
#home-page .hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
  text-align: center;
  transform: translateY(-5%);
}

#home-page .eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(from var(--bg-000) 100% c h / 0.4);
  margin: 0 0 20px 0;
  opacity: 0;
  animation: rise 700ms ease forwards;
  animation-delay: 80ms;
}

#home-page h1 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--text-col-200);
  opacity: 0;
  animation: rise 700ms ease forwards;
  animation-delay: 180ms;
  & span {
    font-family: var(--font-family-logo), sans-serif;
    font-weight: 600;
    
  }
}

#home-page h1 .accent {
  color: var(--colour-brand);
}


#home-page .hero-subheadings p {
  margin: 24px auto 0 auto;
  max-width: 520px;
  font-size: clamp(0.9rem, 3vw ,1.2rem);
  font-weight: var(--font-weight-medium) !important;
  line-height: 1.6;
  color: oklch(from var(--text-col-400) l c h / 0.8);
  opacity: 0;
  animation: rise 700ms ease forwards;
  animation-delay: 300ms;
  & span{
    font-size: clamp(0.8rem, 2.5vw ,0.95rem);;
    color: oklch(from var(--text-col-400) l c h / 0.6);
    font-weight: var(--font-weight-medium) !important;
  }
}


/* ---------- BACKGROUND ILLUMINATION (2–5% opacity, no visible edges) ---------- */

#home-page .illum {
  position: absolute;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  pointer-events: none;
  background: radial-gradient(
    circle at 180% -100%,
    oklch(from var(--primary-col) 0.35 c h),
    oklch(from var(--primary-col) 0.05 c h) 70%
  );
}
#home-page .illum::before,
#home-page .illum::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  filter: blur(120px);
  background: oklch(from var(--primary-col) 0.25 c h);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}
#home-page .illum::before {
  width: 900px;
  height: 900px;
  top: -300px;
  left: -200px;
  opacity: 1;
  display: none;
}
#home-page .illum::after {
  width: 700px;
  height: 700px;
  bottom: -320px;
  right: -100px;
  opacity: 1;
  display: none;
}
#home-page .hero.scrolled-a .illum::before {
  opacity: 0.05;
  transform: translate(10px, 10px);
}
#home-page .hero.scrolled-a .illum::after {
  opacity: 0.04;
  transform: translate(-10px, -6px);
}

/* ---------- SIGNATURE ELLIPSE — oversized, offset, monochrome, discovered not presented ---------- */

#home-page .hero {
  & .hero-ellipse-wrap {
    position: absolute;
    z-index: 1;
    top: max(-18vh, -160px);
    left: -20vw;
    width: 120vw;
    width: clamp(800px, 100vw + 200px, 140vw);
    height: clamp(450px, 110%, min(110%, 950px));
    pointer-events: none;
  }

  & .hero-ellipse {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid oklch(from var(--primary-col) 0.3 c h);
    background: radial-gradient(
      circle at 63% 22%,
      oklch(from var(--primary-col) 0.25 c h),
      oklch(from var(--primary-col) 0.05 c h) 70%
    );
    box-shadow:
      0 0 18px 2px oklch(from var(--primary-col) 0.35 c h / 0.62),
      inset 0 0 12px 0px oklch(from var(--primary-col) 0.35 c h / 0.36);
    transition:
      opacity 900ms ease,
      transform 900ms ease,
      box-shadow 900ms ease;
    position: relative;
    animation: hero-ellipse-glow linear both;
    animation-timeline: scroll(root);
    animation-range: 0% 20%; /* completes by 40% of page scroll */
  }
}

@media (width <= 1024px) {
  #home-page .hero {
    & .hero-ellipse-wrap {
      left: 50%;
      top: 0%;
      transform: translate(-50%, 0%);
      width: min(100vw, 1024px);
      height: clamp(400px, 60vw, 490px) !important;
    }
    & .hero-ellipse {
      background: radial-gradient(
        circle at 50% 22%,
        oklch(from var(--primary-col) 0.25 c h),
        oklch(from var(--primary-col) 0.05 c h) 70%
      );
      position: absolute;
      left: 50%;
      top: 0 !important;
      transform: translate(-50%, 0%);
    }
  }
}

@keyframes hero-ellipse-glow {
  from {
    box-shadow:
      0 0 18px 2px oklch(from var(--primary-col) 0.35 c h / 0.22),
      inset 0 0 12px 0px oklch(from var(--primary-col) 0.35 c h / 0.16);
    border-color: oklch(from var(--primary-col) 0.3 c h);
  }
  to {
    box-shadow:
      0 0 60px 12px oklch(from var(--primary-col) 0.5 c h / 0.5),
      inset 0 0 36px 6px oklch(from var(--primary-col) 0.5 c h / 0.25);
    border-color: oklch(from var(--primary-col) 0.6 c h);
  }
}

/* faint grain to stop the flat dark field feeling sterile */
#home-page .grain {
  position: absolute;
  inset: 0;
  z-index: 2000;
  opacity: 0.2;
  mix-blend-mode: screen;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero CTA overrides — timed on load since it's already in the viewport */
#home-page .hero .cta {
  animation: rise 700ms ease 400ms forwards;
}

@media (width <= 1024px) {
  #home-page .hero-ellipse-wrap {
    top: max(8vh, 50px) !important;
  }
  #home-page .hero-content {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translate(-50%, 10vh);
  }
  #home-page .hero,
  #home-page .section-hero {
    min-height: 400px;
    height: max(75vw, 500px);
    max-height: max(590px, 55vw) !important;
    position: relative;
  }
  #home-page .hero .eyebrow {
    visibility: hidden;
    display: none;
  }
}

/* Hero min-height for short viewports (e.g., mobile landscape) */
@media (height < 800px) {
  #home-page .hero .eyebrow {
    visibility: hidden;
    display: none;
  }
}

@media (width < 850px) {
  #home-page .hero .hero-ellipse-wrap {
    left: 50%;
    transform: translateX(-50%);
    width: clamp(580px, 130vw, 1024px);
  }

  #home-page .hero .hero-ellipse{
    border: none;
  }
}
