/* The hero, from the approved hero.html.
   Layout idea: the words live in their own row at the bottom and the bat owns everything
   above them. When a card is about to pop up, the bat first shrinks into the middle column,
   the card shows in a side column, then the bat grows back. A card is only ever visible
   while the bat is fully inside the middle column, so nothing sits on top of anything.
   Everything is scoped to #hero so the rest of the page keeps its own styles. */

#bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hero {
  --ink: #010206;        /* page background, matches the shader's dark */
  --paper: #eef0f7;      /* main text */
  --mute: #9aa1b8;       /* secondary text */
  --cobalt: #6f8dff;     /* accent and focus ring */
  --cherry: #ff2d55;     /* the one warm accent */
  --line: #232838;       /* card borders */
  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  position: relative;
  height: 420vh;
  color: var(--paper);
  font-family: var(--body);
}

/* Top padding clears the site's 72px navigation bar (hero.html had a 64px pad under a smaller brand). */
#hero .pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 80px clamp(16px, 5vw, 56px) clamp(24px, 5vh, 56px); gap: clamp(8px, 2vh, 24px); }

/* three columns: card | bat | card */
#hero .stage { display: grid; grid-template-columns: minmax(0, 1fr) min(52vw, 720px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: clamp(12px, 2.5vw, 40px); min-height: 0; }
#slot { width: 100%; height: 100%; min-height: 0; justify-self: center; display: grid; place-items: center; }
#hero .col { position: relative; min-height: 0; display: grid; align-items: center; }
#hero .col.left { justify-items: end; }
#hero .col.right { justify-items: start; }
#hero .card { grid-area: 1 / 1; width: min(300px, 100%); background: rgba(10, 12, 20, .92); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; opacity: 0; visibility: hidden; will-change: opacity, transform; }
#hero .card .line { font: 600 15px/1.35 var(--body); }
#hero .card p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--mute); }
#hero .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
#hero .dot-open { background: #3fb950; }
#hero .dot-warn { background: #d29922; }
#hero .dot-next { background: var(--cobalt); }

#hero .copy { text-align: center; justify-self: center; max-width: 820px; }
#hero h1 { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 4vw, 54px); line-height: 1.06; margin: 0; text-wrap: balance; }
#hero h1 em { color: #b9c4ff; }
#hero .copy p { margin: 12px auto 0; max-width: 56ch; color: var(--mute); font-size: clamp(14px, 1.3vw, 17px); line-height: 1.5; }
#hero .cta { display: inline-block; margin-top: 18px; font: 700 15px/1 var(--body); color: var(--ink); background: linear-gradient(180deg, #ffffff, #c9cfde); border-radius: 12px; padding: 15px 22px; text-decoration: none; }
#hero .cta:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
/* The smaller second way in, for Chrome: the zip on GitHub. */
#hero .copy .alt-get { margin: 12px auto 0; font-size: 14px; line-height: 1.4; }
#hero .alt-get a { color: var(--mute); text-decoration-color: rgba(154, 161, 184, .5); text-underline-offset: 3px; }
#hero .alt-get a:hover { color: var(--paper); }
#hero .alt-get a:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }

/* phone: bat on top, one card slot under it, words at the bottom */
@media (max-width: 860px) {
  /* The card row grows to fit the tallest card (the real issue line wraps to three lines on small phones). */
  #hero .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(132px, auto); }
  #slot { grid-row: 1; grid-column: 1; }
  #hero .col { grid-row: 2; grid-column: 1; min-height: 132px; }
  #hero .col.left, #hero .col.right { justify-items: center; }
}

#fallback { display: none; width: 100%; max-height: 100%; }
