/* Home · Hero, variant hero-launch-1 — "Offer-led".
   Desktop (> 900 px): one screen under the top bar, two columns.
     left   .h1l-copy   icon + wordmark, benefit headline, one line on what it does
            .h1l-deal   the launch-offer card wrapped around the download button, friction reducers under it
     right  .h1l-media  the laptop, the six-frame ladybird bracket fanned above its lid (focus sweep)
   Phones: headline → laptop → offer card, so the button is on the first screen with the product above it.
   Green only on the button; the "50% off" pill is system yellow. No backdrop-filter anywhere (the card is a plain
   translucent surface), so the hero's horizontal clip is safe. Loaded after css/sep-b.css. */

.h1l {
  --h1l-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --h1l-pad-t: clamp(20px, 4svh, 48px);
  --h1l-pad-b: clamp(20px, 4svh, 48px);
  /* Laptop width: the column, or what the height allows (laptop 0.61 × width, fan peeks 0.2 × width above it). */
  --h1l-dw: min(100%, 880px, calc((100svh - var(--topbar-h) - var(--h1l-pad-t) - var(--h1l-pad-b)) / 0.84));

  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.22fr);
  grid-template-areas: "copy media" "deal media";
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(32px, 4.4vw, 80px);
  min-height: calc(100svh - var(--topbar-h));
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--h1l-pad-t) calc(var(--gutter) * 1.25) var(--h1l-pad-b);
  overflow-x: clip;
  background: var(--bg);
}
/* The hero is the first sheet: full bleed, and the Stacking sheet's rounded top overlaps its bottom by --sb-r. */
.sb-slot > .h1l { max-width: none; padding-inline: max(calc(var(--gutter) * 1.25), calc((100% - 1320px) / 2)); }
#page-home .sb-slot > .h1l {
  min-height: calc(100svh - var(--topbar-h) + var(--sb-r));
  padding-bottom: calc(var(--sb-r) + var(--h1l-pad-b));
}

/* Low, wide light under the laptop. */
.h1l::before {
  content: ""; position: absolute; z-index: -2;
  left: 68%; top: 58%;
  width: min(1300px, 120vw); aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(120, 150, 60, 0.12), rgba(120, 150, 60, 0.03) 60%, transparent);
  pointer-events: none;
}

/* ---------- Copy ---------- */

.h1l-copy { grid-area: copy; align-self: end; position: relative; z-index: 2; }
.h1l-copy > *, .h1l-deal > * { animation: h1l-rise 0.9s var(--h1l-ease) backwards; }
.h1l-copy > :nth-child(2) { animation-delay: 0.06s; }
.h1l-copy > :nth-child(3) { animation-delay: 0.12s; }
.h1l-deal > :nth-child(1) { animation-delay: 0.2s; }
.h1l-deal > :nth-child(2) { animation-delay: 0.3s; }
@keyframes h1l-rise { from { opacity: 0; transform: translateY(12px); } }

/* Brand lockup leading the column: the app icon, then the wordmark (assets/reestack-logo-final.png). */
.h1l-brand {
  display: flex; align-items: center;
  gap: clamp(12px, 1.2vw, 18px);
  line-height: 0;
}
.h1l-brand__icon {
  width: clamp(56px, min(4.8vw, 8svh), 80px); height: auto; flex: none;
  margin-left: -0.08em;                               /* the icon's own transparent margin */
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}
.h1l-brand__mark { width: auto; height: clamp(32px, min(3vw, 5.2svh), 52px); flex: none; }

.h1l-title {
  margin-top: clamp(18px, 3svh, 30px);
  max-width: 13em;
  font-family: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(30px, min(3.6vw, 5.7svh), 58px);
  font-weight: 650;
  letter-spacing: -0.032em;
  line-height: 1.04;
  padding-bottom: 0.06em;
  background: linear-gradient(180deg, #ffffff 30%, #bcc6c1 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.h1l-title__line { display: block; }
@media (min-width: 901px) { .h1l-title { max-width: none; } }

.h1l-sub {
  margin-top: clamp(10px, 1.6svh, 16px);
  max-width: 31em;
  color: var(--muted);
  font-size: clamp(15px, min(1.2vw, 2.2svh), 18px);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- Offer card + friction reducers ---------- */

.h1l-deal {
  grid-area: deal; align-self: start;
  position: relative; z-index: 2;
  margin-top: clamp(18px, 3.2svh, 34px);
  max-width: 460px;
}

/* A plain translucent card (no backdrop-filter): the offer and the button read as one deal. */
.h1l-offer {
  position: relative;
  padding: clamp(16px, 2.4svh, 22px) clamp(18px, 1.8vw, 24px) clamp(14px, 2svh, 18px);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025) 55%),
    var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 24px 60px -20px rgba(0, 0, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.35);
}

.h1l-offer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h1l-offer__label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
/* A small lit dot: "on now". White, not green (green is the button). */
.h1l-offer__label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
/* The one warm note on the screen: system yellow (as the in-app paywall's launch pill), dark text. */
.h1l-offer__pill {
  padding: 6px 13px;
  border-radius: 999px;
  background: #ffd60a; color: #0b0c0c;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  line-height: 1.15;
  box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.14), 0 6px 20px rgba(255, 214, 10, 0.22);
}

.h1l-price {
  display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 2px;
  margin-top: clamp(10px, 1.6svh, 14px);
}
.h1l-price__now {
  font-family: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(34px, min(3vw, 5.4svh), 44px);
  font-weight: 650; letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.h1l-price__was {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  color: var(--muted);
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(241, 244, 242, 0.55);
  font-variant-numeric: tabular-nums;
}
.h1l-price__terms {
  margin-left: auto;
  align-self: center;
  text-align: right;
  color: var(--muted);
  font-size: 12.5px; line-height: 1.3;
}

.h1l-why {
  margin-top: clamp(8px, 1.2svh, 12px);
  padding-top: clamp(8px, 1.2svh, 12px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px; line-height: 1.45;
  text-wrap: pretty;
}

/* The one action on the page: the only accent on the screen. Full width of the offer, so the deal ends on it. */
.h1l-download {
  display: flex; width: 100%;
  gap: 10px;
  min-height: 52px;
  margin-top: clamp(12px, 2svh, 18px);
  font-size: 16.5px; font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 32px rgba(89, 214, 160, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.h1l-download:hover { box-shadow: 0 14px 38px rgba(89, 214, 160, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.h1l-download:active { transform: scale(0.985); }
.h1l-download svg { flex: none; }

.h1l-free {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px; line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}
.h1l-free b { color: var(--text); font-weight: 600; }

.h1l-facts {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin: clamp(12px, 2svh, 18px) 0 0; padding: 0 4px;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px; line-height: 1.3;
}
.h1l-facts li { display: flex; align-items: center; gap: 6px; }
.h1l-facts svg {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.7;
}

.h1l-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Media: laptop + fanned bracket ---------- */

.h1l-media {
  grid-area: media;
  align-self: center; justify-self: center;
  position: relative; z-index: 1;
  width: var(--h1l-dw);
  container-type: inline-size;
}

.h1l-device { position: relative; margin: 20cqi 0 0; z-index: 2;   /* the room above: the fan's peek */
  animation: h1l-device-in 1.1s var(--h1l-ease) 0.12s backwards; }
.h1l-device img { display: block; width: 100%; height: auto; }
.h1l-device::after {
  content: ""; position: absolute; z-index: -1;
  left: 5%; right: 5%; bottom: -1.5%; height: 5%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  filter: blur(18px);
}
@keyframes h1l-device-in { from { opacity: 0; transform: translateY(28px) scale(0.98); } }

/* The screen's own light spilling round the laptop. */
.h1l-glow {
  position: absolute; z-index: 0;
  left: 50%; top: 55%;
  width: 150cqi; aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%);
  background: url("../../assets/coccinella-glow.webp") center / cover no-repeat;
  filter: blur(7cqi) saturate(1.05);
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 1.2s ease;
  animation: h1l-fade 1.6s ease-out 0.2s backwards;
}
.h1l[data-sweep="rest"] .h1l-glow { opacity: 0.6; }
@keyframes h1l-fade { from { opacity: 0; } }

/* Six prints fanned above the lid like a hand of cards, pivoting on a point under the laptop. */
.h1l-fan { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.h1l-card {
  --a: calc((var(--i) - 3.5) * 6.4deg);
  --lift: -30cqi;
  position: absolute;
  left: 50%; top: calc(20cqi + 27cqi);               /* the screen's centre, under the fan's room */
  width: 40cqi; aspect-ratio: 3 / 2;
  margin: -13.333cqi 0 0 -20cqi;
  transform-origin: 50% 250%;
  transform: translateY(var(--lift)) rotate(var(--a));
  animation: h1l-card-in 1.2s var(--h1l-ease) calc(0.35s + 0.07s * var(--i)) backwards;
}
.h1l-card:nth-child(1), .h1l-card:nth-child(6) { z-index: 1; }
.h1l-card:nth-child(2), .h1l-card:nth-child(5) { z-index: 2; }
.h1l-card:nth-child(3), .h1l-card:nth-child(4) { z-index: 3; }
@keyframes h1l-card-in { from { opacity: 0; transform: translateY(0) rotate(0deg); } }

.h1l-card__in {
  position: relative; width: 100%; height: 100%;
  border-radius: 1.2cqi;
  overflow: hidden;
  background: #0c1512;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 -6px 26px rgba(0, 0, 0, 0.55);
  filter: brightness(0.94);
  transition: filter 0.7s ease, transform 0.7s var(--h1l-ease), box-shadow 0.7s ease;
}
/* A closer crop, the ladybird raised into the part of the print that shows above the lid. */
.h1l-card__in img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.55); transform-origin: 50% 88%; }
.h1l-card__in span {
  position: absolute; top: 1.4cqi; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: color 0.7s ease;
}

/* Focus sweep: the bracket softens and one frame at a time rises and comes sharp. */
.h1l[data-sweep="on"] .h1l-card__in { filter: brightness(0.7) blur(1.2px); }
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in {
  transform: translateY(-9%);
  filter: brightness(1.1) blur(0px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.36), 0 -8px 30px rgba(0, 0, 0, 0.6);
}
.h1l[data-sweep="on"] .h1l-card__in span { color: rgba(255, 255, 255, 0.45); }
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in span { color: #fff; }

/* ---------- Narrower desktops ---------- */

@media (max-width: 1180px) and (min-width: 901px) {
  .h1l { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
}

/* ---------- Tablets and phones: headline, laptop, offer ---------- */

@media (max-width: 900px) {
  .h1l {
    --h1l-dw: min(100%, 640px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "media" "deal";
    align-content: start;
    justify-items: center;
    text-align: center;
    padding-top: clamp(20px, 3.2svh, 40px);
    padding-inline: var(--gutter);
  }
  .sb-slot > .h1l { padding-inline: var(--gutter); }
  #page-home .sb-slot > .h1l { min-height: 0; }
  .h1l::before { left: 50%; top: 46%; }
  .h1l-copy { align-self: auto; display: grid; justify-items: center; }
  .h1l-title { max-width: 14em; font-size: clamp(29px, 7.4vw, 50px); }
  .h1l-sub { max-width: 30em; }
  .h1l-media { margin-top: clamp(14px, 3svh, 32px); }
  .h1l-deal { width: 100%; max-width: 460px; margin-top: clamp(18px, 3svh, 32px); }
  .h1l-offer { text-align: left; }
  .h1l-facts { justify-content: center; }
}

@media (max-width: 520px) {
  .h1l-brand__icon { width: 48px; }
  .h1l-brand__mark { height: 28px; }
  .h1l-title { margin-top: 12px; }
  .h1l-sub { font-size: 15px; }
  .h1l-device { margin-top: 19cqi; }
  .h1l-card { --lift: -29cqi; width: 44cqi; margin: -14.667cqi 0 0 -22cqi; top: calc(19cqi + 27cqi); }
  .h1l-sub__more { display: none; }
  .h1l-offer { padding: 14px 16px 14px; border-radius: 20px; }
  .h1l-why { font-size: 13.5px; }
  .h1l-download { font-size: 16px; }
  .h1l-facts { gap: 6px 12px; }
}

/* ---------- Reduced motion: still fan, no sweep, no entrances ---------- */

@media (prefers-reduced-motion: reduce) {
  .h1l-copy > *, .h1l-deal > *, .h1l-device, .h1l-card, .h1l-glow { animation: none; }
  .h1l-card__in, .h1l-glow, .h1l-card__in span, .h1l-download { transition: none; }
}
