/* Hero */

.hero {
  padding-top: calc(var(--header-height) + clamp(2.75rem, 5vw, 5rem));
  padding-bottom: clamp(3.5rem, 8vh, var(--section-spacing));
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(9, 12, 18, 0.98), rgba(10, 13, 20, 0.99));
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 0.92;
}

.hero::before {
  content: '';
  position: absolute;
  top: -18%;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 88%;
  background: radial-gradient(ellipse at center, var(--accent-glow-1) 0%, var(--accent-glow-2) 30%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

:root[data-theme="light"] .hero {
  background:
    linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(240, 244, 249, 0.99));
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.5rem, 3.6vw, 4.25rem);
  align-items: center;
  min-height: calc(100svh - var(--header-height) - clamp(3.5rem, 7vh, 6rem));
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: min(100%, 42rem);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.75rem, 1.4vw, 1.15rem);
  text-align: left;
}

.hero h1 {
  max-width: min(100%, 10ch);
  margin-bottom: 0;
  background: var(--hero-title-gradient);
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--hero-title-shadow);
}

.hero-title--enhanced {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 0.24em;
  row-gap: 0.08em;
  white-space: normal;
  max-width: min(100%, 11ch);
}

.hero-title__word {
  display: inline-flex;
  flex: 0 0 auto;
  white-space: nowrap;
  column-gap: 0.03em;
  background: var(--hero-title-gradient);
  background-size: 240% 240%;
  background-position: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title__letter {
  display: inline-block;
  min-width: 0.48ch;
  background: inherit;
  background-size: inherit;
  background-position: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, filter, opacity;
  text-shadow:
    0 0 18px rgba(var(--brand-color-rgb), 0.14),
    0 0 34px rgba(var(--brand-color-deep-rgb), 0.08);
}

.hero .hook {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--text-primary);
  font-weight: 500;
  max-width: min(100%, 28ch);
  margin-bottom: 0;
  line-height: 1.45;
}

.hero .hook br {
  display: block;
}

.hero .subheadline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: min(100%, 56ch);
  margin-bottom: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 0;
  width: min(100%, 42rem);
}

.hero-actions .btn {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 3.5rem;
  white-space: nowrap;
  padding-inline: 1.4rem;
  text-align: center;
  will-change: transform, box-shadow, filter;
}

.hero .hook {
  max-width: min(100%, 38ch);
  text-wrap: balance;
}

.hero .subheadline {
  max-width: min(100%, 58ch);
}

@media (max-width: 960px) {
  .hero-actions {
      width: 100%;
    }

  .hero-actions .btn {
      min-height: 3.6rem;
    }
}

@media (max-width: 768px) {
  .hero-actions {
      flex-direction: column;
    }

  .hero-actions .btn {
      width: 100%;
    }
}

.hero-visual-wrap {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

.hero-visual-wrap::before {
  content: "";
  position: absolute;
  inset: 6% 4%;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.hero-visual__image {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  will-change: transform, filter;
  transition: transform var(--transition-med), filter var(--transition-slow);
}

.hero-visual-wrap:hover .hero-visual__image {
  transform: translateY(-4px);
  filter: saturate(1.03) brightness(1.01);
}

.hero-visual__image--placeholder {
  background: none;
}

:root[data-theme="light"] .hero-visual-wrap::before {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.68) 36%, rgba(216, 232, 236, 0.36) 62%, transparent 82%);
  filter: blur(14px);
}

:root[data-theme="light"] .hero-visual__image {
  filter:
    drop-shadow(0 18px 34px rgba(22, 29, 37, 0.12))
    drop-shadow(0 0 0.6px rgba(22, 29, 37, 0.34));
}

:root[data-theme="light"] .hero-visual-wrap:hover .hero-visual__image {
  filter:
    saturate(1.02)
    brightness(1.01)
    drop-shadow(0 22px 40px rgba(22, 29, 37, 0.14))
    drop-shadow(0 0 0.7px rgba(22, 29, 37, 0.36));
}

.hero-cta--primary {
  box-shadow: 0 10px 30px rgba(var(--brand-color-rgb), 0.28);
}

.hero-cta--secondary {
  position: relative;
  box-shadow: none;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 38%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.42) 50%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
  transform: translateX(-220%) skewX(-22deg);
  pointer-events: none;
  opacity: 0;
}

.hero-cta--primary::before {
  animation: heroCtaShine 3.8s ease-in-out infinite;
  opacity: 0.95;
}

.hero-cta--secondary::before {
  animation: none;
  opacity: 0.16;
  inset: -12% auto -12% -18%;
  width: 24%;
  transform: translateX(0) skewX(-18deg);
}

@keyframes heroCtaShine {
  0%,
  58%,
  100% {
    transform: translateX(-220%) skewX(-22deg);
  }

  18%,
  34% {
    transform: translateX(420%) skewX(-22deg);
  }
}

@media (max-width: 1024px) {
  .hero {
      padding-top: calc(var(--header-height) + 2.5rem);
      padding-bottom: clamp(3rem, 6vw, 4.5rem);
    }

  .hero-shell {
      grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
      gap: clamp(1.25rem, 3vw, 2.5rem);
      min-height: calc(100svh - var(--header-height) - 2.5rem);
    }

  .hero-copy {
      max-width: none;
    }

  .hero h1 {
      font-size: clamp(2.8rem, 5.2vw, 4rem);
    }

  .hero .hook {
      font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    }

  .hero .subheadline {
      font-size: clamp(0.95rem, 1.45vw, 1.05rem);
      line-height: 1.68;
    }

  .hero-actions {
      width: min(100%, 32rem);
      gap: 0.85rem;
    }

  .hero-actions .btn {
      min-height: 3.25rem;
      padding-inline: 1rem;
    }

}

@media (min-width: 961px) and (max-width: 1440px) {
  .hero-shell {
      gap: clamp(1.25rem, 2.5vw, 2.75rem);
    }

  .hero h1 {
      font-size: clamp(3rem, 4.7vw, 4.35rem);
    }

  .hero .subheadline {
      max-width: min(100%, 50ch);
    }
}

@media (min-width: 961px) and (max-height: 900px) {
  .hero {
      padding-top: calc(var(--header-height) + 2.25rem);
      padding-bottom: 3rem;
    }

  .hero-shell {
      min-height: calc(100svh - var(--header-height) - 2rem);
      gap: 1.5rem;
    }

  .hero h1 {
      font-size: clamp(2.8rem, 4vw, 3.8rem);
    }

  .hero .hook {
      font-size: 1.05rem;
    }

  .hero .subheadline {
      font-size: 0.98rem;
      line-height: 1.62;
    }

  .hero-actions .btn {
      min-height: 3.1rem;
    }

  .hero-visual__image {
      max-height: min(46vh, 28rem);
      width: auto;
      max-width: 100%;
    }
}

@media (max-width: 960px) {
  .hero__brand-note {
      display: block;
      margin-top: 3px;
      font-size: 0.58rem;
      line-height: 1.1;
    }

  .hero-shell {
      grid-template-columns: 1fr;
      min-height: auto;
    }

  .hero-copy {
      max-width: none;
    }

  .hero-actions {
      width: 100%;
    }

  .hero-visual-wrap {
      width: min(100%, 44rem);
      margin-inline: auto;
    }
}

@media (max-width: 768px) {
  .hero {
      padding-top: calc(60px + 3rem);
      padding-bottom: 3.25rem;
      background:
        radial-gradient(circle at 50% -8%, rgba(var(--brand-color-rgb), 0.18), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(var(--brand-color-deep-rgb), 0.16), transparent 24%),
        linear-gradient(180deg, rgba(9, 12, 18, 0.985), rgba(10, 13, 20, 0.995));
    }

  :root[data-theme="light"] .hero {
      background:
        radial-gradient(circle at 50% -10%, rgba(var(--brand-color-rgb), 0.12), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(var(--brand-color-deep-rgb), 0.1), transparent 22%),
        linear-gradient(180deg, rgba(245, 248, 252, 0.985), rgba(240, 244, 249, 0.995));
    }

  .hero::before {
      top: -10%;
      width: 148%;
      height: 54%;
      opacity: 0.72;
    }

  .hero-canvas {
      display: none;
    }

  .hero__brand-note {
      white-space: nowrap;
    }

  .hero-actions .btn {
      min-height: 3.15rem;
    }

  .hero h1 {
      max-width: none;
    }

  .eyebrow,
    .hero .hook,
    .hero .subheadline {
      max-width: none;
    }

  .hero-visual__image {
      max-height: none;
      aspect-ratio: auto;
    }

  .hero-cta::before,
    .hero-cta--secondary::before {
      animation: none;
      opacity: 0;
    }

  .hero-cta--primary::before {
      animation: none;
      opacity: 0.34;
      inset: -14% auto -14% -24%;
      width: 28%;
      transform: translateX(0) skewX(-20deg);
    }

  .hero-cta--primary {
      box-shadow:
        0 12px 24px rgba(var(--brand-color-rgb), 0.2),
        0 8px 18px rgba(var(--brand-color-deep-rgb), 0.12);
    }

  .hero-cta--secondary {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.08);
    }

  :root[data-theme="light"] .hero-cta--secondary {
      background: rgba(255, 255, 255, 0.68);
      border-color: rgba(22, 29, 37, 0.14);
    }
}

@media (max-width: 768px) and (pointer: coarse) {
  .hero-cta--primary::before {
      opacity: 0.26;
    }

  .hero-cta--primary {
      box-shadow:
        0 10px 22px rgba(var(--brand-color-rgb), 0.18),
        0 6px 16px rgba(var(--brand-color-deep-rgb), 0.1);
    }
}

@media (pointer: coarse) {
  .hero-canvas {
      display: none;
    }

  .hero-title__letter,
    .hero-actions .btn,
    .hero-visual__image {
      will-change: auto;
    }
}
