/*
 * Board of Innovation — AI
 * ────────────────────────
 * One stylesheet, no build step. Everything below is plain CSS.
 *
 * The token block in `:root` is the brand contract, reverse-engineered from the
 * live boardofinnovation.com stylesheet (Elementor kit tokens + the site's own
 * custom CSS). Change a colour or a size THERE, not at the call site — a
 * hard-coded hex further down this file is a brand bug.
 *
 * Note for anyone cross-checking against the internal `boi-brand` skill: that
 * skill is a Tailwind-era snapshot and is behind the live site in three places.
 * This file follows the live site, because this page is public and sits next to
 * boardofinnovation.com in a visitor's head. See CLAUDE.md for the deltas.
 */

/* ══════════════════════════════════════════════════════════════════════════
   1. Tokens
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Palette ──────────────────────────────────────────────────────────── */
  --blue: #0a0ae5; /* Electric Blue — the signature accent */
  --blue-deep: #0e0e98; /* darker blue, pressed/hover states */
  --blue-pale: #cddaff; /* headline highlight, copy on dark */
  --blue-band-top: #2222ff; /* top stop of the stepped gradient band */

  --ink: #0d1314; /* near-black — dark section backgrounds */
  --navy: #09095e; /* deep navy — the alternative dark */
  --text: #11262b; /* body text. Never #000. */
  --text-2: #5c6769; /* secondary text on light */
  --text-3: #706d6d; /* muted meta text */

  --off-white: #f9f7f7; /* page background. Never pure white. */
  --surface-2: #f2f1f1; /* secondary light surface */
  --line: #e3e3e3; /* dividers, card borders */
  --line-strong: #d2d1d1; /* tag outlines */
  --white: #ffffff;

  /* ── Semantic aliases — prefer these below ────────────────────────────── */
  --bg: var(--off-white);
  --surface: var(--white);
  --ink-on-dark: var(--off-white);
  --accent: var(--blue);

  /* ── Type ─────────────────────────────────────────────────────────────── */
  /* DM Sans carries the whole system. DM Serif Display is for pull-quotes only. */
  --f-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'DM Serif Display', ui-serif, Georgia, serif;

  /*
   * Headlines are large, WEIGHT 400, and tightly tracked with leading below 1 —
   * that combination is the most recognisable thing about BOI's type. The live
   * hero runs 5.5rem/5rem at -2.2px; scaled down a little here so a landing
   * page with real copy in it still breathes.
   */
  --t-display: clamp(2.5rem, 1.3rem + 4.8vw, 4.5rem);
  --t-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
  --t-h2: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);
  --t-h3: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --t-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --t-small: 0.875rem;
  --t-micro: 0.8rem;

  --track-display: -0.035em;
  --track-heading: -0.02em;

  /* ── Space ────────────────────────────────────────────────────────────── */
  --max: 1280px;
  --gutter: clamp(1.5rem, 1rem + 2vw, 2rem);
  --section-y: clamp(4rem, 2.5rem + 6vw, 6rem);
  --gap: clamp(1.5rem, 1.2rem + 1vw, 2rem);

  /* ── Radii ────────────────────────────────────────────────────────────── */
  /* 4px is the house radius on boardofinnovation.com; 2px on tags. The brand
     is sharp and flat — nothing here is a pill, and nothing casts a shadow. */
  --r: 4px;
  --r-tag: 2px;

  /* ── Motion ───────────────────────────────────────────────────────────── */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.5s;
  --dur-fast: 0.3s;
}

/* ══════════════════════════════════════════════════════════════════════════
   2. Base
   ══════════════════════════════════════════════════════════════════════════ */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

/* Brand rule: display, h1 and h2 stay at weight 400. Only h3 is bold. */
h1,
h2 {
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: var(--track-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--t-h1);
}

h2 {
  font-size: var(--t-h2);
}

h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

img,
video {
  border-radius: var(--r);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One visible focus ring for the whole page. Never remove it. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-tag);
}

.band :focus-visible {
  outline-color: var(--white);
}

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

/* Keyboard users get a skip link; it only appears once focused. */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--white);
  font-size: var(--t-small);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   3. Layout
   ══════════════════════════════════════════════════════════════════════════ */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

/* Full-bleed dark section. Brand: dark means Electric Blue, near-black ink or
   deep navy — never plain black. */
.band {
  background: var(--accent);
  color: var(--ink-on-dark);
}

.band--ink {
  background: var(--ink);
}

.band--navy {
  background: var(--navy);
}

/*
 * The signature BOI motif: a stepped gradient in hard 8% stops, so it reads as
 * a staircase of flat bands rather than a blend. Ramp and stop positions are
 * taken from `.boi-gradient-band-dark` on boardofinnovation.com.
 */
.band--stepped {
  background: linear-gradient(
    to bottom,
    #2222ff 0%,
    #2222ff 8%,
    #1a1aee 8%,
    #1a1aee 16%,
    #1212d6 16%,
    #1212d6 24%,
    #0c0cbf 24%,
    #0c0cbf 32%,
    #0808a8 32%,
    #0808a8 40%,
    #060690 40%,
    #060690 48%,
    #050578 48%,
    #050578 56%,
    #040460 56%,
    #040460 64%,
    #030348 64%,
    #030348 72%,
    #020233 72%,
    #020233 80%,
    #01011f 80%,
    #01011f 88%,
    #0d1314 88%,
    #0d1314 100%
  );
}

.band a {
  color: var(--ink-on-dark);
}

/* Headings carry no bottom margin, so the gap after one lives here. */
.lede {
  margin-top: 1.25rem;
  max-width: 46ch;
  color: var(--text-2);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
}

.band .lede {
  color: var(--blue-pale);
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--text-2);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.band .eyebrow {
  color: var(--blue-pale);
}

/* ══════════════════════════════════════════════════════════════════════════
   4. Nav
   ══════════════════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}

.nav[data-scrolled='true'] {
  border-bottom-color: var(--line);
}

/* A 1px marker script.js prepends to <body>. Watching it cross the viewport
   top is how the nav knows it has been scrolled past — cheaper than a scroll
   listener, which fires on every frame. */
.nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/*
 * The official BOI wordmark, painted with a CSS mask so it inherits the link's
 * colour instead of being locked to the SVG's own off-white fill. The artwork
 * is 512.91 × 175.63, hence the width below for a 26px cap height.
 */
.nav__logo {
  display: block;
  width: 76px;
  height: 26px;
  background: currentColor;
  -webkit-mask: url('/images/boi-wordmark.svg') no-repeat center / contain;
  mask: url('/images/boi-wordmark.svg') no-repeat center / contain;
}

.nav__suffix {
  color: var(--accent);
  font-weight: 700;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  font-size: var(--t-small);
}

.nav__links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 40rem) {
  /* No burger menu: at this size the link list is short enough to just wrap. */
  .nav__inner {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-block: 0.875rem;
  }

  .nav__links {
    gap: 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   5. Hero
   ══════════════════════════════════════════════════════════════════════════ */

.hero {
  padding-block: clamp(3.5rem, 2rem + 7vw, 7rem) var(--section-y);
}

.hero__title {
  max-width: 16ch;
  font-size: var(--t-display);
  line-height: 0.98;
  letter-spacing: var(--track-display);
}

/* The second line of a two-tone headline, as on boardofinnovation.com. */
.hero__title em {
  color: var(--accent);
  font-style: normal;
}

.band .hero__title em {
  color: var(--blue-pale);
}

.hero__lede {
  margin-top: 1.75rem;
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   6. Buttons
   ══════════════════════════════════════════════════════════════════════════ */

/*
 * BOI buttons are 4px-radius rectangles with a 1px border and 12/28 padding,
 * and they INVERT on hover rather than just darkening. Both variants here
 * swap fill and outline, which is the site's own behaviour.
 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--accent);
}

.btn--outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* On a dark band the accent-coloured button would vanish, so invert the pair. */
.band .btn {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}

.band .btn:hover {
  background: transparent;
  color: var(--white);
}

.band .btn--outline {
  border-color: color-mix(in srgb, var(--white) 55%, transparent);
  background: transparent;
  color: var(--white);
}

.band .btn--outline:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}

/* ══════════════════════════════════════════════════════════════════════════
   7. Cards
   ══════════════════════════════════════════════════════════════════════════ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: var(--gap);
  margin-top: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

/* Only cards that are links get the hover affordance. */
a.card {
  transition: border-color var(--dur-fast) var(--ease);
}

a.card:hover {
  border-color: var(--accent);
}

a.card:hover .card__more {
  text-decoration: underline;
}

.card p {
  color: var(--text-2);
  font-size: var(--t-small);
}

.card__more {
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--accent);
  font-size: var(--t-small);
  font-weight: 500;
}

/* A card for an asset that is not shipped yet. */
.card--soon {
  border-style: dashed;
  background: transparent;
}

/* Small outlined meta label — BOI's `.boi-post-type-tag`, not a pill badge. */
.tag {
  align-self: flex-start;
  width: fit-content;
  padding: 0.25rem 0.625rem;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-tag);
  color: var(--accent);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tag--quiet {
  border-color: var(--line-strong);
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════════════════
   8. Prose blocks
   ══════════════════════════════════════════════════════════════════════════ */

.prose {
  max-width: 62ch;
  color: var(--text-2);
}

.prose > * + * {
  margin-top: 1.25rem;
}

.prose h2,
.prose h3 {
  color: var(--text);
}

.prose ul {
  display: grid;
  gap: 0.75rem;
}

.prose li {
  padding-left: 1.25rem;
  position: relative;
}

/* A 2×6 indicator bar, borrowed from the site's filter lists. */
.prose li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 2px;
  height: 8px;
  background: var(--accent);
}

.quote {
  max-width: 32ch;
  font-family: var(--f-serif);
  font-size: clamp(1.125rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.4;
}

/* A 16:9 slot for the walkthrough video, sized before anything loads so the
   page never reflows when the embed arrives. */
.media {
  aspect-ratio: 16 / 9;
  width: 100%;
  /* Capped: at the full 1280px container a 16:9 box is 720px tall, which
     pushes everything after it off the screen. */
  max-width: 60rem;
  border-radius: var(--r);
  background: var(--surface-2);
  overflow: hidden;
}

.media iframe,
.media video {
  width: 100%;
  height: 100%;
  border: 0;
}

.media--empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: var(--t-small);
}

/* ══════════════════════════════════════════════════════════════════════════
   9. Utilities
   ══════════════════════════════════════════════════════════════════════════ */

/*
 * The only two utility classes in this file. They exist so the HTML can space
 * a block without a `style=` attribute — the Content-Security-Policy in
 * vercel.json does not allow inline styles. Reach for a real rule before
 * adding a third.
 */

.mt-md {
  margin-top: 1.5rem;
}

.mt-lg {
  margin-top: 2.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   10. Placeholder marker
   ══════════════════════════════════════════════════════════════════════════ */

/*
 * `.ph` flags copy that is a stand-in, so unfinished text is impossible to miss
 * in a preview deploy. Delete the class (not the element) once real copy lands;
 * `make check` does not enforce this, a human does.
 */
.ph {
  position: relative;
  outline: 1px dashed var(--blue-pale);
  /* Small enough that two stacked placeholders never overlap outlines. */
  outline-offset: 0.375rem;
  border-radius: var(--r-tag);
}

.band .ph {
  outline-color: color-mix(in srgb, var(--white) 45%, transparent);
}

/* ══════════════════════════════════════════════════════════════════════════
   11. Footer
   ══════════════════════════════════════════════════════════════════════════ */

/*
 * The footer is dark on purpose. The stepped gradient band ends on the
 * near-black `--ink`, so a light footer under it would cut the staircase off
 * with a hard seam. Dark here means the band resolves into the footer instead.
 */
.footer {
  padding-block: 3rem;
  background: var(--ink);
  font-size: var(--t-small);
  color: color-mix(in srgb, var(--off-white) 72%, transparent);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer a {
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer a:hover {
  color: var(--off-white);
}

.footer :focus-visible {
  outline-color: var(--white);
}

/* ══════════════════════════════════════════════════════════════════════════
   12. Scroll reveal
   ══════════════════════════════════════════════════════════════════════════ */

/*
 * Opt-in via [data-reveal]. script.js adds `is-in` through an IntersectionObserver.
 * The hidden state is applied by script.js setting `data-reveal-ready` on <html>,
 * so with JS disabled — or before the script parses — content stays visible
 * rather than being stranded at opacity 0.
 */
[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

[data-reveal-ready] [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal-ready] [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
