/* #hero section (app/views/home/_hero.html.erb). */
@layer sections {
  .hero {
    background: var(--pl-green-800);
    color: var(--pl-paper);
  }

  .hero__inner {
    padding-top: clamp(36px, 5.4vw, 72px);
    padding-bottom: clamp(48px, 6.2vw, 84px);
  }

  /* Copy column + art column; wraps to one column below ~912px of content. */
  .hero__layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
  }

  /* Left column: title, lead, order card, "What's inside" */
  .hero__copy {
    flex: 1 1 440px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hero__title {
    margin: 0;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.022em;
    text-wrap: balance;
  }

  .hero__title-line {
    display: block;
  }

  .hero__title-line--accent {
    color: var(--pl-cream);
  }

  .hero__lead {
    margin: 0;
    max-width: 30em;
    font-size: clamp(16.5px, 1.45vw, 18.5px);
    line-height: 1.6;
    color: var(--pl-green-200);
  }

  /* White order card: quantity row, total row, Continue */
  .hero__card {
    width: 100%;
    max-width: 500px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: var(--pl-r-card-sm);
    background: var(--pl-paper);
    color: var(--pl-ink);
  }

  .hero__row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 10px 10px 14px;
    border-radius: var(--pl-r-control);
    background: var(--pl-sand-50);
  }

  .hero__row--total {
    padding-right: 18px;
  }

  .hero__row-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--pl-r-pill);
    background: var(--pl-paper);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero__row-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
  }

  .hero__row-label {
    font-size: 16px;
    font-weight: 700;
  }

  .hero__row-sub {
    font-size: 14px;
    color: var(--pl-muted);
  }

  .hero__stepper {
    flex: none;
    display: flex;
    align-items: center;
    gap: 2px;
  }

  /* ± buttons (hidden without JS by .pl-js-only in the utilities layer) */
  .hero__step {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--pl-r-pill);
    background: var(--pl-paper);
    color: var(--pl-ink);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero__count {
    min-width: 34px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
  }

  .hero__total {
    flex: none;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }

  .hero__continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    /* The design has 0 vertical padding; 10px only matters when a long label
       (ordering paused) wraps. */
    padding: 10px 24px;
    border-radius: var(--pl-r-control);
    background: var(--pl-green-800);
    color: var(--pl-paper);
    font-size: 17.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
  }

  .hero__continue svg {
    flex: none;
  }

  .hero__inside {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
  }

  /* Right column: art grid (big drawing + badge | price + pack) */
  .hero__visual {
    flex: 1 1 400px;
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  .hero__art-grid {
    width: min(100%, 540px);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .hero__art-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .hero__art-col--offset {
    margin-top: 44px;
  }

  .hero__art-tile {
    aspect-ratio: 1 / 1.18;
    border-radius: var(--pl-r-card);
    background: var(--pl-green-950);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero__art {
    display: block;
    width: 74%;
    height: auto;
    fill: var(--pl-paper);
  }

  /* Wraps (icon above the text) only when the longest word would not fit next
     to the icon, i.e. below ~380px viewports; at 390px+ it is the design's row. */
  .hero__badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--pl-r-tile-sm);
    background: var(--pl-yellow);
    color: var(--pl-ink);
  }

  .hero__badge-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: var(--pl-r-pill);
    background: var(--pl-ink);
    color: var(--pl-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero__badge-text {
    flex: 1 1 0;
    min-width: min-content;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.3;
  }

  .hero__badge-title {
    font-weight: 800;
  }

  .hero__badge-sub {
    font-weight: 600;
  }

  .hero__price {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
    border-radius: var(--pl-r-tile-sm);
    background: var(--pl-cream);
    color: var(--pl-ink);
  }

  .hero__price-label {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
  }

  .hero__price-value {
    font-size: clamp(24px, 2.4vw, 31px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .hero__pack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 16px 16px;
    border-radius: var(--pl-r-card);
    background: var(--pl-ink);
    color: var(--pl-paper);
  }

  .hero__pack-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero__pack-row {
    display: flex;
    justify-content: center;
    gap: 6%;
  }

  .hero__pack-item {
    display: block;
    width: 27%;
    height: auto;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linejoin: round;
  }

  .hero__pack-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14.5px;
    line-height: 1.3;
    text-align: center;
  }

  .hero__pack-count {
    font-weight: 800;
  }

  .hero__pack-sub {
    font-weight: 600;
  }

  /*
   * Small phones. Every value equals the normal one from 390px up and only
   * shrinks below it: the badge keeps its icon | text row down to 360px, and at
   * 320px the price and the quantity label keep clear of their edges.
   */
  @media (max-width: 480px) {
    .hero__badge {
      gap: clamp(8px, 13.333vw - 40px, 12px);
      padding: 14px clamp(12px, 13.333vw - 36px, 16px);
    }

    .hero__price-value {
      font-size: clamp(22px, 6.875vw, 24px);
    }

    .hero__row {
      gap: clamp(8px, 10vw - 24px, 12px);
    }

    .hero__count {
      min-width: clamp(28px, 15vw - 20px, 34px);
    }
  }
}
