/* Hero split layout — preserve original Nafie dual-layer splash blend */

.hero-section.hero-split {
  /* Outer rails: clear social / scroll, stay close to edges */
  --hero-gutter-left: 3rem;
  --hero-gutter-right: 3.75rem;
  --hero-gap: 0.75rem;
  --hero-section-h: 85vh; /* Reduced from 100vh to avoid vertical voids */
  /* Taller portrait = wider frame = denser composition */
  --hero-img-inset: 1.5rem;
  --hero-img-h: calc(var(--hero-section-h) - (var(--hero-img-inset) * 2));
  --hero-img-ratio: 0.9614;
}

@media (min-width: 992px) {
  .hero-section.hero-split {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    --hero-gutter-left: 3rem;
    --hero-gutter-right: 3.75rem;
    --hero-gap: 0.65rem;
  }

  .hero-section.hero-split .hero-layout {
    display: grid;
    /*
     * Text takes remaining width (owns the left).
     * Portrait column is ONLY as wide as the image (auto),
     * so it sits on the right with no empty band beside it.
     */
    grid-template-columns: minmax(20rem, 1fr) auto;
    gap: var(--hero-gap);
    align-items: center;
    width: 100%;
    max-width: 1440px; /* Corral the content to fix ultrawide ocean */
    margin: 0 auto;
    min-height: var(--hero-section-h);
    padding-block: 0;
    padding-left: var(--hero-gutter-left);
    padding-right: var(--hero-gutter-right);
    box-sizing: border-box;
  }

  .hero-section.hero-split .hero-text {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 44rem;
    margin: 0;
    padding: 0;
    justify-self: start;
    z-index: 2;
    text-align: left;
    text-shadow: none !important;
  }

  .hero-section.hero-split .hero-text h1,
  .hero-section.hero-split .hero-text h2,
  .hero-section.hero-split .hero-text h3,
  .hero-section.hero-split .hero-text p {
    color: hsl(var(--dark-color)) !important;
  }

  /*
   * Frame matches portrait aspect so splash mask + both layers share one box.
   * Nafie blend stays intact (first = splash mask, last = top 50% face).
   */
  .hero-section.hero-split .hero-img {
    position: relative;
    container-type: size;
    width: calc(var(--hero-img-h) * var(--hero-img-ratio));
    max-width: min(46vw, calc(var(--hero-img-h) * var(--hero-img-ratio)));
    aspect-ratio: 2289 / 2381;
    height: auto;
    max-height: var(--hero-img-h);
    margin-inline: 0;
    justify-self: end;
    align-self: center;
    overflow: visible;
  }

  .hero-section.hero-split .hero-img .layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .hero-section.hero-split .hero-img .layer:first-of-type {
    height: 100%;
    -webkit-mask-position: center center;
            mask-position: center center;
    -webkit-mask-size: contain;
            mask-size: contain;
  }

  .hero-section.hero-split .hero-img .layer:last-of-type {
    height: 50%;
    overflow: hidden;
  }

  .hero-section.hero-split .hero-img .layer img {
    position: relative;
    z-index: 2;
    display: block;
    height: 100cqh !important;
    width: auto !important;
    max-width: none !important;
    margin-inline: auto;
    object-fit: fill;
    object-position: center center;
  }

  .hero-section.hero-split .social,
  .hero-section.hero-split .scroll-down {
    z-index: 5;
    pointer-events: auto;
  }
}

/* xl */
@media (min-width: 1200px) {
  .hero-section.hero-split {
    --hero-gutter-left: 3.1rem;
    --hero-gutter-right: 3.85rem;
    --hero-gap: 0.75rem;
  }

  .hero-section.hero-split .hero-text {
    max-width: 46rem;
  }

  .hero-section.hero-split .hero-name {
    font-size: clamp(2.25rem, 3.4vw, 3.35rem);
  }
}

/* xxl */
@media (min-width: 1400px) {
  .hero-section.hero-split {
    --hero-gutter-left: 3.15rem;
    --hero-gutter-right: 3.9rem;
    --hero-gap: 0.85rem;
    --hero-img-inset: 1.25rem;
  }

  .hero-section.hero-split .hero-text {
    max-width: 48rem;
  }
}

/* xxxl — 24" / ultrawide: fill edges, kill middle island */
@media (min-width: 1600px) {
  .hero-section.hero-split {
    --hero-gutter-left: 3.25rem;
    --hero-gutter-right: 4rem;
    --hero-gap: 1rem;
    --hero-img-inset: 1rem;
  }

  .hero-section.hero-split .hero-text {
    max-width: 52rem;
  }

  .hero-section.hero-split .hero-img {
    max-width: min(48vw, calc(var(--hero-img-h) * var(--hero-img-ratio)));
  }

  .hero-section.hero-split .hero-name {
    font-size: clamp(2.55rem, 3.1vw, 3.75rem);
  }

  .hero-section.hero-split .hero-title {
    font-size: clamp(1.2rem, 1.45vw, 1.55rem);
  }
}

/* Typography + CTAs */
.hero-section.hero-split .hero-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--dark-color));
}

.hero-section.hero-split .hero-brand::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 2px;
  background: hsl(var(--dark-color));
  flex-shrink: 0;
}

.hero-section.hero-split .hero-name {
  margin: 0 0 0.5rem !important;
  font-family: var(--headings-font-family), Poppins, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: none !important;
}

.hero-section.hero-split .hero-title {
  margin: 0 0 0.55rem !important;
  font-family: var(--headings-font-family), Poppins, sans-serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none !important;
}

.hero-section.hero-split .hero-tags {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsla(var(--dark-color), 0.55) !important;
}

.hero-section.hero-split .hero-proof {
  margin: 0 0 1.2rem;
  max-width: 38rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: hsla(var(--dark-color), 0.78) !important;
}

.hero-section.hero-split .hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero-section.hero-split .hero-ctas .btn {
  margin: 0 !important;
  text-shadow: none !important;
  transition: all 0.3s ease;
}

.hero-section.hero-split .btn-hero-primary {
  color: hsl(var(--light-color)) !important;
  background-color: hsl(var(--dark-color)) !important;
  border-color: hsl(var(--dark-color)) !important;
}

.hero-section.hero-split .btn-hero-primary:hover {
  color: hsl(var(--dark-color)) !important;
  background-color: transparent !important;
}

.hero-section.hero-split .btn-hero-secondary {
  color: hsl(var(--dark-color)) !important;
  background-color: transparent !important;
  border-color: hsl(var(--dark-color)) !important;
}

.hero-section.hero-split .btn-hero-secondary:hover {
  color: hsl(var(--light-color)) !important;
  background-color: hsl(var(--dark-color)) !important;
}

@media (max-width: 991px) {
  .hero-section.hero-split {
    display: block;
    place-content: unset;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2rem) 5rem;
    min-height: 85vh;
  }

  .hero-section.hero-split .hero-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-section.hero-split .hero-text {
    width: 100% !important;
    text-align: left;
    order: 1;
  }

  .hero-section.hero-split .hero-img {
    position: relative;
    order: 2;
    width: min(100%, 400px);
    aspect-ratio: 2289 / 2381;
    height: auto;
    max-height: 55vh;
    margin: 0 auto;
    container-type: size;
  }

  .hero-section.hero-split .hero-img .layer {
    width: 100%;
  }

  .hero-section.hero-split .hero-name {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .hero-section.hero-split .social,
  .hero-section.hero-split .scroll-down {
    z-index: 5;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-section.hero-split .hero-text > * {
    animation: hero-rise 0.7s ease both;
  }

  .hero-section.hero-split .hero-text > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-section.hero-split .hero-text > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-section.hero-split .hero-text > *:nth-child(3) { animation-delay: 0.18s; }
  .hero-section.hero-split .hero-text > *:nth-child(4) { animation-delay: 0.24s; }
  .hero-section.hero-split .hero-text > *:nth-child(5) { animation-delay: 0.3s; }
  .hero-section.hero-split .hero-text > *:nth-child(6) { animation-delay: 0.36s; }

  .hero-section.hero-split .hero-img {
    animation: hero-fade 0.9s ease 0.15s both;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
