/* ==========================================================================
   hero.css — full-height hero: copy on the left, console panel on the right

   Layout mirrors the reference's 60/40 split. The backdrop is generated in
   CSS: a slow-drifting blue aurora, a masked dot field, and a veil that
   guarantees text contrast. Content enters in a stagger via .ds-hero-enter,
   with each block's offset, blur and delay set inline in the markup.
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--ds-header-height) + var(--ds-space-9)) var(--ds-space-9);
  overflow: hidden;
  background-color: var(--ds-color-bg-page);
  isolation: isolate;
}

/* --- backdrop ------------------------------------------------------------- */

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: var(--ds-color-bg-page);
}

.hero__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

/* Soft blue field, drifting slowly. Three overlapping radial gradients read
   as one fluid wash rather than three discrete blobs. */
.hero__aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 40% 50% at 20% 30%, rgba(77, 107, 254, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse 35% 45% at 65% 20%, rgba(103, 153, 254, 0.35) 0%, transparent 62%),
    radial-gradient(ellipse 45% 40% at 45% 70%, rgba(138, 63, 252, 0.28) 0%, transparent 65%);
  filter: blur(70px);
  opacity: 0.9;
  will-change: transform;
  animation: hero-drift 34s var(--ds-ease-in-out) infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6%, -4%, 0) scale(1.12);
  }
}

/* --- canvas layers -------------------------------------------------------- */

.hero__flow,
.hero__mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* The field is drawn as smooth gradients, so it needs only a light blur to
   kill any banding. It is scaled up slightly because blur softens the outer
   edge, and the canvas is opaque — without the overscan the page colour would
   show through around the rim. */
.hero__flow {
  filter: blur(20px);
  transform: scale(1.06);
  opacity: 0;
  transition: opacity 900ms var(--ds-ease-out);
}

/* Once JS has painted a frame, fade the canvas in and retire the CSS wash so
   the two layers never double up. */
.hero__flow.is-live {
  opacity: 1;
}

.hero__backdrop.has-flow .hero__aurora {
  opacity: 0;
}

.hero__aurora {
  transition: opacity 900ms var(--ds-ease-out);
}

.hero__mesh {
  opacity: 0;
  transition: opacity 900ms var(--ds-ease-out);
  /* Fade the mesh out toward the left so it never fights the headline */
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
}

.hero__mesh.is-live {
  opacity: 1;
}

/* Contrast veil, so display type always clears WCAG over the animated field */
.hero__veil {
  position: absolute;
  inset: 0;
  /* The canvas field carries its own vertical falloff, so this only darkens
     behind the headline column for contrast. Nothing at the top: the header
     pill has its own glass surface, and dimming here flattened the field. */
  background: linear-gradient(
    90deg,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.12) 45%,
    rgba(10, 10, 10, 0) 62%
  );
}

/* --- layout --------------------------------------------------------------- */

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-9);
  align-items: center;
  width: var(--ds-container);
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 60fr 40fr;
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-5);
  min-width: 0;
}

/* --- copy ----------------------------------------------------------------- */

.hero__eyebrow {
  margin: 0;
  font-family: var(--ds-font-sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ds-color-text-primary);
}

@media (min-width: 768px) {
  .hero__eyebrow {
    font-size: 22px;
  }
}

.hero__title {
  max-width: 18ch;
  font-family: var(--ds-font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ds-color-text-primary);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 46px;
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: 56px;
  }
}

.hero__lede {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  max-width: 580px;
}

.hero__lede p {
  color: var(--ds-color-text-description);
}

/* Two-up button grid, as in the reference. Collapses to a single column on
   narrow screens where two pills would not fit side by side. */
.hero__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-3);
  width: 100%;
  margin-top: var(--ds-space-2);
}

@media (min-width: 480px) {
  .hero__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: fit-content;
  }
}

.hero__note {
  font-family: var(--ds-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ds-color-text-placeholder);
}

/* --- console panel -------------------------------------------------------- */

.hero__aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero__event {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 330px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(166, 200, 255, 0.2);
  border-radius: var(--ds-radius-card);
  background: linear-gradient(145deg, rgba(19, 42, 75, 0.68), rgba(11, 15, 24, 0.8));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  isolation: isolate;
  animation: hero-card-float 6s var(--ds-ease-in-out) infinite alternate;
}

@keyframes hero-card-float {
  to { transform: translate3d(0, -10px, 0); }
}

.hero__event::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  right: -72px;
  top: -80px;
  border-radius: 50%;
  background: rgba(15, 98, 254, 0.36);
  filter: blur(34px);
  animation: hero-event-glow 7s var(--ds-ease-in-out) infinite alternate;
}

@keyframes hero-event-glow {
  to { transform: translate3d(-24px, 30px, 0) scale(1.22); }
}

.hero__event-kicker,
.hero__event-meta {
  font-family: var(--ds-font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ds-color-text-description);
}

.hero__event-date {
  margin-top: var(--ds-space-5);
  color: var(--ds-color-text-primary);
  font-family: var(--ds-font-mono);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero__event-date span { color: var(--ds-color-brand); }

.hero__event h2 {
  max-width: 18ch;
  margin-top: var(--ds-space-4);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  line-height: 1.35;
}

.hero__event-meta { margin-top: auto; padding-top: var(--ds-space-6); }

.hero__event-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-4);
  color: var(--ds-color-text-primary);
  font-size: 15px;
  font-weight: 500;
}

.hero__event-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--ds-duration-base) var(--ds-ease-out);
}

.hero__event-link:hover svg { transform: translateX(4px); }

/* --- scroll cue ----------------------------------------------------------- */

.hero__cue {
  position: absolute;
  bottom: var(--ds-space-5);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-4);
  border: var(--ds-border-width) solid var(--ds-color-border-subtle);
  border-radius: var(--ds-radius-pill);
  background-color: var(--ds-color-bg-surface-1);
  color: var(--ds-color-text-description);
  font-family: var(--ds-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(var(--ds-blur-glass));
  -webkit-backdrop-filter: blur(var(--ds-blur-glass));
  transition: color var(--ds-duration-base), border-color var(--ds-duration-base);
}

.hero__cue:hover {
  color: var(--ds-color-text-primary);
  border-color: var(--ds-color-border-hover);
}

.hero__cue svg {
  width: 13px;
  height: 13px;
  animation: hero-cue 2.4s var(--ds-ease-in-out) infinite;
}

@keyframes hero-cue {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@media (min-width: 900px) {
  .hero__cue {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__aurora,
  .hero__cue svg,
  .hero__event,
  .hero__event::before {
    animation: none;
  }

  .hero__media {
    display: none;
  }
}
