.hero {
  --wrap: 1266px;
  display: grid;
  grid-template-columns: minmax(450px, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "copy portrait";
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(36px, 4vw, 60px) max(22px, calc((100% - var(--wrap)) / 2));
  background: var(--black);
  color: var(--ivory);
}
[dir="rtl"] .hero {
  grid-template-columns: minmax(0, 1fr) minmax(450px, 1.1fr);
  grid-template-areas: "portrait copy";
}
.hero-inner {
  --stats-divider-width: 352px;
  --stats-number-size: clamp(27px, 2.8vw, 38px);
  /* Visible space from the last benefit to the opening ornament. */
  --stats-ink-gap: clamp(14.5px, 1.08vw, 15.5px);
  grid-area: copy;
  min-width: 0;
  text-align: start;
}
.hero-portrait { grid-area: portrait; display: block; width: 100%; max-width: 576px; height: auto; justify-self: center; }

.hero-portrait-rays {
  opacity: .72;
  direction: ltr;
  transform-box: view-box;
  transform-origin: 50% 50%;
}

@keyframes hero-ray-turn {
  from { transform: rotate(0turn); }
  to { transform: rotate(1turn); }
}
@keyframes hero-ray-glow {
  0%, 100% { opacity: .58; }
  50% { opacity: .94; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .hero-portrait-rays {
    animation: hero-ray-turn 96s linear infinite, hero-ray-glow 6s ease-in-out infinite;
  }
}

.hero h1 { font-size: clamp(36px, 3.45vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -.8px; text-wrap: balance; overflow-wrap: break-word; }
.hero h1:lang(ar) { line-height: 1.45; }
.hero h1 > span { display: block; }
.hero h1 > span,
.stats dd { color: var(--hero-accent-color, #fff); }
.hero h1 > :nth-child(2),
.stats > :nth-child(2) > dd { --hero-accent-color: #4076d9; }
.hero h1 > :nth-child(3),
.stats > :nth-child(3) > dd { --hero-accent-color: #e03e46; }

@supports ((background-clip: text) or (-webkit-background-clip: text)) and (-webkit-text-fill-color: transparent) {
  .hero h1 > span,
  .stats dd {
    background-color: currentColor;
    background-image: linear-gradient(180deg, rgba(255,255,255,.19) 8%, transparent 37%, transparent 60%, rgba(0,0,0,.36) 91%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .hero h1 > span::selection,
  .stats dd::selection { -webkit-text-fill-color: currentColor; }

  .hero h1 { display: flow-root; }
  .hero h1 > span {
    /* Give descenders room to paint while keeping the original line spacing. */
    padding-bottom: .18em;
    margin-bottom: -.18em;
  }
  .stats > :nth-child(3) > dd {
    /* The last digit can overhang its box after the column is shifted. */
    padding-inline-end: 2px;
    margin-inline-end: -2px;
  }
}

.hero-lead { margin-top: 14px; color: var(--sand); font-size: clamp(18px, 1.55vw, 22px); line-height: 1.5; }
.stats-divider {
  display: block;
  position: relative;
  left: var(--stats-center, 50%);
  width: min(100%, var(--stats-divider-width), var(--stats-divider-fit, 100%));
  height: auto;
  margin-right: auto;
  transform: translateX(-50%);
}
.stats-divider--opening { margin-top: 10px; }
.stats-divider--closing { margin-top: calc(var(--stats-ink-gap) - 2.5px); }
/* A third line in the first Russian caption leaves extra space below the letters. */
.stats--long-first-caption + .stats-divider--closing { margin-top: calc(var(--stats-ink-gap) - 4.5px); }
.hero-lead h2 { font-size: inherit; }
.hero-lead ul { margin: 6px 0 0; padding: 0; list-style: none; }
.hero-lead li + li { margin-top: 4px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
  /* The number's line box already supplies part of the visible gap below the ornament. */
  margin-top: calc(var(--stats-ink-gap) - 1px - var(--stats-number-size) * .235);
}
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: flex-start; min-width: 0; }
.stats:lang(ru) > :nth-child(3) > * { transform: translateX(calc(0px - var(--day-stat-offset, 0px))); }
.stats dd { font-size: var(--stats-number-size); line-height: 1.18; font-weight: 700; white-space: nowrap; }
.stats dt { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--sand); overflow-wrap: anywhere; }
.hero-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: start; gap: 12px; margin-top: calc(var(--stats-ink-gap) - 1px); }
.hero-buttons .btn-primary { background-color: var(--orange-yellow); color: var(--black); }
.hero-buttons .btn-sheen {
  --button-underlay: linear-gradient(110deg, #ffde85, var(--orange-yellow) 50%, #e88c18);
}
.hero-buttons .btn-primary:last-child { border-color: var(--sand); background: transparent; color: var(--ivory); }
.hero :focus-visible { outline-color: var(--orange-yellow); }
.hero-note { display: flex; align-items: flex-start; margin-top: 14px; font-size: 14px; font-weight: 650; color: var(--sand); }
.hero-note .icon { width: 20px; height: 20px; margin-inline-end: 8px; color: var(--orange-yellow); }

@media (max-width: 970px) {
  .hero, [dir="rtl"] .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "portrait";
    padding: 32px clamp(16px, 4vw, 32px) 24px;
    gap: 24px;
  }
  .hero-portrait { max-width: 440px; }
}

@media (max-width: 490px) {
  .hero h1 { font-size: clamp(29px, 7.8vw, 36px); }
  .hero-inner { --stats-divider-width: 288px; --stats-number-size: clamp(19px, 5.1vw, 26px); }
  .hero-lead { font-size: 17px; }
  .stats { gap: 8px; }
  .stats dt { font-size: 13px; }
  .hero-buttons { grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 320px; }
}

@media print, (forced-colors: active) {
  .hero h1 > span,
  .stats dd {
    color: CanvasText;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}
