/* ============================================================
   Landing page — the front door
   Reuses the shared hero/type system; adds the two entry cards.
   ============================================================ */

/* The harmonograph is lifted out of the hero into a persistent, full-page
   background field: fixed to the viewport, sitting behind the z-index:1 content
   (`body > *` in shared.css), so the squiggle stays lit as you scroll the whole
   page. pointer-events:none keeps the cards fully clickable through it. */
#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* The landing hero is a touch shorter than a content hero so the two
   doors peek above the fold, inviting the scroll. The hero itself is now
   transparent so the background field shows through it. */
.hero--landing { min-height: 86svh; background: transparent; }

/* a soft floor-gradient so the title reads cleanly over the linework */
.hero--landing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(6, 6, 7, 0.85) 0%,
    rgba(6, 6, 7, 0.45) 32%,
    rgba(6, 6, 7, 0) 62%);
}

.hero--landing .hero__title { max-width: 16ch; }

/* ============================================================
   ENTER — curated tracks of explorer cards
   ============================================================ */
.enter {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) clamp(1.5rem, 5vw, 5rem) 0;
}
.enter__kicker {
  font: 500 0.76rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 2.6rem;
}

/* ── a track: a labelled group of cards, generously spaced ── */
.track { margin: 0 0 clamp(3rem, 8vh, 5.5rem); }
.track__head { margin: 0 0 1.6rem; max-width: 46rem; }
.track__label {
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.7rem;
}
.track__title {
  font-family: var(--font-display);
  font-weight: 420;
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--chalk);
  margin: 0 0 0.5rem;
}
.track__note {
  font: 400 0.92rem/1.55 var(--font-body);
  color: var(--chalk-dim);
  margin: 0;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

/* the featured headline card — preview and body side by side. A grid (not flex)
   gives the canvas a definite cell height, avoiding the percentage-height
   circularity that collapses a stretched <canvas>. */
.track--feature .cards { grid-template-columns: 1fr; }
.card--wide {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: stretch;
}
.card--wide .card__preview {
  width: 100%;
  height: 100%;
  min-height: 15rem;
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: 1px solid var(--line-strong);
}
.card--wide .card__body { justify-content: center; padding: clamp(1.6rem, 3.5vw, 2.8rem); }
.card--wide .card__title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.card--wide .card__tagline { max-width: 36ch; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: var(--chalk);
  background: var(--ink-raised);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.card::before {
  /* accent rule that ignites along the card top on hover */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px var(--accent), 0 0 4px var(--accent);
  transition: transform 0.45s var(--ease);
  z-index: 3;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9),
              0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.card:hover::before,
.card:focus-visible::before { transform: scaleX(1); }

.card__preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--accent) 8%, var(--ink-sunk)), var(--ink-sunk));
  border-bottom: 1px solid var(--line-strong);
  transition: filter 0.4s var(--ease);
  filter: saturate(0.85) brightness(0.92);
}
.card:hover .card__preview,
.card:focus-visible .card__preview { filter: saturate(1.05) brightness(1.08); }

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.card__eyebrow {
  font: 500 0.74rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--chalk);
  margin: 0 0 0.7rem;
}
.card__tagline {
  font: 400 0.88rem/1.55 var(--font-mono);
  color: var(--chalk-dim);
  margin: 0 0 1.6rem;
  max-width: 30ch;
}
.card__cta {
  margin: auto 0 0;
  font: 500 0.82rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.card__cta span {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.card:hover .card__cta span,
.card:focus-visible .card__cta span { transform: translateX(5px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* the count-adaptive grid (auto-fit) handles columns; the feature card stacks
   below the comfortable side-by-side width */
@media (max-width: 760px) {
  .card--wide { grid-template-columns: 1fr; }
  .card--wide .card__preview { height: auto; aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .hero--landing { min-height: 80svh; }
}
