/* Home · Hero "Close-up" (stacking/hero.html). Ported from variants/hero-studio-2/device, variant 3.
   The hero is the first sheet (css/sep-b.css): one screen tall under the top bar, plus the corner radius the
   Stacking sheet overlaps it by. The laptop's lid right edge (91.5% of the render's width) is pinned 32px inside
   the page, so only the chassis is cropped; the turn pivots on that edge. No live blur: the screen's light is a
   baked image (assets/hero-closeup/spill.webp). Green only on the button, yellow only on the pill. */

.cu {
  --cu-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --cu-display: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --cu-text: -apple-system, BlinkMacSystemFont, "SF Pro", "Helvetica Neue", Arial, sans-serif;
  --cu-r: var(--sb-r, 0px);                                   /* covered by the next sheet's rounded top */
  --cu-hh: max(calc(100svh - var(--topbar-h)), 560px);         /* the visible hero */
  --cu-ratio: 1.6377;                                         /* frog-macbook.webp 2378 × 1452 */
  --cu-gap: clamp(56px, 9svh, 112px);                         /* air between the hero and the Stacking sheet */

  position: relative;
  isolation: isolate;
  overflow: clip;
  height: calc(var(--cu-hh) + var(--cu-r));
  padding-bottom: calc(var(--cu-r) + var(--cu-gap));
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  column-gap: clamp(28px, 3.6vw, 64px);
  padding-inline: max(var(--gutter), calc((100vw - 1400px) / 2));
  background: var(--bg);                                      /* the page's own black, as under the top bar */
}

.cu-light { position: absolute; pointer-events: none; z-index: -1; }
.cu-light--wash {            /* the screen's light falling across the dark onto the copy */
  inset: 0;
  background:
    radial-gradient(55% 60% at 46% 52%, rgba(95, 165, 125, 0.13), transparent 70%),
    radial-gradient(30% 30% at 40% 70%, rgba(200, 140, 60, 0.05), transparent 70%);
}

/* ---------- Copy ---------- */
.cu-copy { position: relative; z-index: 2; grid-column: 1; grid-row: 1; }
.cu-brand { display: flex; align-items: center; gap: 14px; line-height: 0; }
.cu-brand img { display: block; }
.cu-brand__icon {
  width: clamp(48px, 6.4svh, 64px); height: auto; flex: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
}
.cu-brand__mark { width: auto; height: clamp(22px, 3svh, 30px); }
.cu-title {
  margin: clamp(20px, 4svh, 40px) 0 0;
  font-family: var(--cu-display);
  font-size: clamp(48px, min(5vw, 9.4svh), 88px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 0.94;
  color: var(--text);
  white-space: nowrap;
}
.cu-title__sub {
  display: block; margin-top: clamp(10px, 1.6svh, 16px);
  font-size: 0.4em; letter-spacing: -0.02em; line-height: 1.1; font-weight: 600;
  color: var(--muted);
}

/* ---------- The launch card (no price) ---------- */
.cu-deal { width: 100%; max-width: 420px; margin-top: clamp(28px, 5.5svh, 52px); font-family: var(--cu-text); }
.cu-card {
  position: relative;
  padding: clamp(20px, 2.8svh, 26px) clamp(18px, 1.8vw, 24px) clamp(14px, 2svh, 18px);
  border-radius: 22px;
  background: linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035)), rgba(9, 10, 10, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
.cu-pill {
  position: absolute; top: 0; right: 22px; transform: translateY(-50%) rotate(-4deg);
  padding: 6px 13px; border-radius: 999px;
  background: #ffd60a; color: #0b0c0c;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap;
  box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.14), 0 6px 20px rgba(255, 214, 10, 0.22);
}
.cu-terms { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; margin: 4px 0 0; }
.cu-terms b {
  font-family: var(--cu-display);
  font-size: clamp(32px, min(2.8vw, 5svh), 40px); font-weight: 650; letter-spacing: -0.03em; line-height: 1; color: var(--text);
}
.cu-terms span { color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); font-weight: 500; }
.cu-dl {
  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);
}
.cu-dl svg { flex: none; }
.cu-dl span { white-space: nowrap; }
.cu-below { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; text-align: center; }
.cu-below b { color: var(--text); font-weight: 600; }

/* ---------- The laptop ---------- */
.cu-device {
  --w: clamp(760px, min(70vw, (var(--cu-hh) - var(--cu-gap) + 2svh) * var(--cu-ratio)), 1240px);
  position: absolute; z-index: 1;
  width: var(--w);
  right: calc(32px - 0.085 * var(--w));
  bottom: calc(var(--cu-r) + var(--cu-gap) - 0.03 * var(--w));
  perspective: 2400px; perspective-origin: 91.5% 50%;
}
.cu-tilt { position: relative; transform-origin: 91.5% 50%; transform: rotateY(-14deg); }
.cu-mac { display: block; width: 100%; height: auto; }
.cu-light--spill {
  left: 40%; top: 46%; width: 150%; aspect-ratio: 640 / 440;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

/* ---------- Entrance: once, with JS and motion (js/hero.js adds .is-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js-cu .cu [data-cu-in] { transition: opacity 1.4s var(--cu-ease), transform 1.8s var(--cu-ease); }
  .js-cu .cu:not(.is-in) [data-cu-in="fade"] { opacity: 0; }
  .js-cu .cu:not(.is-in) [data-cu-in="up"] { opacity: 0; transform: translateY(14px); }
  .js-cu .cu [data-cu-in="up"] { transition-delay: 0.15s; }
  .js-cu .cu .cu-tilt { transition: transform 2.4s var(--cu-ease); }
  .js-cu .cu:not(.is-in) .cu-tilt { transform: rotateY(-22deg) translateX(2%); }
}

/* ---------- Phones and narrow tablets: laptop, then copy ---------- */
@media (max-width: 860px) {
  .cu {
    height: auto; min-height: 0;
    display: flex; flex-direction: column; align-items: stretch;
    padding: 0 16px calc(var(--cu-r) + 40px);
  }
  .cu-device { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 28px; }
  .cu-tilt { transform: rotateY(-10deg); }
  .cu-copy { order: 1; margin-top: 20px; }
  .cu-title { margin-top: 16px; font-size: clamp(32px, 11vw, 60px); }
  .cu-deal { max-width: 480px; margin-top: 28px; }
  .cu-card { padding: 22px 16px 14px; border-radius: 20px; }
  .cu-dl { font-size: 16px; }
}
