/*
 * hero.css — Section 1: Hero
 * Source: Build H-2 spec — bestyearyet.com Homepage Build Queue
 *         Blob animations ported from gift.bestyearyet.com (.floating-shape, @keyframes float)
 *
 * Depends on: styles/tokens.css, styles/global.css (base classes)
 */


/* ================================================================
 * SECTION WRAPPER
 * ================================================================ */

.section-hero {
  padding: 88px 0 48px;    /* top: nav(72px) + 16px clearance; bottom: compact */
  background: var(--color-off-white);
  position: relative;
  overflow: hidden;        /* Contains blobs */
}


/* ================================================================
 * TWO-COLUMN GRID
 * ================================================================ */

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1; /* Sits above the blob layer (z-index: 0) */
}


/* ================================================================
 * LEFT COLUMN
 * ================================================================ */

.hero-overline {
  /* Extends .section-label from global.css */
  color: var(--color-purple-900);
  margin-bottom: 20px;
}

/* .hero-h1 is defined in global.css typography scale */
/* clamp(52px, 7vw, 96px) — Catamaran 700, line-height 1.0, letter-spacing -0.02em */

/* "Stop setting" — always single line regardless of viewport */
.hero-h1-prefix {
  white-space: nowrap;
}

.hero-h1 .cycling-word {
  color: var(--color-red);
  align-self: center;
  width: 100%;
  text-align: center;
}

/* Last sentence at 75% of H1 size — stable, predictable line count */
.hero-h1-conclusion {
  display: block;
  font-size: 0.75em;
  margin-top: 0.1em;
}

.hero-subhead {
  /* Extends .body-text from global.css — 18px Arial, line-height 1.75, max-width 640px */
  max-width: 520px;        /* Spec: tighter than body-text default */
  color: var(--color-text-secondary);
  margin-top: 24px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-top: 32px;
}

/* Secondary CTA text style — inherits .btn-secondary from global.css */
.hero-secondary-cta {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.hero-secondary-cta:hover {
  color: var(--color-text-primary);
}


/* ================================================================
 * TRUST BAR
 * ================================================================ */

.trust-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.trust-bar-item {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

.trust-bar-sep {
  color: var(--color-text-secondary);
  font-size: 12px;
  user-select: none;
}


/* ================================================================
 * RIGHT COLUMN — Phone frame + screenshot + annotation pill
 * Matches new.bestyearyet.com device frame style
 * ================================================================ */

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-screenshot-wrap {
  position: relative;
  width: 100%;
  max-width: 286px;     /* Controls phone size: 286px outer → 268px screen → 578px natural height */
  margin-left: auto;
  padding-bottom: 36px; /* Space for annotation pill hanging below */
}

/* iPhone-style device frame — pure CSS, matches new.bestyearyet.com */
.phone-frame {
  border: 9px solid #1a1a1a;
  border-radius: 36px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.28);
  transform: rotate(2deg);
}

/* Dynamic Island — pill notch in the top bezel */
.phone-frame::before {
  content: '';
  display: block;
  width: 64px;
  height: 9px;
  background: #333;
  border-radius: 0 0 8px 8px;
  margin: 0 auto;
}

.hero-screenshot {
  display: block;
  width: 100%;          /* Natural height follows from intrinsic 386:833 ratio — no cropping */
}

/* Floating annotation pill — bottom-left of screenshot */
.annotation-pill {
  background: var(--color-off-white);
  border: 1px solid rgba(72, 72, 73, 0.12);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  max-width: 260px;
  line-height: 1.5;
  position: absolute;
  bottom: -20px;
  left: -40px;
  z-index: 2;
}


/* ================================================================
 * BLOB BACKGROUND
 * Ported from gift.bestyearyet.com — .floating-shape + @keyframes float
 * Adapted: BYY teal and red at ~0.06 opacity, heavy blur, desktop only
 * ================================================================ */

.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* No overflow:hidden here — parent .section-hero already clips.
     An inner clip would cut off blobs positioned at negative offsets. */
}

.floating-shape {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(60px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
  transform-origin: center;
}

/* Teal blob — top left, mostly visible within section */
.shape-1 {
  width: 560px;
  height: 400px;
  background: var(--color-teal); /* #7EC6B8 */
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  top: -5%;
  left: -6%;
  opacity: 0.12;
  animation-delay: 0s;
  animation-duration: 9s;
}

/* Red blob — top right, soft edge off the right boundary */
.shape-2 {
  width: 480px;
  height: 360px;
  background: var(--color-red); /* #C93F2F */
  border-radius: 40% 60% 70% 30% / 30% 60% 40% 70%;
  top: 5%;
  right: -4%;
  opacity: 0.07;
  animation-delay: 2s;
  animation-duration: 11s;
}

/* Teal blob — lower right quadrant */
.shape-3 {
  width: 440px;
  height: 320px;
  background: var(--color-teal); /* #7EC6B8 */
  border-radius: 50% 30% 60% 40% / 40% 70% 30% 60%;
  bottom: 5%;
  right: 5%;
  opacity: 0.10;
  animation-delay: 4s;
  animation-duration: 13s;
}

/* Keyframe ported verbatim from gift.bestyearyet.com */
@keyframes float {
  0%,  100% { transform: translateY(0px)   rotate(0deg); }
  25%        { transform: translateY(-20px) rotate(5deg); }
  50%        { transform: translateY(-10px) rotate(-3deg); }
  75%        { transform: translateY(-15px) rotate(2deg); }
}


/* ================================================================
 * MOBILE BREAKPOINT (max-width: 768px)
 * ================================================================ */

@media (max-width: 768px) {
  .section-hero {
    padding: 80px 0 48px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 0 24px;
  }

  .hero-screenshot-wrap {
    max-width: 200px;        /* Scale phone down on mobile — proportional height follows */
  }

  .phone-frame {
    transform: rotate(0deg); /* No tilt on mobile */
  }

  .annotation-pill {
    display: none; /* Hidden on mobile per spec */
  }

  .trust-bar {
    gap: 16px;
  }

  /* Blobs hidden on mobile for performance */
  .hero-blobs {
    display: none;
  }

  .hero-ctas {
    align-items: stretch; /* Full-width CTAs on mobile */
  }

  .hero-ctas .btn-primary {
    justify-content: center;
    text-align: center;
  }
}
