/* ─── Homepage hero — 5 structural variants (template-parts/sections/hero.php) */

.ymr-hero {
  padding: 32px 0 56px;

  @media (min-width: 992px) {
    padding: 56px 0 72px;
  }
}

.ymr-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;

  @media (min-width: 992px) {
    gap: 24px;
  }
}

.ymr-hero__note {
  align-self: flex-start;
  font-size: 24px;
  color: var(--red);
  transform: rotate(-2deg);

  @media (min-width: 768px) {
    font-size: 26px;
  }
}

.ymr-hero__title {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.ymr-hero__text {
  max-width: 470px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);

  @media (min-width: 768px) {
    font-size: 18px;
  }
}

.ymr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.ymr-hero__visual {
  position: relative;
}

.ymr-hero__stamp {
  position: absolute;
}

/* ─── 1 · split (the approved design) ────────────────────────────────────── */

.ymr-hero--split {
  .ymr-hero__frame {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-lift);
  }

  .ymr-hero__copy {
    flex: 1 1 460px;
    justify-content: center;
    padding: 40px 24px;
    background-image: repeating-linear-gradient(0deg, transparent 0 39px, var(--ruled) 39px 40px);
    border-bottom: 1px dashed var(--line-dash);

    @media (min-width: 768px) {
      padding: 64px 56px;
    }

    @media (min-width: 992px) {
      border-bottom: 0;
      border-right: 1px dashed var(--line-dash);
    }
  }

  .ymr-hero__visual {
    flex: 1 1 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 440px;
    padding: 48px 24px;

    @media (min-width: 768px) {
      min-height: 540px;
      padding: 56px;
    }
  }

  .ymr-hero__polaroid {
    width: 300px;
    max-width: 78%;
    transform: rotate(3deg);

    @media (min-width: 768px) {
      width: 360px;
    }
  }

  .polaroid__img {
    aspect-ratio: 1 / 1;
  }

  .ymr-hero__stamp--1 { --size: 92px; top: 20px; right: 16px; transform: rotate(14deg); }
  .ymr-hero__stamp--2 { --size: 76px; top: 40px; left: 12px; transform: rotate(-12deg); }
  .ymr-hero__stamp--3 { --size: 84px; bottom: 24px; left: 16px; transform: rotate(8deg); }
  .ymr-hero__stamp--4 { --size: 76px; bottom: 16px; right: 24px; transform: rotate(-6deg); }
  .ymr-hero__stamp--5 { --size: 72px; top: 46%; right: 4px; transform: rotate(-18deg); font-size: 9px; }

  @media (min-width: 768px) {
    .ymr-hero__stamp--1 { --size: 108px; top: 36px; right: 44px; }
    .ymr-hero__stamp--2 { --size: 88px; top: 60px; left: 32px; }
    .ymr-hero__stamp--3 { --size: 100px; bottom: 44px; left: 40px; }
    .ymr-hero__stamp--4 { --size: 86px; bottom: 32px; right: 60px; }
    .ymr-hero__stamp--5 { --size: 84px; right: 14px; }
  }
}

/* ─── 2 · centered ───────────────────────────────────────────────────────── */

.ymr-hero--centered {
  .ymr-hero__frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }

  .ymr-hero__copy {
    align-items: center;
    max-width: 820px;
    text-align: center;
  }

  .ymr-hero__note {
    align-self: center;
  }

  .ymr-hero__text {
    max-width: 600px;
  }

  .ymr-hero__actions {
    justify-content: center;
  }

  .ymr-hero__visual {
    width: 100%;
    max-width: 820px;
    padding: 24px 8px;
  }

  .ymr-hero__polaroid {
    transform: rotate(-1deg);
  }

  .polaroid__img {
    aspect-ratio: 16 / 9;
  }

  .ymr-hero__stamp--1 { --size: 96px; top: -8px; right: -4px; transform: rotate(14deg); }
  .ymr-hero__stamp--2 { --size: 80px; top: -14px; left: -4px; transform: rotate(-12deg); }
  .ymr-hero__stamp--3 { --size: 88px; bottom: 0; left: -8px; transform: rotate(8deg); }
  .ymr-hero__stamp--4 { --size: 80px; bottom: -8px; right: 12%; transform: rotate(-6deg); }
  .ymr-hero__stamp--5 { --size: 76px; top: 40%; right: -12px; transform: rotate(-18deg); font-size: 9px; }

  .ymr-hero__stamp--4,
  .ymr-hero__stamp--5 {
    display: none;

    @media (min-width: 640px) {
      display: flex;
    }
  }
}

/* ─── 3 · postcard ───────────────────────────────────────────────────────── */

.ymr-hero--postcard {
  .ymr-hero__frame {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .ymr-hero__visual {
    order: -1;
  }

  .ymr-hero__polaroid {
    padding-bottom: 48px;
    transform: rotate(0.6deg);
  }

  .polaroid__img {
    aspect-ratio: 4 / 3;

    @media (min-width: 768px) {
      aspect-ratio: 16 / 8;
    }
  }

  .ymr-hero__copy {
    position: relative;
    z-index: 2;
    margin: -48px 12px 0;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    background-image: repeating-linear-gradient(0deg, transparent 0 39px, var(--ruled) 39px 40px);
    transform: rotate(-1deg);

    @media (min-width: 992px) {
      position: absolute;
      left: 40px;
      bottom: -32px;
      width: min(560px, 52%);
      margin: 0;
      padding: 48px;
    }
  }

  @media (min-width: 992px) {
    padding-bottom: 104px;

    .ymr-hero__title {
      font-size: clamp(44px, 5vw, 68px);
    }
  }
}

/* ─── 4 · letter (newsletter form in the hero) ───────────────────────────── */

.ymr-hero--letter {
  .ymr-hero__frame {
    display: grid;
    gap: 32px;
    align-items: center;

    @media (min-width: 992px) {
      grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
      grid-template-areas:
        "copy visual"
        "copy form";
      gap: 0 64px;
    }
  }

  .ymr-hero__copy {
    grid-area: copy;
  }

  .ymr-hero__visual {
    grid-area: visual;
    justify-self: center;
    width: 260px;
    max-width: 75%;

    @media (min-width: 992px) {
      width: 300px;
      max-width: none;
      margin-bottom: -48px;
    }
  }

  .ymr-hero__polaroid {
    transform: rotate(4deg);
  }

  .polaroid__img {
    aspect-ratio: 1 / 1;
  }

  .ymr-hero__form {
    grid-area: form;
    position: relative;
    z-index: 2;
  }
}

/* ─── 5 · compact + passport rail ────────────────────────────────────────── */

.ymr-hero--compact {
  padding-bottom: 32px;

  .ymr-hero__frame {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px 56px;
  }

  .ymr-hero__copy {
    flex: 1 1 480px;
  }

  .ymr-hero__title {
    font-size: clamp(40px, 4.8vw, 64px);
  }

  .ymr-hero__text {
    max-width: 560px;
  }

  .ymr-hero__visual {
    flex: 0 1 260px;
    margin: 0 auto;
  }

  .ymr-hero__polaroid {
    transform: rotate(-3deg);
  }

  .polaroid__img {
    aspect-ratio: 4 / 5;
  }
}

.ymr-hero__rail {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding: 24px 4px 20px;
  border-top: 1px dashed var(--line-dash);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-light);

  &::-webkit-scrollbar { height: 6px; }
  &::-webkit-scrollbar-track { background: var(--bg-light); }
  &::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 999px; }
}

.ymr-hero__rail-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 150px;
  scroll-snap-align: start;
  text-align: center;

  &:nth-child(odd) .ymr-hero__rail-stamp { transform: rotate(-8deg); }
  &:nth-child(even) .ymr-hero__rail-stamp { transform: rotate(7deg); }
}

.ymr-hero__rail-stamp {
  --size: 112px;
}

.ymr-hero__rail-meta {
  font-size: 13px;
  color: var(--muted);
}
