/* hero: the app's lock screen. Brand blue, the bust inside its 96 rays (BrandScreen.swift draws them 1.7 times the bust's
 * height with a soft edge; the page has room, so they reach 2.2 times), and a real screen rising from the fold. */
#hero { --bust: clamp(18rem, min(46svh, 30vw), 25rem); --rays: calc(var(--bust) * 2.2); display: grid; min-height: min(100svh, 64rem);
  overflow: clip; position: relative; isolation: isolate; margin-top: calc(-1 * var(--top-h)); padding-top: calc(var(--top-h) + var(--space-6));
  /* the pane's lower edge: a lit rim over a band of thickness */
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.35), inset 0 -28px 32px -24px var(--glass-shade); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr);
  grid-template-areas: "copy art"; column-gap: var(--space-6); align-items: center; }

.hero-copy { grid-area: copy; display: grid; gap: var(--space-5); padding-bottom: var(--space-8); }
#hero h1 { font-size: var(--text-display); font-weight: 500; line-height: 0.92; letter-spacing: -0.01em; }
#hero .lede { color: var(--white); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); margin-top: var(--space-2); }
.hero-link { font: 400 var(--text-lg) / 1 var(--font-display); letter-spacing: 0.02em; padding-block: var(--space-2); }
.hero-note { font-size: var(--text-sm); max-width: 30em; }

/* The mark takes the bust's room in the layout; the rays spill past it and fade, so they never set the layout. */
.hero-mark { grid-area: art; justify-self: start; margin-inline-start: 6%; position: relative; display: grid; place-items: center; height: calc(var(--bust) * 1.15);
  padding-bottom: var(--space-8); box-sizing: content-box; }
.hero-bust { position: relative; height: var(--bust); width: auto; max-width: none; }
.hero-rays { position: absolute; left: 50%; top: calc(50% - var(--space-8) / 2); translate: -50% -50%;
  width: var(--rays); height: var(--rays); max-width: none;
  /* The app's soft edge, plus two cuts the page needs: no line behind the copy, none clipped hard under the header. */
  --clear-left: 27%; --clear-top: 6%;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 92%),
    linear-gradient(to right, transparent var(--clear-left), #000 calc(var(--clear-left) + 13%)),
    linear-gradient(to bottom, transparent var(--clear-top), #000 calc(var(--clear-top) + 16%));
  -webkit-mask-composite: source-in, source-in;
  mask-image: radial-gradient(closest-side, #000 30%, transparent 92%),
    linear-gradient(to right, transparent var(--clear-left), #000 calc(var(--clear-left) + 13%)),
    linear-gradient(to bottom, transparent var(--clear-top), #000 calc(var(--clear-top) + 16%));
  mask-composite: intersect; }

/* The phone: secondary to the bust. A true-scale iPhone 16 Pro Max outline (screen 93.6 % of the body's width, 62 pt
 * screen corners, the Dynamic Island) drawn in CSS around a real screen, rising from the hero's lower edge in front of
 * the rays. The screenshot is cut after the fourth full row of tiles, at the hero's edge. Sizes are fractions of the body width. */
.hero-shot { grid-area: art; justify-self: end; align-self: end; margin: 0; position: relative; z-index: 1;
  --phone-w: clamp(13rem, 18vw, 16.5rem); width: var(--phone-w); }
/* The body is a glass layer: the rays and the light show through its rim, blurred. */
.hero-phone { position: relative; padding: calc(var(--phone-w) * 0.032) calc(var(--phone-w) * 0.032) 0;
  border-radius: calc(var(--phone-w) * 0.164) calc(var(--phone-w) * 0.164) 0 0; background: rgb(255 255 255 / 0.12); }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { .hero-phone { background: var(--navy); } }
#hero .hero-phone img { width: 100%; border-radius: calc(var(--phone-w) * 0.132) calc(var(--phone-w) * 0.132) 0 0;
  background: var(--deep); color: var(--on-deep-2); font-size: var(--text-sm); }
.phone-island { position: absolute; left: 50%; top: calc(var(--phone-w) * 0.054); translate: -50% 0;
  width: calc(var(--phone-w) * 0.268); height: calc(var(--phone-w) * 0.079); border-radius: var(--radius-pill); background: var(--navy); }

@media (max-width: 1000px) {
  #hero { --bust: clamp(11rem, 44vw, 17rem); --rays: calc(var(--bust) * 2.4); min-height: 0; padding-top: calc(var(--top-h) + var(--space-4)); }
  /* one column: the light comes through behind the bust at the top, not behind the copy */
  #hero { background-image: radial-gradient(ellipse 64% 20% at 50% 19%, var(--glass-light), transparent 72%),
    radial-gradient(ellipse 110% 90% at 50% 25%, transparent 55%, var(--glass-shade) 100%),
    linear-gradient(180deg, var(--blue) 0%, var(--glass-mid) 50%, var(--glass-deep) 100%); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mark" "copy" "shot"; }
  .hero-mark { grid-area: mark; justify-self: stretch; margin-inline-start: 0; }
  .hero-mark { padding-bottom: 0; height: calc(var(--bust) * 1.25); }
  .hero-rays { top: 50%; --clear-left: -20%; --clear-top: 12%; }
  .hero-copy { padding-bottom: 0; }
  .hero-shot { grid-area: shot; justify-self: center; --phone-w: min(75vw, 22rem); margin-top: var(--space-8); }
}
@media (max-width: 560px) {
  #hero .lede { font-size: var(--text-base); }
}

/* Before the intro (js/motion.js) the moving parts wait unseen, only when scripts run and motion is allowed. The header and
 * "Coming soon" are never hidden. */
@media (prefers-reduced-motion: no-preference) {
  .js #hero h1, .js .hero-rays, .js .hero-bust, .js .hero-copy .lede, .js .hero-link, .js .hero-note, .js .hero-shot { opacity: 0; }
}
