/* ---------------------------------------------------------------------------
   Batsky — batsky.ai

   Values (colours, sizes, spacing, radii) are lifted from the design mockup at
   design/Main-html/Main.dc.html, which is authored against a fixed 1440px
   artboard. Where the mockup gives one fixed number, this sheet expresses it as
   a clamp() between a phone-sized and the artboard value so the page holds its
   proportions at every width.
   --------------------------------------------------------------------------- */

/* --------------------------------------------------------------- fonts --
   Self-hosted subsets of Chakra Petch / Space Grotesk / JetBrains Mono
   (latin, latin-ext), generated by tools/fetch-fonts.sh. Served from our own
   origin so there is no third-party DNS + TLS handshake in front of first
   paint.

   These live here rather than in their own stylesheet on purpose. As a
   separate file the browser could not discover the woff2 URLs until that
   file had itself been fetched and parsed — HTML -> fonts.css -> woff2, a
   three-hop critical path. Inlined here, plus the <link rel=preload> tags in
   the document head, the fonts start downloading alongside this stylesheet.
   ----------------------------------------------------------------------- */

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/chakra-petch-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/chakra-petch-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:        oklch(0.13 0.012 250);
  --bg-deep:   oklch(0.10 0.010 250);
  --fg:        oklch(0.93 0.004 250);
  --fg-muted:  oklch(0.66 0.012 250);
  --accent:    #5ad1ff;
  --accent-ink: oklch(0.12 0.01 250);
  --rule:      oklch(1 0 0 / 0.10);

  --font-display: 'Chakra Petch', 'Arial Narrow', sans-serif;
  --font-body:    'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* The mockup's 120px artboard gutter, floored at 24px on a phone. */
  --gutter: clamp(24px, 8.33vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  padding: 12px 20px;
  transform: translateY(-120%);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 60;
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  width: 100%;
  /* 1440x810 in the mockup: a 16:9 band. Capped so the fold still shows the
     headline on a short laptop screen, floored so it stays cinematic on mobile. */
  height: clamp(320px, 56.25vw, 810px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 62% 62% at 78% 18%, oklch(0.32 0.06 60 / 0.35), transparent 60%),
    radial-gradient(ellipse 70% 86% at 50% 100%, oklch(0.24 0.04 220 / 0.40), transparent 65%),
    linear-gradient(180deg, var(--bg-deep) 0%, oklch(0.14 0.012 250) 100%);
  isolation: isolate;
}

/* Poster and video are stacked in the same cell and cross-faded. Both are
   object-fit:cover so the 16:9 source fills whatever band the hero resolves to. */
.hero__poster img,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__video {
  opacity: 0;
  transition: opacity 900ms ease;
  z-index: 1;
}
.hero__video.is-visible { opacity: 1; }

/* Vignette + bottom fade, so the status line stays legible over any
   frame of the footage and the hero dissolves into the section below it. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, oklch(0.08 0.01 250 / 0.55) 0%, transparent 28%,
                                      transparent 62%, oklch(0.13 0.012 250 / 0.95) 100%);
  box-shadow: inset 0 0 220px 60px oklch(0.08 0.01 250 / 0.9);
}

.hero__scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(
    0deg,
    oklch(1 0 0 / 0.025) 0px, oklch(1 0 0 / 0.025) 1px,
    transparent 1px, transparent 3px);
}

/* Buffering indicator, bottom-right of the hero. Marked
   aria-hidden in the markup: it reports on purely decorative footage, so
   announcing its load state to a screen reader would be noise. */
.hero__status {
  position: absolute;
  bottom: clamp(20px, 2.8vw, 40px);
  right: var(--gutter);
  z-index: 4;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.8vw, 12px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: opacity 600ms ease;
}
.hero__status[hidden] { display: none; }
.hero__status.is-done { opacity: 0; }

.hero__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.hero__status.is-done .hero__status-dot { animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(0.7); }
}

/* ----------------------------------------------------------------- intro -- */

/* A grid rather than a column of flex items so the bat mark can occupy the
   headline's own row and align to its top edge. Every child is placed
   explicitly — with one item positioned by hand, auto-placement would shuffle
   the rest. Selectors are scoped to .intro because .eyebrow and .cta are also
   used inside .prose on the text pages. */
.intro {
  position: relative;
  padding: clamp(56px, 6.7vw, 96px) var(--gutter) clamp(64px, 7.2vw, 104px);
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: clamp(18px, 1.95vw, 28px);
  justify-items: start;
}

.intro > .eyebrow  { grid-area: 1 / 1; }
.intro > .headline { grid-area: 2 / 1; }
.intro > .lede     { grid-area: 3 / 1; }
.intro > .cta      { grid-area: 4 / 1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent);
  flex: none;
}

/* Slower and shallower than the `pulse` the hero and consent dots use, and on
   opacity alone rather than scale — it should read as a standby light, not as
   something demanding attention. Opacity carries the glow with it. The dots on
   the text pages stay static. */
.intro .eyebrow__dot {
  animation: blink-calm 2.8s ease-in-out infinite;
}

@keyframes blink-calm {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.28; }
}

.headline {
  margin: 0;
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.72vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.lede {
  margin: 0;
  max-width: 620px;
  font-size: clamp(16px, 1.32vw, 19px);
  line-height: 1.55;
  color: var(--fg-muted);
}

.cta {
  margin-top: clamp(4px, 0.83vw, 12px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.97vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  transition: background 150ms ease, color 150ms ease;
}
.cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

/* Shares row 2 with the headline and hangs from the same top edge, so the mark
   reads as set against the first line of type rather than floating mid-block. */
.intro__mark {
  grid-area: 2 / 2;
  align-self: start;
  justify-self: end;
  width: clamp(96px, 10vw, 150px);
  height: auto;
  opacity: 0.92;
}

/* Narrow screens have no room beside the headline, so the mark is dropped here
   and .footer__mark takes over at the foot of the page instead. */
@media (max-width: 760px) {
  .intro {
    grid-template-columns: 1fr;
  }
  .intro__mark {
    display: none;
  }
}

/* --------------------------------------------------------------- contact -- */

.contact {
  padding: clamp(40px, 4.5vw, 64px) var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px clamp(20px, 3vw, 44px);
}

.contact__label {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Same size as .contact__label beside it, so the strip reads as a label and
   its value on one baseline rather than a heading over a headline. */
.contact__body {
  margin: 0;
  font-size: clamp(11px, 0.9vw, 13px);
}

/* ---------------------------------------------------------------- footer -- */

.footer {
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.footer p { margin: 0; }

/* Mobile-only stand-in for .intro__mark. .footer__note already takes a whole
   row below 900px, so this wraps onto a row of its own; the auto side margins
   then centre it against the footer's space-between. */
.footer__mark { display: none; }

@media (max-width: 760px) {
  .footer__mark {
    display: block;
    order: 2;
    width: 104px;
    height: auto;
    margin: 6px auto 0;
    opacity: 0.92;
  }
}
.footer a { color: var(--fg-muted); }
.footer a:hover { color: var(--accent); }

/* The rest of the footer is short uppercase labels, which the 0.14em tracking
   suits. This one is a sentence, and at 12px that treatment makes it a chore to
   read — so it keeps the mono face and drops the caps. */
.footer__note {
  text-transform: none;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Three items only sit left/centre/right while they fit on one line. Once the
   footer wraps, space-between would strand the note oddly; give it its own row. */
@media (max-width: 900px) {
  .footer__note {
    flex: 1 0 100%;
    order: 1;
    text-align: left;
  }
}

/* --------------------------------------------------------------- consent -- */

.consent {
  position: fixed;
  left: clamp(16px, 2vw, 32px);
  bottom: clamp(16px, 2vw, 32px);
  z-index: 50;
  width: min(380px, calc(100vw - 32px));
  padding: 22px 24px 20px;
  background: oklch(0.16 0.014 250 / 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  box-shadow: 0 24px 60px oklch(0.05 0.01 250 / 0.6);
  /* Enters a beat after first paint: the movement is what catches the eye while
     the hero video is still buffering. */
  animation: consent-in 620ms cubic-bezier(0.16, 1, 0.3, 1) 450ms both;
}
.consent[hidden] { display: none; }

@keyframes consent-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.consent__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.consent__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
  flex: none;
}

.consent__body {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.consent__btn {
  flex: 1 1 auto;
  padding: 12px 18px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.consent__btn:hover { border-color: var(--accent); }

.consent__btn--primary { border-color: var(--accent); }
.consent__btn--primary:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
