/* ============================================================================
   landing.css — what only the home page uses, on top of site.css (the
   white-and-ink system: tokens, type, buttons, links, sections, heads, rows,
   steps, the player frame and the reveals all live there).

   Order: hero (+ the film) · courses · sample class · paths · communities ·
   packages · phones · reduced motion.
   ========================================================================== */

/* ============================================================ HERO */
.lp .lp-hero { position: relative; background: #fff; overflow: hidden; }
.lp .lp-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 44%;
  min-height: calc(100vh - var(--z2h-nav-h, 80px)); min-height: calc(100svh - var(--z2h-nav-h, 80px));
}
.lp .lp-hero__copy { align-self: center; max-width: 660px; padding-block: clamp(2rem, 5vw, 3.5rem); }
.lp .lp-hero__title {
  display: grid; gap: 0.05em; font: 600 clamp(2.2rem, 4.4vw, 4.1rem)/1.03 var(--display);
  letter-spacing: -0.03em; color: var(--ink);
}
.lp .lp-hero__l1, .lp .lp-hero__l2, .lp .lp-hero__l3 { display: block; }
.lp .lp-hero__l2 { color: var(--muted); }
.lp .lp-rotator { display: inline-grid; }
.lp .lp-rotator__word {
  grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(0.4em);
  transition: opacity 0.55s var(--ease), transform 0.65s var(--ease);
}
.lp .lp-rotator__word.is-in { opacity: 1; transform: none; }
.lp .lp-rotator__word.is-out { opacity: 0; transform: translateY(-0.4em); }
.lp .lp-hero__lead { margin-top: clamp(1.4rem, 3vw, 2rem); max-width: 46ch; font-size: clamp(1.02rem, 1.5vw, 1.16rem); line-height: 1.6; color: var(--muted); }
.lp .lp-hero__ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: clamp(1.6rem, 3vw, 2.2rem); }

/* The film: hero-film.js draws the journey here from #hero-film-data. */
.lp .ed-film {
  position: relative; align-self: stretch; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
}
.lp .ed-film__layer { position: absolute; left: 0; right: 0; top: 0; opacity: 0; will-change: transform; }
.lp .ed-film__star { position: absolute; border-radius: 50%; background: var(--ink); }
.lp .ed-film__spark { position: absolute; width: 9px; height: 9px; }
.lp .ed-film__spark::before, .lp .ed-film__spark::after { content: ""; position: absolute; background: var(--ink); }
.lp .ed-film__spark::before { left: 4px; top: 0; width: 1px; height: 9px; }
.lp .ed-film__spark::after { top: 4px; left: 0; height: 1px; width: 9px; }
.lp .ed-film__ground { position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: var(--ink); opacity: 0.55; will-change: transform; }
.lp .ed-film__world { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; }
.lp .ed-film__label {
  margin-top: calc(0.9rem * var(--k, 1)); font-family: var(--display); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  font-size: clamp(0.56rem, calc(0.68rem * var(--k, 1)), 0.72rem); color: var(--muted); white-space: nowrap;
}
/* Before the script runs the rocket is held back (a <noscript> rule shows it,
   centred); once live, the script places it and it fades in on its pad. */
.lp .ed-film__rocket { position: absolute; left: 50%; top: 50%; height: 36%; width: auto; max-width: none; transform: translate(-50%, -50%); opacity: 0; }
.lp .ed-film.is-live .ed-film__rocket { left: 0; top: 0; opacity: 1; transition: opacity 0.7s var(--ease); will-change: transform, clip-path; }

/* ============================================================ COURSES
   A card is its cover and its title, nothing else. */
.lp .lp-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 3.6vw, 3rem) clamp(1.25rem, 2.4vw, 2rem); }
body .lp .lp-course { display: block; color: var(--ink); }
.lp .lp-course__media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint);
}
.lp .lp-course__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lp .lp-course__glyph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 3rem var(--display); color: var(--line-2); }
.lp .lp-course__title { margin-top: 1rem; font: 600 1.22rem/1.25 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
@media (hover: hover) and (pointer: fine) {
  .lp .lp-course:hover .lp-course__media img { transform: scale(1.035); }
}

/* ============================================================ SAMPLE CLASS */
.lp .lp-sample { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.5rem, 3.4vw, 3rem); align-items: start; }
.lp .lp-player__meta { margin-top: 1.25rem; }
.lp .lp-chips { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font: 500 0.68rem/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lp .lp-chip:not(:last-child)::after { content: "·"; margin-left: 0.5rem; }
.lp .lp-player__title { margin-top: 0.55rem; font: 600 clamp(1.25rem, 2vw, 1.55rem)/1.2 var(--display); letter-spacing: -0.02em; }
.lp .lp-player__desc { margin-top: 0.55rem; max-width: 60ch; color: var(--muted); font-size: 0.98rem; }
.lp .lp-player__cta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; margin-top: 0.9rem; font-size: 0.94rem; }
.lp .lp-player__cta[hidden] { display: none; }
.lp .lp-player__cta-k { color: var(--muted); }

.lp .lp-rail__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.lp .lp-rail__count { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp .lp-item {
  display: grid; grid-template-columns: auto 104px minmax(0, 1fr); align-items: center; gap: 0.9rem;
  width: 100%; min-height: 76px; padding: 0.75rem 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; color: var(--muted); cursor: pointer; font-family: var(--body);
  transition: color 0.3s ease;
}
.lp .lp-item__n { font: 500 0.72rem var(--display); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.lp .lp-item__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: var(--tint); border: 1px solid var(--line); }
.lp .lp-item__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: opacity 0.4s ease; }
.lp .lp-item__title { display: block; font: 600 0.95rem/1.3 var(--display); letter-spacing: -0.01em; color: inherit; }
.lp .lp-item__meta { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: var(--muted); }
.lp .lp-item.is-active { color: var(--ink); }
.lp .lp-item.is-active .lp-item__thumb img { opacity: 1; }
.lp .lp-item.is-active .lp-item__thumb { border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .lp .lp-item:hover { color: var(--ink); }
  .lp .lp-item:hover .lp-item__thumb img { opacity: 1; }
}
.lp .lp-rail__more { margin-top: 1.25rem; }

/* ============================================================ HOW IT WORKS: the two paths */
.lp .lp-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.lp .lp-path { display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.25rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.lp .lp-path__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.lp .lp-path__title { font: 600 1.6rem/1.1 var(--display); letter-spacing: -0.025em; }
.lp .lp-path__tag { margin-top: 0.4rem; font: 500 0.68rem/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lp .lp-path__ideal { margin-top: 1.1rem; color: var(--muted); font-size: 0.98rem; }
.lp .lp-path__ideal strong { color: var(--ink); font-weight: 600; }
.lp .lp-path__list { display: grid; gap: 0.6rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.95rem; }
.lp .lp-path__list li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; }
.lp .lp-path__list li::before { content: ""; width: 5px; height: 10px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(42deg) translate(-1px, -1px); justify-self: center; }
.lp .lp-path__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.5rem; }
.lp .lp-path__model { display: grid; gap: 0.25rem; font-size: 0.95rem; font-weight: 600; }
.lp .lp-path__model em, .lp .lp-path__stat em { font: 500 0.66rem var(--display); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lp .lp-path__stat { display: grid; gap: 0.25rem; justify-items: end; font: 600 1.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.lp .lp-path .lp-btn { margin-top: 1.5rem; }
.lp .lp-note { margin-top: clamp(1.5rem, 3vw, 2.25rem); text-align: center; color: var(--muted); font-size: 0.95rem; }
.lp .lp-note .lp-link { font-size: inherit; }

/* ============================================================ COMMUNITIES */
.lp .lp-comms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 1.75rem); }
body .lp .lp-comm {
  display: flex; flex-direction: column; padding: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color 0.5s var(--ease-out);
}
.lp .lp-comm__top { display: flex; align-items: center; gap: 0.6rem; font: 500 0.68rem/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lp .lp-comm__top i { font-size: 1.25rem; color: #25d366; }
.lp .lp-comm__name { margin-top: 1.1rem; font: 600 1.22rem/1.2 var(--display); letter-spacing: -0.015em; }
.lp .lp-comm__desc { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.lp .lp-comm__tags { margin-top: 1rem; font-size: 0.82rem; color: var(--muted); }
.lp .lp-comm__tags span:not(:last-child)::after { content: "·"; margin: 0 0.45rem; }
.lp .lp-comm__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.4rem; }
.lp .lp-comm__free { font: 500 0.68rem var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .lp .lp-comm:hover { border-color: var(--line-2); }
}

/* ============================================================ PACKAGES */
.lp .lp-pkgs { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.lp .lp-pkg {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.5rem, 3.2vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.lp .lp-pkg__title { margin-top: 0.7rem; font: 600 clamp(1.4rem, 2.4vw, 1.9rem)/1.12 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.lp .lp-pkg__tag { margin-top: 0.5rem; max-width: 46ch; color: var(--muted); }
.lp .lp-pkg__price { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 1.4rem; font: 600 clamp(1.7rem, 3vw, 2.3rem)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lp .lp-pkg__price small { font: 500 0.82rem var(--body); letter-spacing: 0; color: var(--muted); }
.lp .lp-pkg .lp-btn { margin-top: 1.5rem; }
.lp .lp-pkg__items { align-self: center; border-top: 1px solid var(--line); }
.lp .lp-pkg__items li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.lp .lp-pkg__items em { font: 500 0.66rem var(--display); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lp .lp-pkg__more { color: var(--muted); }

/* ============================================================ TABLET */
@media (max-width: 1100px) {
  .lp .lp-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp .lp-comms { grid-template-columns: 1fr; }
  .lp .lp-sample { grid-template-columns: 1fr; }
}

/* ============================================================ PHONES AND SMALL TABLETS
   The film becomes a band above the copy; lists that sat side by side stack. */
@media (max-width: 991.98px) {
  .lp .lp-hero__grid { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lp .ed-film {
    order: -1; margin-inline: calc(-1 * var(--gutter));
    min-height: clamp(200px, 30vh, 300px); min-height: clamp(200px, 30svh, 300px);
    /* the band ends where the headline starts: fade the worlds out well before it */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 72%, transparent 96%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 72%, transparent 96%);
  }
  .lp .lp-hero__copy { max-width: 640px; padding-block: clamp(0.75rem, 3vw, 1.5rem) clamp(2rem, 6vw, 3rem); }
  .lp .lp-pkg { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  /* courses: one row to swipe, the next card peeking in as the cue */
  .lp .lp-courses {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .lp .lp-courses::-webkit-scrollbar { display: none; }
  .lp .lp-course { flex: 0 0 82%; scroll-snap-align: start; }
  .lp.lp-js .lp-courses [data-reveal] { opacity: 1; transform: none; transition: none; }

  .lp .lp-item { grid-template-columns: 96px minmax(0, 1fr); }
  .lp .lp-item__n { display: none; }
  .lp .lp-paths { grid-template-columns: 1fr; }
  .lp .lp-pkg__items li { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (max-width: 560px) {
  .lp .lp-hero__title { font-size: clamp(1.85rem, 8.4vw, 2.4rem); }
  .lp .lp-hero__ctas .lp-btn, .lp .lp-path .lp-btn, .lp .lp-pkg .lp-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lp .lp-course__media img, .lp .lp-rotator__word { transition: none; }
}
