/* ==========================================================
   hero-anim.css · the pinned hero animation
   The stage is a 1280 x 800 frame scaled to the viewport by
   hero-anim.js. On wide screens the copy shares that frame; on
   phones it sits on top in normal sizes and the device fits below.
   ========================================================== */

.ha { position: relative; z-index: 2; height: 760vh; height: 760svh; }
.ha-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: #F3F1FF; color: var(--ha-ink, #0F0F10);
  --ha-violet: #6A4CF0;
}
.ha-stage { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; pointer-events: none; }
.ha-dev { position: absolute; inset: 0; transform-origin: 640px 444px; }

.ha-copy {
  position: absolute; left: var(--ox, 0); top: var(--oy, 0);
  width: 1280px; height: 800px; transform: scale(var(--s, 1)); transform-origin: 0 0;
  pointer-events: none;
}
.ha-b { position: absolute; margin: 0; display: flex; flex-direction: column; }
.ha-b h1, .ha-b h2, .ha-b p { margin: 0; }
.ha-w { display: inline-block; }
.ha-slot { display: grid; }
.ha-slot > * { grid-area: 1 / 1; }

/* hero */
.ha-hero { left: 56px; top: 140px; width: 640px; gap: 26px; }
.ha-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: 76px; line-height: 0.92; letter-spacing: -0.045em; max-width: none; }
.ha-lead { font-size: 20px; line-height: 1.45; max-width: 30em; color: var(--ha-lead, #3E3C52); }
.ha-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; pointer-events: auto; }
.ha-btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 30px; border-radius: 999px;
  font-size: 19px; font-weight: 700; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease;
}
.ha-btn-p { background: var(--ha-violet); color: #FFFFFF; }
.ha-btn-p:hover { background: #5A3CE0; }
.ha-btn-s { color: #0F0F10; border: 2px solid #0F0F10; padding: 0 26px; }
.ha-btn-s:hover { background: rgba(15, 15, 16, 0.06); }
.ha-btn:focus-visible { outline: 2px solid #0F0F10; outline-offset: 3px; }
.ha-scroll { font-size: 15px; font-weight: 600; color: #55536A; }

/* the clock and the evening lines */
.ha-clockb { left: 56px; top: 130px; width: 620px; gap: 18px; }
.ha-clock { font-family: var(--font-display); font-weight: 800; font-size: 150px; line-height: 0.85; letter-spacing: -0.05em; color: var(--ha-clock); font-variant-numeric: tabular-nums; }
.ha-clockb h2 { font-family: var(--font-display); font-weight: 800; font-size: 60px; line-height: 0.95; letter-spacing: -0.04em; max-width: 9.5em; }
.ha-clockb p:not(.ha-clock) { font-size: 20px; line-height: 1.45; max-width: 26em; color: var(--ha-lead); }

/* the turn */
.ha-side { left: 56px; top: 150px; width: 470px; gap: 18px; }
.ha-side h2 { font-family: var(--font-display); font-weight: 800; font-size: 62px; line-height: 0.95; letter-spacing: -0.04em; }
.ha-side p { font-size: 20px; line-height: 1.45; color: var(--ha-lead); }

/* the lines over the laptop */
.ha-top { left: 0; right: 0; top: 96px; text-align: center; }
.ha-top p { font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -0.04em; }

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

/* phones and narrow windows: copy on top, the device fitted underneath */
.ha.is-portrait .ha-copy {
  left: var(--frame); right: var(--frame); top: calc(var(--bar-h) + 16px);
  width: auto; height: auto; transform: none;
}
.ha.is-portrait .ha-b { left: 0; right: 0; top: 0; width: auto; }
.ha.is-portrait .ha-hero { gap: 14px; }
.ha.is-portrait .ha-hero h1 { font-size: clamp(34px, 9.4vw, 52px); line-height: 0.95; }
.ha.is-portrait .ha-lead { font-size: 16px; line-height: 1.45; }
.ha.is-portrait .ha-btn { min-height: 48px; padding: 0 20px; font-size: 16px; }
.ha.is-portrait .ha-btn-s { padding: 0 18px; }
.ha.is-portrait .ha-scroll { display: none; }
.ha.is-portrait .ha-clockb { gap: 10px; }
.ha.is-portrait .ha-clock { font-size: clamp(64px, 19vw, 110px); }
.ha.is-portrait .ha-clockb h2, .ha.is-portrait .ha-side h2 { font-size: clamp(30px, 8vw, 46px); }
.ha.is-portrait .ha-clockb p:not(.ha-clock), .ha.is-portrait .ha-side p { font-size: 16px; }
.ha.is-portrait .ha-side { gap: 10px; }
.ha.is-portrait .ha-top p { font-size: clamp(28px, 7.4vw, 44px); line-height: 1.05; }
@media (max-height: 700px) { .ha.is-portrait .ha-lead { display: none; } }

/* reduced motion: fewer, still states (hero-anim.js steps between them) */
@media (prefers-reduced-motion: reduce) { .ha { height: 500vh; height: 500svh; } }

/* no scripts: the copy reads as a normal page, without the drawing */
html:not(.js) .ha { height: auto; }
html:not(.js) .ha-pin { position: relative; height: auto; background: #F3F1FF; padding: calc(var(--bar-h) + 32px) var(--frame) 64px; }
html:not(.js) .ha-stage, html:not(.js) .ha-clock, html:not(.js) .ha-scroll { display: none; }
html:not(.js) .ha-copy { position: static; width: auto; height: auto; transform: none; display: grid; gap: 40px; max-width: 760px; }
html:not(.js) .ha-b { position: static; width: auto; }
html:not(.js) .ha-slot { display: flex; flex-direction: column; gap: 16px; }
html:not(.js) .ha-hero h1 { font-size: clamp(40px, 7vw, 72px); }
html:not(.js) .ha-b h2, html:not(.js) .ha-top p { font-size: clamp(28px, 5vw, 48px); }
