/* HyperFrames guide: page-only styles. The shared system is in /shared/styles.css. */

/* ---------- Hero ---------- */

.hero { padding-block: 24px clamp(88px, 10vw, 140px); }
.hero__grid { display: grid; gap: 72px; align-items: center; }
.hero__copy { max-width: 38rem; }

@media (min-width: 1040px) {
  .hero { min-height: calc(100svh - 88px); display: flex; align-items: center; padding-top: 0; }
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(56px, 6vw, 104px); }
}

/* ---------- Hero cluster: real stills at three depths ----------
   Back: a long-form YouTube still. Front: two short-form stills overlapping its lower edge.
   Each plane drifts at its own rate. */

.cluster { position: relative; margin: 0; width: 100%; max-width: 640px; justify-self: center; }
.cluster__stage { position: relative; aspect-ratio: 1 / 0.86; }

.cluster__plane { position: absolute; will-change: transform; transform: translate3d(calc(var(--dx, 0) * 1px), calc(var(--dy, 0) * 1px), 0); }


.cluster__yt { left: 0; top: 0; width: 88%; aspect-ratio: 16 / 9; }
.cluster__short { right: 0; bottom: 0; width: 29%; aspect-ratio: 9 / 16; }
.cluster__short--b { left: 10%; right: auto; bottom: 7%; width: 24%; }

.cluster__caption { margin-top: 28px; max-width: 32em; font-size: 15px; line-height: 1.55; color: var(--ink-faint); text-wrap: pretty; }

/* Load: the planes arrive back to front. */
html.js .cluster__plane > * { opacity: 0; transform: translateY(16px); }
.cluster.is-live .cluster__plane > * { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-out); }
.cluster.is-live .cluster__short > * { transition-delay: 300ms; }
.cluster.is-live .cluster__short--b > * { transition-delay: 380ms; }

@media (prefers-reduced-motion: reduce) {
  html.js .cluster__plane > * { opacity: 1; transform: none; }
  .cluster__plane { transform: none; }
}

@media (max-width: 1039px) {
  .hero__copy { max-width: 40rem; }
  .cluster { max-width: 600px; }
}

/* ---------- Formats: short-form and long-form ---------- */

.formats { padding-block: clamp(96px, 12vw, 176px); background: var(--surface); border-block: 1px solid var(--line); overflow: hidden; }
.formats__head { display: grid; gap: 20px; margin-bottom: clamp(56px, 6vw, 80px); }
@media (min-width: 900px) { .formats__head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: end; } }
.formats__head p { margin: 0; max-width: 30em; font-size: 18px; color: var(--ink-soft); text-wrap: pretty; }

.rail { display: flex; gap: clamp(16px, 2vw, 28px); width: max-content; padding-inline: var(--gutter); will-change: transform; transform: translate3d(calc(var(--rx, 0) * 1px), 0, 0); }

.still { margin: 0; flex: none; }
.still .frame { box-shadow: var(--e2); }
.still--wide { width: clamp(300px, 34vw, 480px); }
.still--wide .frame { aspect-ratio: 16 / 9; }
.still--tall { width: clamp(150px, 15vw, 210px); }
.still--tall .frame { aspect-ratio: 9 / 16; }
.still figcaption { margin-top: 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); max-width: 30ch; }
.still figcaption b { display: block; color: var(--ink); font-weight: 600; }

.rail__label { margin: 0 0 20px; display: flex; align-items: baseline; gap: 12px; font-family: var(--font-display); font-variation-settings: "wdth" 88; font-stretch: 88%; font-weight: 760; font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; }
.rail__label span { font-family: var(--font-text); font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--ink-faint); }
.rail + .rail__label, .rail + .wrap .rail__label { margin-top: clamp(56px, 6vw, 88px); }

@media (prefers-reduced-motion: reduce) {
  .formats { overflow: visible; }
  .rail { width: auto; transform: none; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
  .still { scroll-snap-align: start; }
}

/* ---------- Inside ---------- */

.inside__grid { display: grid; gap: 48px; }
@media (min-width: 900px) {
  .inside__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(56px, 7vw, 120px); align-items: center; }
  .inside__head { position: sticky; top: 48px; }
}
.inside__cost { margin: 32px 0 0; max-width: 26em; padding: 18px 20px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-wrap: pretty; }
.inside__cost b { color: var(--ink); font-weight: 600; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 32px 0 32px 60px; border-top: 1px solid var(--line); font-size: 18px; color: var(--ink-soft); max-width: 36em; text-wrap: pretty; }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks strong { display: block; margin-bottom: 6px; font-family: var(--font-display); font-variation-settings: "wdth" 88; font-stretch: 88%; font-weight: 760; font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.15; letter-spacing: -0.018em; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 34px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.6 8.3 6.6 11.2 12.5 5' fill='none' stroke='%2311150a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 18px no-repeat;
  box-shadow: inset 0 0 0 1px rgb(17 21 10 / 0.1);
}

/* ---------- Note from Connor ---------- */

.note { padding-top: 0; }
.note__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .note__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(56px, 7vw, 120px); } }

.note__photo { position: relative; max-width: 440px; aspect-ratio: 1 / 1; background: var(--lime); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e2); }
.note__photo img { position: absolute; left: 5%; bottom: -1%; width: 90%; height: auto; }

.note__copy p { margin: 20px 0 0; font-size: 18px; color: var(--ink-soft); max-width: 33em; text-wrap: pretty; }
.note__copy h2 + p { margin-top: 26px; }

/* ---------- Close: the page lands on lime ---------- */

.close { color: var(--lime-ink); background: var(--lime); padding-block: clamp(96px, 12vw, 168px); }
.close__grid { display: grid; gap: 44px; align-items: end; }
@media (min-width: 1000px) { .close__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; } }
.close h2.display { font-size: clamp(2.2rem, 1.2rem + 3vw, 3.9rem); }
.close .selected { background: var(--lime-ink); color: var(--lime); }
.close ::selection { background: var(--lime-ink); color: var(--lime); }
.close .optin { margin-top: 0; }
.close .optin__row { flex-direction: column; }
.close .btn { width: 100%; }
.close .optin__input { border-color: rgb(17 21 10 / 0.22); box-shadow: 0 1px 2px rgb(17 21 10 / 0.08); }
.close .optin__input:focus-visible { border-color: var(--lime-ink); box-shadow: 0 0 0 4px rgb(17 21 10 / 0.16); }
.close .btn { color: var(--lime); background: var(--lime-ink); border-color: var(--lime-ink); box-shadow: 0 12px 24px -14px rgb(17 21 10 / 0.7); }
@media (hover: hover) and (pointer: fine) { .close .btn:hover { background: #272d1a; } }
.close .optin__small { color: #3d4719; }
.close .optin__error { color: #7a1f00; }
.close .thanks { margin-top: 0; box-shadow: 0 18px 40px -20px rgb(17 21 10 / 0.4); border-color: rgb(17 21 10 / 0.12); }
.lede--follow { margin-top: 14px; }
