/* ==========================================================================
   Guardians of Blockchain · homepage (index.html)

   Figma "GoB", page "Funnel (#23)": "Homepage, desktop 1440" (2278:420),
   "Homepage, telefon 390" (2281:504) and the storyboards "scroll na homepage"
   (2266:299) and "Why Solo Mining Matters (scroll)" (2322:1712).

   Everything is laid out and readable without animation. The scroll effects
   at the end of the file are progressive enhancement only.

   "What Miners Are Saying" and "Questions Before You Order" are the shared
   Reviews and FAQ blocks from base.css and need no rules here.
   ========================================================================== */

/* Animated by the scroll effects of "Why Solo Mining Matters". Registered so
   they interpolate; their initial values are the static layout. */
@property --why-cut {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

@property --why-lit {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

@property --why-read {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

@layer pages {
  /* ------------------------------------------------------------------------
     Price link: model name, price and arrow in one quiet box.
     Under the miners in the hero and in the last step of "Why".
     ------------------------------------------------------------------------ */

  .price-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    min-height: 2.75rem;
    padding-inline: var(--space-16) var(--space-12);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-button);
    background-color: var(--color-deep);
    font-size: 0.875rem;
    line-height: 1.25rem;
    white-space: nowrap;
    transition:
      background-color var(--duration-fast) ease,
      border-color var(--duration-fast) ease;
  }

  .price-link__name {
    font-weight: 500;
  }

  .price-link__price {
    color: var(--color-teal);
  }

  .price-link__arrow {
    width: 1rem;
    height: 1rem;
    transition: translate var(--duration) var(--ease-out);
  }

  .price-link:hover,
  a:hover > .price-link {
    border-color: var(--color-line-hover);
    background-color: var(--color-slate);
  }

  .price-link:hover .price-link__arrow,
  a:hover > .price-link .price-link__arrow {
    translate: 0.25rem 0;
  }

  /* ------------------------------------------------------------------------
     Hero
     Source order follows the desktop reading order. On phones the miners
     move up between the lead and the button so they sit in the first screen.
     ------------------------------------------------------------------------ */

  .hero {
    --hero-space-top: 2.25rem; /* 36: headline to header on phones */
    padding-block: var(--hero-space-top) var(--space-8);
  }

  .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero__title {
    /* This headline is smaller than GoB/Display on phones: 40/44 → 72/80 */
    --hero-title-size: clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);
    font: 600 var(--hero-title-size) / 1.1 var(--font-display);
    letter-spacing: -0.025em;
  }

  /* One sentence per block, so lines never break across the full stop. */
  .hero__title-line {
    display: block;
  }

  /* Gradient text (.text-gradient). In Figma the white-to-teal gradient spans
     the whole text box, so the word shows only the part that lies under it. */
  .hero__title-accent {
    --accent-from: -31%;
    --accent-to: 46%;
    background-image: linear-gradient(90deg, var(--color-white) var(--accent-from), var(--color-teal) var(--accent-to));
  }

  .hero__lead {
    max-width: 53.75rem;
    margin-top: var(--space-16);
  }

  .hero__actions {
    order: 1;
    align-self: stretch;
    margin-top: var(--space-24);
  }

  /* A list of .icon-text items */
  .hero__trust {
    order: 2;
    display: grid;
    align-self: stretch;
    /* Two aligned columns on a 390 px phone, a single one when they do not fit. */
    grid-template-columns: repeat(auto-fit, minmax(9.5625rem, max-content));
    justify-content: center;
    gap: var(--space-12) var(--space-16);
    margin-top: var(--space-32);
    text-align: left;
  }

  /* Both miners. A product is one link: the render and the price label under
     it. The rows are shared (subgrid), so the renders are centred on one line
     and the labels sit on one line although the renders differ in height. */

  .hero__products {
    /* The black fans disappear on the dark page, so the pair is nudged to the
       right to centre the coloured bodies (as in Figma). */
    --optical-shift: 0.3125rem;
    --glow-color: color-mix(in srgb, var(--color-teal) 30%, transparent);
    --glow-width: 26.25rem; /* 420 × 150 */
    --glow-height: 9.375rem;
    --glow-drop: 1.1875rem; /* how far the glow reaches below the labels */
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: var(--space-12) var(--space-8);
    /* 363 px on a 390 px phone, 5 px more than the content: with the shift
       the MAX render reaches a little into the gutter (as in Figma). */
    width: min(100% + 0.3125rem, 22.6875rem);
    margin-top: var(--space-32);
    translate: var(--optical-shift) 0;
  }

  /* Decorative glow under the miners. Larger than the block, so it is the one
     positioned layer here. */
  .hero__products::before {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: calc(-1 * var(--glow-drop));
    left: 50%;
    width: var(--glow-width);
    height: var(--glow-height);
    translate: calc(-50% - var(--optical-shift)) 0;
    background: radial-gradient(closest-side, var(--glow-color), transparent);
    pointer-events: none;
  }

  .hero__product,
  .hero__product-link {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__product-link {
    border-radius: var(--radius-card);
  }

  .hero__product-image {
    align-self: center;
    max-width: none;
    transition: translate var(--duration) var(--ease-out);
  }

  /* On phones the renders are wider than their column and overlap in the middle. */
  .hero__product--mini .hero__product-image {
    justify-self: start;
    width: 104.2%;
  }

  .hero__product--max .hero__product-image {
    justify-self: end;
    width: 117.7%;
  }

  .hero__product--mini .hero__product-label {
    justify-self: end;
  }

  .hero__product--max .hero__product-label {
    justify-self: start;
  }

  .hero__product-link:hover .hero__product-image {
    translate: 0 -0.25rem;
  }

  @media (min-width: 48rem) {
    .hero {
      padding-block: var(--space-48) var(--space-32);
    }

    .hero__title {
      line-height: 1.1111;
    }

    .hero__title-accent {
      --accent-from: 20%;
      --accent-to: 166%;
    }

    .hero__lead {
      margin-top: 1.25rem;
    }

    .hero__actions {
      order: 0;
      margin-top: var(--space-32);
    }

    .hero__trust {
      order: 0;
      display: flex;
      flex-wrap: wrap;
      column-gap: var(--space-32);
      margin-top: var(--space-24);
    }

    /* On tablets the four would break 3 + 1: two aligned columns instead. */
    @media (width < 64rem) {
      .hero__trust {
        display: grid;
        grid-template-columns: repeat(2, max-content);
      }
    }

    /* 18 px icons, still centred on the 20 px line */
    .hero__trust .icon-text__icon {
      width: 1.125rem;
      height: 1.125rem;
      margin-top: 1px;
    }

    .hero__products {
      --optical-shift: 1.3125rem;
      --glow-width: 62.5rem; /* 1000 × 260 */
      --glow-height: 16.25rem;
      --glow-drop: 3.125rem;
      /* The renders keep their relative size: 333 and 379 px of 736 */
      grid-template-columns: minmax(0, 333fr) minmax(0, 379fr);
      gap: 0 var(--space-24);
      width: min(100%, 46rem);
      margin-top: var(--space-24);
    }

    .hero__product--mini .hero__product-image,
    .hero__product--max .hero__product-image {
      width: 100%;
    }

    .hero__product--mini .hero__product-label,
    .hero__product--max .hero__product-label {
      justify-self: center;
    }

    /* The label overlaps the empty lower edge of the render. */
    .hero__product-label {
      gap: var(--space-12);
      min-height: 3rem;
      margin-top: calc(-1 * var(--space-12));
      padding-inline: var(--space-24) var(--space-16);
      font-size: 1rem;
      line-height: 1.5rem;
    }

    .hero__product-label .price-link__arrow {
      width: 1.125rem;
      height: 1.125rem;
    }
  }

  /* Low laptop windows (1366 x 657, 1280 x 600): the hero still ends on the
     first screen, with both miners and their prices on it. The headline and
     the gaps tighten with the height, the renders take what is left. */
  @media (min-width: 64rem) and (max-height: 48rem) {
    .hero {
      padding-block: var(--space-32) var(--space-24);
    }

    .hero__title {
      font-size: min(var(--hero-title-size), 8.5svh);
    }

    .hero__lead {
      margin-top: var(--space-16);
    }

    .hero__actions {
      margin-top: var(--space-24);
    }

    .hero__trust {
      margin-top: var(--space-16);
    }

    .hero__products {
      /* 3.2 = width of the pair by its height; 29rem = everything else on the screen */
      width: min(100%, 46rem, (100svh - 29rem) * 3.2);
      min-width: 29rem; /* the two price labels still fit side by side */
      margin-top: var(--space-16);
    }

    /* Below 640 px of height the pair is narrow: smaller price labels. */
    @media (max-height: 40rem) {
      .hero__product-label {
        gap: var(--space-8);
        min-height: 2.5rem;
        padding-inline: var(--space-16) var(--space-12);
        font-size: 0.875rem;
        line-height: 1.25rem;
      }
    }
  }

  /* ------------------------------------------------------------------------
     Two Ways to Fight Centralization: the two model cards
     ------------------------------------------------------------------------ */

  .models__list {
    display: grid;
    gap: var(--space-32);
  }

  .model-card {
    --glow-color: color-mix(in srgb, var(--color-teal) 22%, transparent); /* glow in the lower left corner */
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "media media"
      "title amount"
      "specs specs"
      "vat vat"
      "cta cta";
    gap: var(--space-16);
    padding: 0 var(--space-24) var(--space-24);
    overflow: clip;
    background-image: radial-gradient(12.5rem 8.125rem at 16% 94%, var(--glow-color), transparent);
    background-repeat: no-repeat;
  }

  .model-card__media {
    --image-width: 76%; /* MINI render: 234 of 308 px */
    position: relative;
    isolation: isolate;
    grid-area: media;
    display: grid;
    place-items: end center;
    aspect-ratio: 308 / 190;
    padding-bottom: 0.625rem;
  }

  .model-card--max .model-card__media {
    --image-width: 81.5%;
  }

  /* Glow under the miner; it runs over the lower edge of the media area. */
  .model-card__media::before {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: 0;
    left: 50%;
    width: 84.4%;
    aspect-ratio: 11 / 3;
    translate: -50% 28%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--color-teal) 32%, transparent), transparent);
  }

  .model-card__image {
    width: var(--image-width);
  }

  .model-card__title {
    grid-area: title;
    font-weight: 700;
  }

  .model-card__brand {
    font-weight: 400;
  }

  /* A .spec-list */
  .model-card__specs {
    grid-area: specs;
    gap: var(--space-8);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  /* On phones the amount sits beside the name and the VAT note under the specs. */
  .model-card__price {
    display: contents;
  }

  .model-card__amount {
    grid-area: amount;
  }

  .model-card__vat {
    grid-area: vat;
    color: var(--color-mist);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
  }

  .model-card__cta {
    grid-area: cta;
  }

  @media (min-width: 48rem) {
    .models__list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-24);
    }
  }

  @media (min-width: 64rem) {
    .model-card {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas:
        "media"
        "title"
        "specs"
        "price"
        "cta";
      gap: var(--space-24);
      padding: 0 var(--space-32) var(--space-32);
      background-image: radial-gradient(17.5rem 11.25rem at 13% 78%, var(--glow-color), transparent);
    }

    .model-card__media {
      --image-width: 70.75%; /* 369 of 522 px */
      aspect-ratio: 522 / 300;
    }

    .model-card--max .model-card__media {
      --image-width: 76.15%;
    }

    .model-card__specs {
      gap: var(--space-12);
      font-size: 1rem;
      line-height: 1.5rem;
    }

    .model-card__price {
      grid-area: price;
      display: flex;
      align-items: baseline;
      gap: var(--space-8);
    }

    .model-card__vat {
      font-size: 0.875rem;
      font-weight: 400;
      line-height: 1.25rem;
    }

    .model-card__vat-prefix {
      display: none;
    }
  }

  /* ------------------------------------------------------------------------
     Why Solo Mining Matters
     Three steps (Today, With Guardians, Your Move) and one picture: a mining
     farm left of a divider, a city with turquoise windows right of it.
     Phones: step, picture, step, step. From 1024 the steps run on the left
     and the picture stays in view on the right, like the tour on the product
     pages. Static: the divider sits in the middle, every step fully lit.
     ------------------------------------------------------------------------ */

  .why__layout {
    display: grid;
    gap: var(--space-40);
  }

  .why__step {
    display: grid;
    justify-items: start;
    gap: var(--space-12);
  }

  .why__title {
    opacity: calc(0.4 + 0.6 * var(--why-lit));
  }

  .why__text {
    max-width: 32rem;
    color: var(--color-mist);
  }

  .why__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-12);
    width: 100%;
    margin-top: var(--space-8);
  }

  .why__stat {
    display: grid;
    align-content: start;
    gap: var(--space-8);
    padding: var(--space-16);
    background-image: radial-gradient(8rem 5rem at 0% 100%, color-mix(in srgb, var(--color-teal) 18%, transparent), transparent);
    background-repeat: no-repeat;
  }

  .why__stat-value {
    width: fit-content;
    background-image: linear-gradient(90deg, var(--color-teal), var(--color-white));
    font: 700 3rem/1 var(--font-display);
    letter-spacing: -0.03em;
  }

  /* GoB: a unit after the number ("2.4 EH/s") stays on the same line, smaller. */
  .why__stat-unit {
    font-size: 0.45em;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .why__stat-label {
    color: var(--color-mist);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  /* Full-width rows on phones, side by side from the tablet up */
  .why__models {
    display: grid;
    gap: var(--space-12);
    width: 100%;
    margin-top: var(--space-8);
  }

  .why__models .price-link {
    display: flex;
  }

  .why__models .price-link__arrow {
    margin-inline-start: auto;
  }

  /* Picture: city, then the farm on top cut at --why-cut from the right,
     then the divider on that edge. The farm's tag is cut with it. */

  .why__figure {
    display: grid;
    gap: var(--space-12);
  }

  .why__stage {
    /* The farm keeps this much of the width before and after the wipe;
       chosen so the two tags never overlap (phones: the tags are wider). */
    --why-cut-start: 36%;
    --why-cut-end: 98%;
    display: grid;
    aspect-ratio: 4 / 5;
    overflow: clip;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background-color: var(--color-night);
  }

  .why__stage > *,
  .why__farm > * {
    grid-area: 1 / 1;
  }

  .why__farm {
    display: grid;
    clip-path: inset(0 var(--why-cut) 0 0);
  }

  .why__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .why__tag {
    align-self: start;
    justify-self: start;
    margin: var(--space-12);
    padding-inline: var(--space-8);
    font-size: 0.75rem;
    line-height: 1rem;
  }

  .why__tag--city {
    justify-self: end;
  }

  .why__divider {
    justify-self: start;
    width: 2px;
    margin-inline-start: calc(100% - var(--why-cut) - 1px);
    background-color: var(--color-teal);
    box-shadow:
      0 0 3rem 0.25rem color-mix(in srgb, var(--color-teal) 25%, transparent),
      0 0 1rem 1px color-mix(in srgb, var(--color-teal) 70%, transparent);
  }

  /* The turquoise dot stands for one of the lit windows in the picture. */
  .why__caption {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    color: var(--color-mist);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .why__caption::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--color-teal);
    box-shadow: 0 0 0.5rem color-mix(in srgb, var(--color-teal) 70%, transparent);
  }

  @media (min-width: 48rem) {
    .why__models {
      display: flex;
      flex-wrap: wrap;
      width: auto;
    }

    .why__models .price-link {
      display: inline-flex;
    }

    .why__models .price-link__arrow {
      margin-inline-start: 0;
    }

    .why__stage {
      --why-cut-start: 30%;
      aspect-ratio: 3 / 2;
      border-radius: var(--radius-card-lg);
    }

    .why__tag {
      margin: var(--space-16);
      padding-inline: var(--space-12);
      font-size: 0.875rem;
      line-height: 1.25rem;
    }

    .why__stat {
      padding: var(--space-24);
    }

    .why__stat-value {
      font-size: 4rem;
    }
  }

  @media (min-width: 64rem) {
    .why__layout {
      grid-template-columns: minmax(0, 440fr) minmax(0, 696fr);
      grid-template-rows: repeat(3, auto);
      align-items: center;
      column-gap: var(--space-64);
      row-gap: var(--space-48);
    }

    .why__step {
      grid-column: 1;
    }

    /* Stays in view while the steps scroll past. */
    .why__figure {
      position: sticky;
      top: calc(var(--header-height) + var(--space-24));
      grid-area: 1 / 2 / -1;
      align-self: start;
    }

    .why__stage {
      aspect-ratio: 696 / 560;
    }
  }

  /* ------------------------------------------------------------------------
     Our Cause
     ------------------------------------------------------------------------ */

  .cause__inner {
    display: grid;
    justify-items: center;
    gap: var(--space-16);
    text-align: center;
  }

  .cause__label {
    color: var(--color-teal);
    font: 400 1rem/1.5rem var(--font-text);
  }

  .cause__statement {
    /* 26/34 semibold on phones → GoB/Desktop/H2 (48/48 bold) */
    --cause-size: clamp(1.625rem, 1.114rem + 2.095vw, 3rem);
    --cause-leading: clamp(2.125rem, 1.8rem + 1.333vw, 3rem);
    --cause-dim: color-mix(in srgb, var(--color-white) 55%, transparent);
    max-width: 65rem;
    font: 600 var(--cause-size) / var(--cause-leading) var(--font-display);
    /* Lines break where they do in the design, not re-flowed by "pretty". */
    text-wrap: wrap;
  }

  .cause__rest {
    color: var(--cause-dim);
  }

  @media (min-width: 48rem) {
    .cause {
      /* Soft glow behind the statement */
      --glow-color: color-mix(in srgb, var(--color-teal) 12%, transparent);
      background-image: radial-gradient(28.125rem 8.125rem at 50% 57%, var(--glow-color), transparent);
      background-repeat: no-repeat;
    }

    .cause__inner {
      gap: var(--space-24);
    }

    .cause__label {
      font-size: 1.25rem;
      line-height: 1.75rem;
    }

    .cause__statement {
      font-weight: 700;
      letter-spacing: -0.02em;
    }
  }

  /* ------------------------------------------------------------------------
     How It Works: three steps
     ------------------------------------------------------------------------ */

  .how__steps {
    display: grid;
    gap: var(--space-16);
  }

  .how-step {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: clip;
  }

  .how-step__media {
    /* Night scene with a turquoise glow under the render */
    background:
      radial-gradient(62% 26% at 50% 79%, color-mix(in srgb, var(--color-teal) 28%, transparent), transparent 75%),
      var(--color-night);
  }

  .how-step__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
  }

  .how-step__body {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: var(--space-8);
    padding: 1.25rem 1.25rem var(--space-24);
  }

  .how-step__number {
    /* Badge gradient (Figma: Číslo) */
    --badge-from: var(--color-gold);
    --badge-via: #99f2bf;
    --badge-to: #f7fafc;
    margin-bottom: var(--space-8);
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-button);
    background: linear-gradient(90deg, var(--badge-from), var(--badge-via) 55%, var(--badge-to));
    color: var(--color-ink);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
  }

  @media (min-width: 48rem) {
    .how__steps {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: var(--space-24);
    }
  }

  @media (min-width: 64rem) {
    .how-step__body {
      padding: var(--space-24) 1.75rem var(--space-32);
    }
  }

  /* ------------------------------------------------------------------------
     What’s Inside the FREE Guide
     A compact list on phones, cards from the tablet up.
     ------------------------------------------------------------------------ */

  .guide__list {
    display: grid;
    gap: var(--space-12);
  }

  .guide-card {
    --glow-color: color-mix(in srgb, var(--color-teal) 24%, transparent); /* glow in the lower left corner */
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    gap: 0.125rem var(--space-16);
    padding: var(--space-16);
    background-image: radial-gradient(8.125rem 4.375rem at 0.5625rem calc(100% + 0.5625rem), var(--glow-color), transparent);
    background-repeat: no-repeat;
  }

  .guide-card__icon {
    display: grid;
    grid-row: span 2;
    place-items: center;
    align-self: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-button);
    background-color: var(--color-night);
  }

  .guide-card__icon .icon {
    width: 1.375rem;
    height: 1.375rem;
  }

  .guide-card__title {
    align-self: end;
    font: 500 1rem/1.5rem var(--font-text);
  }

  .guide-card__text {
    align-self: start;
    color: var(--color-mist);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .guide__actions {
    margin-top: var(--space-12);
  }

  @media (min-width: 48rem) {
    .guide__list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-24);
    }

    .guide-card {
      grid-template-columns: minmax(0, 1fr);
      align-content: start;
      gap: var(--space-16);
      padding: var(--space-32);
      background-image: radial-gradient(11.875rem 7.5rem at 1.8125rem calc(100% - 0.6875rem), var(--glow-color), transparent);
    }

    .guide-card__icon {
      grid-row: auto;
      width: 3rem;
      height: 3rem;
      margin-bottom: var(--space-32);
    }

    .guide-card__icon .icon {
      width: 1.5rem;
      height: 1.5rem;
    }

    .guide-card__title {
      font: 600 var(--text-h4) / var(--leading-h4) var(--font-display);
    }

    .guide-card__text {
      font-size: 1rem;
      line-height: 1.5rem;
    }

    .guide__actions {
      margin-top: var(--space-48);
    }
  }

  @media (min-width: 64rem) {
    .guide__list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  /* Download dialog (popover). No display rule on the popover itself, the
     browser keeps it hidden until it is opened. The auto margin centres it;
     the reset removes the browser's own. */

  .guide-dialog {
    width: min(100% - 2 * var(--gutter), 32.5rem);
    margin: auto;
    padding: var(--space-32);
    color: var(--color-white);
  }

  .guide-dialog::backdrop {
    background-color: color-mix(in srgb, var(--color-ink) 60%, transparent);
  }

  .guide-dialog__text {
    margin-top: var(--space-12);
  }

  .guide-dialog__form {
    display: grid;
    gap: var(--space-16);
    margin-top: var(--space-24);
  }

  /* ------------------------------------------------------------------------
     Closing call to action
     ------------------------------------------------------------------------ */

  .cta__panel {
    --glow-color: color-mix(in srgb, var(--color-teal) 30%, transparent);
    display: grid;
    justify-items: center;
    gap: var(--space-16);
    padding: var(--space-48) var(--space-32);
    background-image: radial-gradient(10.9375rem 6.25rem at 50% 77%, var(--glow-color), transparent);
    background-repeat: no-repeat;
    text-align: center;
  }

  .cta__actions {
    justify-self: stretch;
  }

  @media (min-width: 48rem) {
    .cta__panel {
      gap: var(--space-24);
      padding: var(--space-80) var(--space-64);
      /* Glow at the bottom centre and a fainter one in the top left corner */
      background-image:
        radial-gradient(25rem 9.375rem at 50% 85.5%, var(--glow-color), transparent),
        radial-gradient(18.75rem 11.25rem at 3.25% 5.5%, color-mix(in srgb, var(--color-teal) 14%, transparent), transparent);
    }
  }

  /* ------------------------------------------------------------------------
     Scroll effects (progressive enhancement)
     Only with scroll-driven animations, on screen, without a reduced-motion
     preference and in a window between 480 and 1600 px high: a pinned scene
     needs room for its captions, and makes no sense in a window several
     scenes tall. Everywhere else the static layout above is the page.
     ------------------------------------------------------------------------ */

  @supports (animation-timeline: view()) {
    @media screen and (prefers-reduced-motion: no-preference) and (min-height: 30rem) and (max-height: 100rem) {
      /* Hero: the two miners drift apart while the hero scrolls away,
         towards their cards in the next section. Desktop only; on phones
         the renders already reach the screen edges. */
      @media (min-width: 48rem) {
        .hero__product {
          animation: hero-drift linear both;
          animation-timeline: scroll(root block);
          animation-range: 0px 35rem;
        }

        .hero__product--mini {
          --hero-drift: -3rem;
        }

        .hero__product--max {
          --hero-drift: 3rem;
        }
      }

      @keyframes hero-drift {
        to {
          translate: var(--hero-drift) 0;
        }
      }

      /* Model cards: the render rises into place and the specs follow as
         each row enters the screen. Price and button never fade. */
      .model-card__image {
        animation: model-rise linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
      }

      .model-card__specs .spec-list__row {
        animation: model-spec linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 14%;
      }

      @keyframes model-rise {
        from {
          opacity: 0;
          scale: 0.88;
          translate: 0 1.5rem;
        }
      }

      @keyframes model-spec {
        from {
          opacity: 0;
          translate: 0 0.75rem;
        }
      }

      /* Why Solo Mining Matters. Phones: the divider wipes the farm away
         while the picture crosses the screen. From 1024: the picture stays
         in view, the divider moves while the second step is read, and the
         step in the reading zone is lit, with its line filling up. */
      .why__stage {
        --why-cut: var(--why-cut-start);
        animation: why-wipe linear both;
        animation-timeline: view();
        animation-range: contain 0% contain 70%;
      }

      @media (min-width: 64rem) {
        .why {
          timeline-scope: --why-shift;
        }

        .why__layout {
          align-items: stretch;
        }

        /* Room to read each step while the picture stays put */
        .why__step {
          align-content: center;
          min-height: min(32rem, 55svh);
          animation:
            why-lit linear both,
            why-read linear both;
          animation-timeline: view(), view();
          animation-range:
            cover 20% cover 80%,
            cover 30% cover 70%;
        }

        .why__step--shift {
          view-timeline: --why-shift block;
        }

        .why__stage {
          animation-timeline: --why-shift;
          animation-range: cover 25% cover 60%;
        }

        /* Progress of the step (as "Průběh kapitoly" on the product pages) */
        .why__step::before {
          content: "";
          width: 4rem;
          height: 2px;
          border-radius: 1px;
          background: linear-gradient(to right, var(--color-teal) var(--why-read), var(--color-line) 0);
        }
      }

      @keyframes why-wipe {
        to {
          --why-cut: var(--why-cut-end);
        }
      }

      @keyframes why-lit {
        0%,
        100% {
          --why-lit: 0;
        }

        30%,
        70% {
          --why-lit: 1;
        }
      }

      @keyframes why-read {
        to {
          --why-read: 100%;
        }
      }

      /* Our Cause: the words light up along the text as the statement
         crosses the screen. The inline run carries the gradient, so it
         follows the lines. */
      .cause__statement {
        view-timeline: --cause-statement block;
      }

      .cause__words {
        background-image:
          linear-gradient(var(--color-white), var(--color-white)),
          linear-gradient(var(--cause-dim), var(--cause-dim));
        background-repeat: no-repeat;
        background-size:
          0% 100%,
          100% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: cause-light linear both;
        animation-timeline: --cause-statement;
        animation-range: cover 20% cover 55%;
      }

      .cause__rest {
        color: inherit;
      }

      @keyframes cause-light {
        to {
          background-size:
            100% 100%,
            100% 100%;
        }
      }
    }
  }
}
