/**
 * @file
 * Hero section (Figma: Hero — Option C (Paper / Riso), 1440 × 780).
 *
 * Desktop positions are taken from the 1440px frame. The visual (photo,
 * stamp, tracks card) is sized as a percentage of its own box so it scales.
 */

.sra-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(204, 204, 204, 0.2), rgba(204, 204, 204, 0.2)),
    url("../images/hero/paper-texture.jpg") center 40% / cover no-repeat,
    var(--sra-white);
}

.sra-hero__inner {
  position: relative;
  min-height: 691px;
  max-width: var(--sra-max-width);
  margin: 0 auto;
  padding: 188px var(--sra-gutter) 64px;
}

/* Copy. */
.sra-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 662px;
  max-width: 100%;
}

.sra-hero__headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--sra-tertiary-950);
  font-size: 54px;
  font-weight: 700;
  line-height: 62px;
  letter-spacing: -1px;
}

.sra-hero__highlight {
  display: inline-block;
  margin: 14px 0 14px 3px;
  padding: 2px 24px 6px;
  border-radius: var(--sra-radius-full);
  background: var(--sra-secondary-500);
  color: var(--sra-white);
  white-space: nowrap;
  transform: rotate(2.5deg);
}

.sra-hero__lead {
  width: 489px;
  max-width: 100%;
  color: var(--sra-gray-600);
  font-size: 20px;
  line-height: 30px;
}

.sra-hero__actions {
  display: flex;
  gap: 12px;
}

/* Visual: photo in the brand shape, rotating stamp, tracks card. */
.sra-hero__visual {
  position: absolute;
  top: 106px;
  left: 798.54px;
  width: 662.46px;
  aspect-ratio: 662.46 / 599.45;
}

.sra-hero__photo {
  position: absolute;
  top: 0.06%;
  left: 1.289%;
  width: 100.02%;
  height: 99.91%;
  -webkit-mask: url("../images/shape-mask.svg") center / 100% 100% no-repeat;
  mask: url("../images/shape-mask.svg") center / 100% 100% no-repeat;
}

.sra-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The family cut-out, left half, drawn above the stamp. Not masked to the
   shape, so the children's heads rise above the photo's edge (as in Figma). */
.sra-hero__photo--front {
  -webkit-mask: none;
  mask: none;
  clip-path: inset(1.1% 50.01% 1.99% 1.8%);
}

.sra-stamp {
  position: absolute;
  top: 0.762%;
  left: 44.135%;
  width: 15.397%;
  aspect-ratio: 1;
}

.sra-stamp img {
  position: absolute;
  display: block;
  max-width: none;
}

.sra-stamp__disc {
  top: 1.794%;
  left: 1.794%;
  width: 96.413%;
  height: 96.413%;
}

.sra-stamp__ring {
  top: 24.118%;
  left: 24.118%;
  width: 51.775%;
  height: 51.775%;
}

.sra-stamp__core {
  top: 30.588%;
  left: 30.588%;
  width: 38.83%;
  height: 38.83%;
}

.sra-stamp__ring-text {
  inset: 0;
  width: 100%;
  height: 100%;
  animation: sra-stamp-rotate 12s linear infinite;
}

@keyframes sra-stamp-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Tracks card (rotated -3deg, centred at 75.12% / 74.79% of the visual). */
.sra-hero__card {
  position: absolute;
  top: 74.79%;
  left: 75.12%;
  display: flex;
  flex-direction: column;
  gap: 6.94px;
  width: max-content;
  min-width: 242px;
  padding: 20.82px;
  border-radius: 17.79px;
  background: var(--sra-white);
  box-shadow: 0 16px 35.58px -5.34px rgba(2, 45, 48, 0.14), 0 1.78px 5.34px rgba(2, 45, 48, 0.06);
  transform: translate(-50%, -50%) rotate(-3deg);
}

.sra-hero__card-title {
  color: var(--sra-tertiary-950);
  font-size: 16px;
  font-weight: 700;
  line-height: 20.82px;
  letter-spacing: 0.43px;
  white-space: nowrap;
}

.sra-hero__card-items {
  display: flex;
  flex-direction: column;
  gap: 12.15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sra-icon-item {
  display: flex;
  align-items: center;
  gap: 10.67px;
}

.sra-icon-item__badge {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 35.58px;
  height: 35.58px;
  border-radius: 50%;
  background: var(--sra-gray-700);
}

.sra-icon-item--orange .sra-icon-item__badge {
  background: var(--sra-track-schools);
}

.sra-icon-item--teal .sra-icon-item__badge {
  background: var(--sra-track-universities);
}

.sra-icon-item--purple .sra-icon-item__badge {
  background: var(--sra-track-social);
}

.sra-icon-item__icon {
  display: block;
  width: 17.79px;
  height: 17.79px;
}

.sra-icon-item__label {
  white-space: nowrap;
  color: var(--sra-tertiary-950);
  font-size: 14px;
  line-height: 21.35px;
  letter-spacing: 0.44px;
}

.sra-hero__card-tag {
  margin-top: 12.15px;
  padding: 5.34px 12.45px;
  border-radius: var(--sra-radius-full);
  background: var(--sra-gray-200);
  color: var(--sra-black);
  font-size: 14px;
  line-height: 17.79px;
  letter-spacing: 0.44px;
  text-align: center;
  white-space: nowrap;
}

/* RTL: copy on the right, visual on the left. */
[dir="rtl"] .sra-hero__visual {
  right: 798.54px;
  left: auto;
}

/* The visual is mirrored as in Figma AR: photo and brand shape flipped (the
   mask and the cut-out flip with it), stamp and tracks card on the mirrored
   positions, card tilted the other way. */
[dir="rtl"] .sra-hero__photo {
  right: 1.289%;
  left: auto;
  transform: scaleX(-1);
}

[dir="rtl"] .sra-stamp {
  right: 44.135%;
  left: auto;
}

/* Figma AR: card box 19-285px across, 414-676px down the 691px hero. */
[dir="rtl"] .sra-hero__card {
  top: 73.3%;
  left: 26.1%;
  transform: translate(-50%, -50%) rotate(3deg);
}

/* Arabic (Figma AR): a fixed 253px card; long track names wrap (165px). */
[dir="rtl"] .sra-hero__card {
  width: 253px;
  min-width: 0;
}

[dir="rtl"] .sra-icon-item__label {
  max-width: 165px;
  white-space: normal;
}

[dir="rtl"] .sra-hero__headline {
  letter-spacing: 0;
}

/* Arabic (Figma AR hero): highlight 48px, lead 18/28. */
[dir="rtl"] .sra-hero__highlight {
  margin: 14px 3px 14px 0;
}

/* Desktop only: tablets and phones use their own (smaller) sizes. */
@media (min-width: 1024px) {
  [dir="rtl"] .sra-hero__highlight {
    font-size: 48px;
  }

  [dir="rtl"] .sra-hero__lead {
    font-size: 18px;
    line-height: 28px;
  }
}

/* Wider than the 1440px frame: keep the visual bleeding off the screen edge
   (as in Figma) instead of stopping at the centred content box. */
@media (min-width: 1441px) {
  .sra-hero__visual {
    right: calc((1440px - 100vw) / 2 - 21px);
    left: auto;
  }

  [dir="rtl"] .sra-hero__visual {
    right: auto;
    left: calc((1440px - 100vw) / 2 - 21px);
  }
}

/* Narrower desktops: the visual is positioned relative to the viewport. */
@media (max-width: 1439px) {
  .sra-hero__visual {
    left: 55.45%;
    width: 46%;
  }

  [dir="rtl"] .sra-hero__visual {
    right: 55.45%;
    left: auto;
  }
}

/* The visual overhangs the viewport by 1.45vw (3.15% of its width); keep the
   tracks card 16px inside the screen edge. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .sra-hero__card {
    right: calc(3.15% + 16px);
    left: auto;
    transform: translateY(-50%) rotate(-3deg);
  }

  [dir="rtl"] .sra-hero__card {
    right: auto;
    left: calc(3.15% + 16px);
    transform: translateY(-50%) rotate(3deg);
  }
}

@media (max-width: 1279px) {
  .sra-hero__headline {
    font-size: 44px;
    line-height: 52px;
  }

  .sra-hero__copy {
    width: 52%;
  }
}

/* Tablet and mobile: stacked; photo, then the tracks card. */
@media (max-width: 1023px) {
  .sra-hero__inner {
    min-height: 0;
    padding-top: 180px;
    padding-bottom: 80px;
  }

  .sra-hero__copy {
    width: 100%;
  }

  .sra-hero__headline {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.5px;
  }

  .sra-hero__highlight {
    white-space: normal;
  }

  .sra-hero__lead {
    font-size: 18px;
    line-height: 28px;
  }

  /* Tablets (iPad mini etc.): text only, like mobile. */
  .sra-hero__visual,
  [dir="rtl"] .sra-hero__visual {
    display: none;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: min(100%, 560px);
    margin: 48px auto 0;
    aspect-ratio: auto;
  }

  .sra-hero__photo {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 662.6 / 598.94;
  }

  [dir="rtl"] .sra-hero__photo {
    right: auto;
  }

  /* The cut-out stays (the children's heads above the shape), laid over
     the photo's box. */
  .sra-hero__photo--front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 662.6 / 598.94;
  }

  .sra-stamp {
    width: 88px;
  }

  .sra-hero__card,
  [dir="rtl"] .sra-hero__card {
    position: relative;
    top: auto;
    left: auto;
    width: max-content;
    max-width: calc(100% - 16px);
    margin: -64px 8px 0 auto;
    transform: rotate(-3deg);
  }

  [dir="rtl"] .sra-hero__card {
    margin: -64px auto 0 8px;
    transform: rotate(3deg);
  }
}

@media (max-width: 599px) {
  .sra-hero__headline {
    font-size: 30px;
    line-height: 38px;
  }

  .sra-button--large {
    height: 52px;
    padding: 0 24px;
  }
}
