/* ==========================================================================
   Block: riz-pouch-hero. Reusable, self-contained: it needs nothing from the page block below.
   Deep purple band, the three coffees lit from behind. One background layer on the block itself
   (base colour + glow); no column or wrapper carries a background.
   Modifier --compact: the low closing version (text and button left, small pouch group right).
   ========================================================================== */
.riz-pouch-hero {
  --rph-base: #33253a;
  --rph-glow: 129, 95, 136;
  --rph-button: #bf4247;
  --rph-eyebrow: #f0a3a5;
  --rph-sub: #e3dbe5;
  --rph-ink: #1a1a1a;
  --rph-gutter: 15px;
  --rph-max: 1600px;
  --rph-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* Phones and tablets: the pouch row is as wide as the inner and sits at the bottom of the block.
     Its height follows its width (centre pouch 40% wide, 540x860), so the glow can be placed from the bottom. */
  --rph-row-width: calc(100vw - 2 * var(--rph-gutter));
  --rph-row-height: calc(var(--rph-row-width) * 0.597 + 24px);
  background:
    radial-gradient(ellipse calc(var(--rph-row-width) * 0.58) calc(var(--rph-row-height) * 0.62) at 50% calc(100% - var(--rph-row-height) * 0.38),
      rgba(var(--rph-glow), 0.7), rgba(var(--rph-glow), 0) 100%),
    var(--rph-base);
  color: #fff;
  overflow: hidden;
}
.riz-pouch-hero ::selection { background: #fff; color: var(--rph-ink); }
.riz-pouch-hero__inner { box-sizing: border-box; width: 100%; max-width: var(--rph-max); margin: 0 auto; padding: 0 var(--rph-gutter); display: grid; }
.riz-pouch-hero__text { padding: 48px 0 40px; }
.riz-pouch-hero__eyebrow { margin: 0 0 18px; font-size: 13px; line-height: 20px; text-transform: uppercase; letter-spacing: 2.86px; color: var(--rph-eyebrow); }
/* Ferry: typed in capitals in the source, without tonos */
.riz-pouch-hero__title { font-family: Ferry, Verdana, sans-serif !important; letter-spacing: 0.2px; text-wrap: balance; font-size: 26px; line-height: 1.32; font-weight: 600; color: #fff; margin: 0 0 26px; }
.riz-pouch-hero__lead,
.riz-pouch-hero__sub { margin: 0 0 12px; max-width: 44ch; }
.riz-pouch-hero__lead { color: #fff; font-size: 18px; line-height: 28px; }
.riz-pouch-hero__sub { color: var(--rph-sub); }
.riz-pouch-hero__actions { margin: 30px 0 0; }
.riz-pouch-hero__button {
  display: inline-block;
  font-size: 16px;
  line-height: 24px;
  padding: 14px 30px;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  background: var(--rph-button);
  color: #fff;
  transition: background-color 0.3s, color 0.3s, transform 0.16s var(--rph-ease-out);
}
.riz-pouch-hero__button:active { transform: scale(0.97); }
.riz-pouch-hero__button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.riz-pouch-hero__visual { position: relative; display: flex; align-items: flex-end; justify-content: center; padding-top: 24px; }
/* TinyPNG's modern-format output (plugin tiny-compress-images) wraps each <img> in a bare
   <picture><source>…<img></picture>. The <picture> would become the flex item and the pouch's %
   widths would resolve against it (93px pouches at 1440). display: contents takes the wrapper out
   of the layout: the <img> is the flex item again, with or without the wrapper. */
.riz-pouch-hero__visual > picture { display: contents; }
.riz-pouch-hero__pouch {
  display: block;
  width: 36%;
  max-width: 300px;
  height: auto;
  margin: 0 -4% -7%;
  filter: drop-shadow(0 22px 26px rgba(15, 8, 18, 0.55));
  animation: riz-pouch-hero-rise 0.7s var(--rph-ease-out) both;
}
.riz-pouch-hero__pouch--left { transform: rotate(-6deg); animation-delay: 0.06s; }
.riz-pouch-hero__pouch--centre { width: 40%; max-width: 340px; position: relative; z-index: 1; margin-bottom: -4%; }
.riz-pouch-hero__pouch--right { transform: rotate(6deg); animation-delay: 0.12s; }
@keyframes riz-pouch-hero-rise {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

/* --compact: the same full-bleed band, low. Stacked and short on phones. */
.riz-pouch-hero--compact {
  background:
    radial-gradient(ellipse 62% 150px at 50% 100%, rgba(var(--rph-glow), 0.7), rgba(var(--rph-glow), 0) 100%),
    var(--rph-base);
}
.riz-pouch-hero--compact .riz-pouch-hero__text { padding: 36px 0 0; }
.riz-pouch-hero--compact .riz-pouch-hero__title { font-size: 22px; line-height: 1.4; margin-bottom: 12px; }
.riz-pouch-hero--compact .riz-pouch-hero__lead { font-size: 17px; line-height: 26px; margin-bottom: 0; }
.riz-pouch-hero--compact .riz-pouch-hero__actions { margin-top: 22px; }
.riz-pouch-hero--compact .riz-pouch-hero__button { padding: 12px 26px; }
.riz-pouch-hero--compact .riz-pouch-hero__visual { padding-top: 26px; }
.riz-pouch-hero--compact .riz-pouch-hero__pouch { width: 27%; max-width: 120px; margin: 0 -2.5% -15%; animation: none; filter: drop-shadow(0 12px 16px rgba(15, 8, 18, 0.55)); }
.riz-pouch-hero--compact .riz-pouch-hero__pouch--centre { width: 30%; max-width: 134px; margin-bottom: -12%; }

@media (hover: hover) and (pointer: fine) {
  .riz-pouch-hero__button:hover { background: #fff; color: var(--rph-ink); }
}
@media (min-width: 768px) {
  .riz-pouch-hero { --rph-gutter: 30px; }
}
@media (min-width: 992px) {
  /* Desktop: the glow is centred on the pouch column (7 of 12 columns, 30px gap, inside the inner)
     and fades to nothing inside its own ellipse, at any width. */
  .riz-pouch-hero {
    --rph-glow-x: calc(50% + (min(100vw, var(--rph-max)) - 60px) * 0.2083 + 9px);
    background:
      radial-gradient(ellipse min(29vw, 600px) 58% at var(--rph-glow-x) 60%,
        rgba(var(--rph-glow), 0.72) 0%,
        rgba(var(--rph-glow), 0.56) 30%,
        rgba(var(--rph-glow), 0.3) 56%,
        rgba(var(--rph-glow), 0.1) 80%,
        rgba(var(--rph-glow), 0) 100%),
      var(--rph-base);
  }
  .riz-pouch-hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 30px; align-items: stretch; min-height: 620px; }
  .riz-pouch-hero__text { padding: 96px 0; align-self: center; }
  .riz-pouch-hero__title { font-size: 36px; line-height: 1.28; margin-bottom: 30px; }
  .riz-pouch-hero__lead { font-size: 20px; line-height: 30px; }
  .riz-pouch-hero__visual { padding-top: 64px; }
  .riz-pouch-hero__pouch { width: 32%; max-width: 340px; margin: 0 -3% -6%; }
  .riz-pouch-hero__pouch--centre { width: 36%; max-width: 390px; margin-bottom: -4%; }

  /* Compact: 7 + 5 columns, so the pouch group and its glow sit further right; same full-bleed layer. */
  .riz-pouch-hero--compact {
    --rph-glow-x: calc(50% + (min(100vw, var(--rph-max)) - 60px) * 0.2917 + 6px);
    background:
      radial-gradient(ellipse min(21vw, 400px) 96% at var(--rph-glow-x) 84%,
        rgba(var(--rph-glow), 0.72) 0%,
        rgba(var(--rph-glow), 0.56) 30%,
        rgba(var(--rph-glow), 0.3) 56%,
        rgba(var(--rph-glow), 0.1) 80%,
        rgba(var(--rph-glow), 0) 100%),
      var(--rph-base);
  }
  .riz-pouch-hero--compact .riz-pouch-hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: 0; }
  .riz-pouch-hero--compact .riz-pouch-hero__text { padding: 48px 0; }
  .riz-pouch-hero--compact .riz-pouch-hero__title { font-size: 24px; margin-bottom: 12px; }
  .riz-pouch-hero--compact .riz-pouch-hero__lead { font-size: 18px; line-height: 28px; }
  .riz-pouch-hero--compact .riz-pouch-hero__visual { padding-top: 30px; }
  .riz-pouch-hero--compact .riz-pouch-hero__pouch { width: 30%; max-width: 132px; margin: 0 -13px -53px; }
  .riz-pouch-hero--compact .riz-pouch-hero__pouch--centre { width: 33%; max-width: 148px; margin-bottom: -40px; }
}
@media (prefers-reduced-motion: reduce) {
  .riz-pouch-hero__pouch { animation: none; }
  .riz-pouch-hero__button { transition: none; }
}

/* Colour variants. They only change colours, so each one combines with --compact or stands alone.
   No modifier = deep purple (the page hero). */
/* --light: warm tint, dark text, a soft purple glow behind the pouches */
.riz-pouch-hero--light { --rph-base: #f7f3ef; --rph-glow: 150, 118, 157; color: var(--rph-ink); }
.riz-pouch-hero--light ::selection { background: var(--rph-button); color: #fff; }
.riz-pouch-hero--light .riz-pouch-hero__title { color: var(--rph-ink); }
.riz-pouch-hero--light .riz-pouch-hero__lead { color: #232323; }
.riz-pouch-hero--light .riz-pouch-hero__sub { color: #5c5c5c; }
.riz-pouch-hero--light .riz-pouch-hero__eyebrow { color: var(--rph-button); }
.riz-pouch-hero--light .riz-pouch-hero__pouch { filter: drop-shadow(0 16px 20px rgba(51, 37, 58, 0.32)); }
.riz-pouch-hero--light .riz-pouch-hero__button:focus-visible { outline-color: var(--rph-ink); }
/* --red: the accessible brand red, a lighter red glow, a white button */
.riz-pouch-hero--red { --rph-base: #bf4247; --rph-glow: 232, 128, 131; }
.riz-pouch-hero--red .riz-pouch-hero__eyebrow { color: #ffe1e2; }
.riz-pouch-hero--red .riz-pouch-hero__sub { color: #ffecec; }
.riz-pouch-hero--red .riz-pouch-hero__button { background: #fff; color: #bf4247; }
.riz-pouch-hero--red .riz-pouch-hero__pouch { filter: drop-shadow(0 16px 20px rgba(70, 12, 16, 0.5)); }
@media (hover: hover) and (pointer: fine) {
  .riz-pouch-hero--light .riz-pouch-hero__button:hover,
  .riz-pouch-hero--red .riz-pouch-hero__button:hover { background: var(--rph-ink); color: #fff; }
}
