:root {
  --bg: #121214;
  --brand: #0e9765;
  --mint: #3dbf4f;
  --ink: #f2f3f2;
  --sub: #b4b7b4; /* solid, 9.2:1 on --bg */
  --muted: rgba(242, 243, 242, 0.62);
  --line: rgba(242, 243, 242, 0.12);
  --display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
}

/* ---------------------------------------------------------------- intro pin
   The hero is 80svh (75svh on phones), so the section nav shows below it
   on first load. hero.js adds .hero-webgl (canvas replaces the HTML wordmark and
   leaf) and, unless the user prefers reduced motion, .hero-live: then
   .intro__pin (hero + nav) sticks for one screen of scrolling while the story
   plays, and releases straight into the sections, with no empty track after it. */

.intro__pin {
  position: sticky;
  top: 0;
}

.intro__track {
  height: 0;
}

.hero-live .intro__track {
  height: 100vh;
  height: 100svh;
}

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

.hero {
  position: relative;
  height: 80vh;
  height: 80svh;
}

@media (max-width: 700px) {
  .hero {
    height: 75vh;
    height: 75svh;
  }
}

.hero__stage {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.hero-webgl .hero__canvas {
  opacity: 1;
}

/* Stacked lockup: wordmark / leaf / headline. hero.js reads these boxes
   (offsets, so the copy's reveal transform does not move them). */
.hero__lockup {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 6vh, 4rem) 6vw clamp(4.5rem, 12vh, 6.5rem); /* bottom: room for the cue */
  text-align: center;
}

.hero__wordmark {
  flex: none;
  width: min(64vw, 22rem, 60vh);
  aspect-ratio: 482 / 72;
  background: var(--ink);
  -webkit-mask: url("wordmark.svg") center / contain no-repeat;
  mask: url("wordmark.svg") center / contain no-repeat;
}

.hero__mark {
  flex: 0 1 auto;
  height: clamp(5.5rem, 22vh, 13rem);
  min-height: 3.5rem;
  aspect-ratio: 111 / 171;
  margin: clamp(0.9rem, 3.5vh, 2rem) 0;
}

.hero__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.6s ease-out;
}

/* With WebGL the canvas draws the wordmark and leaf on these exact boxes. The
   HTML wordmark hides once the canvas has faded in, and stays in the
   accessibility tree (role="img", aria-label="FragMint"). */
.hero-webgl .hero__wordmark {
  opacity: 0;
  transition: opacity 0s 0.6s;
}

.hero-webgl .hero__mark img {
  opacity: 0;
}

/* --copy and --cue (0..1) are driven by hero.js; both default to visible.
   The copy starts at --copy 0.7 over the large idle leaf, so a soft
   background-coloured halo keeps it readable where the leaf passes behind. */
.hero__copy {
  flex: none;
  opacity: var(--copy, 1);
  transform: translateY(calc((1 - var(--copy, 1)) * 14px));
  text-shadow: 0 0 0.6em var(--bg), 0 0 0.2em var(--bg);
}

/* The live tagline, set on two lines where it fits (one span per line). */
.hero__copy h1 {
  margin: 0;
  font-size: clamp(1.65rem, min(4.3vw, 6.4vh), 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.hero__copy h1 span {
  display: block;
}

@media (max-width: 700px) {
  .hero__copy h1 span {
    display: inline;
  }
}

.hero__copy p {
  margin: 0.8em auto 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.45;
  color: var(--sub);
}

/* Landscape phones: keep the lockup inside the short stage. */
@media (max-height: 520px) {
  .hero__lockup {
    padding-bottom: 3.5rem;
  }

  .hero__copy h1 {
    font-size: 1.5rem;
  }

  .hero__copy p {
    margin-top: 0.4em;
  }

  .hero__cue::after {
    display: none;
  }
}

.hero__cue {
  position: absolute;
  bottom: 3vh;
  left: 50%;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: var(--cue, 1);
  transform: translateX(-50%);
}

.hero__cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 24px;
  margin: 8px auto 0;
  background: linear-gradient(var(--mint), transparent);
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cue::after {
    animation: none;
  }

  .hero__canvas,
  .hero__mark img {
    transition: none;
  }
}

/* ---------------------------------------------------------------- section nav
   Pinned under the hero. Tight top padding: it must show in the 20-25vh under the hero. */

.toc {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4.5vh, 2.75rem) 6vw clamp(2rem, 6vh, 3.5rem);
}

.toc__eyebrow,
.card__tagline,
.facts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
}

.toc__eyebrow {
  margin: 0 0 0.9rem;
  letter-spacing: 0.24em;
}

.toc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__list a {
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.toc__list a:hover,
.toc__list a:focus-visible {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

/* ---------------------------------------------------------------- sections */

.block {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 5.5rem) 6vw 0;
  scroll-margin-top: 1rem;
}

.block__title {
  margin: 0 0 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.block__lead {
  margin: -0.75rem 0 1.75rem;
  max-width: 20rem;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--sub);
}

/* BOLT and About: title left, text right on wide screens. */
@media (min-width: 900px) {
  .block--split {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) 2fr;
    gap: 0 3rem;
  }

  .block--split .block__title {
    margin-bottom: 1rem;
  }
}

.prose {
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1.1em;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--sub);
}

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg);
}

.card__media {
  aspect-ratio: 4 / 3;
  margin: -1.5rem -1.5rem 1.4rem;
  overflow: hidden;
  background: #1a1a1d;
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Transparent logos: whole logo, on the panel. */
.card__media--logo img {
  padding: 8%;
  object-fit: contain;
}

.card__name {
  margin: 0 0 0.45rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card__tagline {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.14em;
}

.card__text {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--sub);
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: auto 0 0;
}

.card__links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mint);
  text-underline-offset: 0.3em;
}

.card__links a:hover,
.card__links a:focus-visible {
  color: var(--mint);
}

.card--soon .card__tagline {
  color: var(--muted);
}

.facts {
  margin: 1.5rem 0;
  padding: 0;
}

.facts div {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 0.3rem;
}

.facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.foot {
  max-width: 72rem;
  margin: clamp(4rem, 12vh, 7rem) auto 0;
  padding: 2rem 6vw 3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.foot a {
  color: var(--muted);
}

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

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

@media (prefers-reduced-motion: reduce) {
  .toc__list a {
    transition: none;
  }
}
