/* ============================================================
   Landing block variants (src/lib/landing.js, V2).
   Base rules give a static, readable layout. Everything that moves sits
   under html.motion-ok (js/motion.js: JS on, no reduced motion).
   --p (0..1) comes from [data-progress], .is-in from [data-reveal].
   ============================================================ */

/* Big outline index shared by card variants */
.v-num { display: block; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.5rem); font-weight: 500; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; color: transparent; -webkit-text-stroke: 1px var(--line-strong); margin-bottom: var(--s-5); }
.card--dark .v-num, .section--dark .v-num { -webkit-text-stroke-color: var(--dark-3); }

/* ---------- cards: bento ---------- */
.v-bento { display: grid; gap: var(--s-4); }
.v-bento__cell { display: flex; flex-direction: column; }
.v-bento__cell:first-child .h4 { font-size: var(--t-h3); font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; }
.v-bento__cell:first-child .v-num { -webkit-text-stroke-color: var(--accent-soft); }
@media (min-width: 760px) { .v-bento__cell:first-child .v-num { margin-bottom: auto; padding-bottom: var(--s-6); font-size: clamp(4rem, 3rem + 4vw, 7rem); } }
@media (min-width: 760px) {
  .v-bento[data-n="2"] { grid-template-columns: 1.35fr 1fr; }
  .v-bento[data-n="3"] { grid-template-columns: 1.3fr 1fr; }
  .v-bento[data-n="3"] > :first-child { grid-row: span 2; }
  .v-bento[data-n="4"] { grid-template-columns: 1.3fr 1fr 1fr; }
  .v-bento[data-n="4"] > :first-child { grid-row: span 2; }
  .v-bento[data-n="4"] > :nth-child(2) { grid-column: span 2; }
  .v-bento[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
  .v-bento[data-n="6"] > :first-child { grid-row: span 2; }
  .v-bento[data-n="6"] > :last-child { grid-column: span 3; }
  .v-bento__cell:first-child { min-height: 22rem; }
}

/* ---------- cards: spotlight ---------- */
.v-spot__card { position: relative; isolation: isolate; overflow: hidden; }
.v-spot__card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity var(--d-slow) var(--ease-out);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow-peach), transparent 70%); }
.v-spot__card:hover::after, .v-spot__card:focus-within::after { opacity: 0.7; }
.v-spot__card.card--dark::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow-orange), transparent 70%); }
.v-spot__card:hover .v-num { -webkit-text-stroke-color: var(--accent); }
.v-spot__card .v-num { transition: -webkit-text-stroke-color var(--d-med); }

/* ---------- cards: hover expand ---------- */
.v-expand { display: grid; gap: var(--s-4); }
.v-expand__card { display: flex; flex-direction: column; }
.v-expand__card p { max-width: 46ch; }
@media (min-width: 900px) {
  .v-expand { display: flex; align-items: stretch; }
  .v-expand__card { flex: 1 1 0; min-width: 0; min-height: 24rem; justify-content: flex-end; transition: flex-grow 600ms var(--ease-out), background-color var(--d-med); }
  .v-expand__card .v-num { margin-bottom: auto; padding-bottom: var(--s-6); }
  .v-expand:hover .v-expand__card:hover, .v-expand__card:focus-within { flex-grow: 1.8; }
  .v-expand__card:hover { background: var(--white); box-shadow: var(--sh-lift); }
}

/* ---------- steps + prose: sticky rail ---------- */
.v-pin { display: grid; gap: var(--s-6); }
.v-pin__rail { display: none; }
@media (min-width: 900px) {
  .v-pin { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .v-pin__aside { position: sticky; top: 7rem; }
  .v-pin__rail { display: block; height: 3px; max-width: 18rem; border-radius: 3px; background: var(--line); overflow: hidden; }
  .section--dark .v-pin__rail { background: var(--dark-3); }
  .v-pin__rail i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 1)); }
}
.v-pin__list { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.v-pin__list li { padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.section--dark .v-pin__list li { border-color: var(--dark-3); }
.v-pin__list h3 { font-weight: 500; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.08; letter-spacing: -0.035em; margin: var(--s-3) 0; }
.v-pin__list p { color: var(--muted); max-width: 52ch; }
.section--dark .v-pin__list p { color: var(--on-dark-2); }
@media (min-width: 900px) { .v-pin__list li { min-height: 32vh; display: flex; flex-direction: column; justify-content: center; } }
.v-pin .block-prose { min-width: 0; }

/* ---------- steps: checklist ---------- */
.v-check { list-style: none; padding: 0; display: grid; gap: 0; max-width: 820px; margin-left: auto; }
.v-check li { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--s-5); padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.section--dark .v-check li { border-color: var(--dark-3); }
.v-check h3 { font-weight: 500; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.12; letter-spacing: -0.03em; margin: var(--s-2) 0; }
.v-check p { color: var(--muted); }
.section--dark .v-check p { color: var(--on-dark-2); }
.v-check__tick { width: 2.5rem; height: 2.5rem; color: var(--accent-ink); }
.section--dark .v-check__tick { color: var(--accent-soft); }
.v-check__tick svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.v-check__tick path { stroke-width: 2.2; }
.motion-ok .v-check__tick :is(circle, path) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion-ok .v-check.is-in .v-check__tick circle { animation: v-draw 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 260ms); }
.motion-ok .v-check.is-in .v-check__tick path { animation: v-draw 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 260ms + 420ms); }
.motion-ok .v-check li > div { opacity: 0.35; transition: opacity 500ms var(--ease-out); transition-delay: calc(var(--i) * 260ms + 300ms); }
.motion-ok .v-check.is-in li > div { opacity: 1; }
@keyframes v-draw { to { stroke-dashoffset: 0; } }

/* ---------- steps: timeline ---------- */
.v-time { list-style: none; display: grid; gap: var(--s-6); position: relative; }
ol.v-time { padding: 0 0 0 2rem; }
.v-time::before, .v-time::after { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.section--dark .v-time::before { background: var(--dark-3); }
.v-time::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--fill, 1)); }
.v-time li { position: relative; }
.v-time__dot { position: absolute; left: -2rem; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.section--dark .v-time__dot { box-shadow: 0 0 0 4px var(--dark); }
.section--white .v-time__dot { box-shadow: 0 0 0 4px var(--white); }
.v-time h3 { font-weight: 500; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.12; letter-spacing: -0.03em; margin: var(--s-3) 0; }
.v-time p { color: var(--muted); }
.section--dark .v-time p { color: var(--on-dark-2); }
@media (min-width: 900px) {
  .v-time { grid-template-columns: repeat(var(--n), 1fr); }
  ol.v-time { padding: 2.5rem 0 0; }
  .v-time::before, .v-time::after { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 2px; }
  .v-time::after { transform-origin: 0 50%; transform: scaleX(var(--fill, 1)); }
  .v-time__dot { left: 0; top: -2.5rem; }
}
/* the line fills while the list crosses the middle of the screen; each step lights when reached */
.motion-ok .v-time { --fill: clamp(0, (var(--p, 1) - 0.25) * 2.6, 1); }
.motion-ok .v-time li { --on: clamp(0, (var(--fill) * var(--n) - var(--i)) * 2, 1); }
.motion-ok .v-time__dot { transform: scale(calc(0.5 + var(--on) * 0.5)); background: color-mix(in srgb, var(--accent) calc(var(--on) * 100%), var(--line-strong)); }
.motion-ok .v-time li > :not(.v-time__dot) { opacity: calc(0.45 + var(--on) * 0.55); }

/* ---------- links: arrow rows ---------- */
.v-rows { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.section--dark .v-rows { border-color: var(--dark-3); }
.v-row { position: relative; isolation: isolate; display: grid; grid-template-columns: auto 1fr; gap: var(--s-3) var(--s-5); align-items: start; padding: var(--s-6) var(--s-2); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.section--dark .v-row { border-color: var(--dark-3); }
.v-row::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-md); background: var(--white); transform: scaleX(0); transform-origin: 0 50%; transition: transform 500ms var(--ease-out); }
.section--dark .v-row::before { background: var(--dark-2); }
.v-row:hover::before, .v-row:focus-visible::before { transform: none; }
.v-row__n { font-size: var(--t-small); font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; padding-top: 0.5em; }
.section--dark .v-row__n { color: var(--accent-soft); }
.v-row__tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.v-row h3 { font-weight: 500; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.1; letter-spacing: -0.035em; }
.v-row p { color: var(--muted); margin-top: var(--s-2); max-width: 60ch; }
.section--dark .v-row p { color: var(--on-dark-2); }
.v-row__foot { grid-column: 2; display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-small); font-weight: 600; }
.v-row__go { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--white); transition: transform var(--d-med) var(--ease-out), background-color var(--d-med); }
.section--dark .v-row__go { background: var(--accent); color: var(--ink); }
.v-row__go svg { width: 16px; }
.v-row:hover .v-row__go, .v-row:focus-visible .v-row__go { background: var(--accent); color: var(--ink); transform: translateX(4px); }
@media (min-width: 900px) {
  .v-row { grid-template-columns: 4rem 1fr auto; align-items: center; padding-inline: var(--s-5); }
  .v-row__foot { grid-column: 3; }
  .v-row__n { padding-top: 0; }
}
.v-rows--compact .v-row h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
@media (min-width: 900px) { .v-rows--compact .v-row { grid-template-columns: 3rem 1fr auto; } .v-rows--compact .v-row__foot > span:first-child { display: none; } }

/* ---------- links: feature ---------- */
.v-feature { display: grid; gap: var(--s-5); }
.v-feature__lead > .card { min-height: 100%; }
@media (min-width: 900px) {
  .v-feature { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: stretch; }
  .v-feature__lead > .card { min-height: 26rem; }
  .v-feature__lead .course-card__meta { margin-bottom: auto; }
  .v-feature__lead .course-card p { flex: 0 1 auto; }
  .v-feature__lead h3 { font-size: var(--t-h3); }
}

/* ---------- prose: statement ---------- */
.v-stack .section-head { margin-inline: auto; text-align: center; }
.v-statement { max-width: 24ch; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.v-stack__body { max-width: 980px; margin-inline: auto; }

/* ---------- split: parallax ---------- */
.v-par__side { min-width: 0; }
.motion-ok .v-par__side .media__frame img { transform: scale(1.14) translateY(calc((0.5 - var(--p, 0.5)) * 9%)); will-change: transform; }
.motion-ok .v-par__side > .card { transform: translateY(calc((0.5 - var(--p, 0.5)) * 64px)); }
@media (min-width: 900px) {
  .v-par .media__frame { border-radius: var(--r-xl); }
}

/* ---------- split: zoom ---------- */
.v-zoom__stage { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.v-zoom__stage .media__frame { aspect-ratio: 4 / 3; }
.v-zoom__stage > .card { padding: clamp(1.5rem, 4vw, 3.5rem); }
.v-zoom__stage > .card .h4 { font-size: var(--t-h3); font-weight: 500; letter-spacing: -0.03em; }
@media (min-width: 760px) {
  .v-zoom__stage .media__frame { aspect-ratio: 21 / 9; }
  .v-zoom__stage .media--portrait img { object-position: 50% 22%; }
  .v-zoom__stage > .card .checks { grid-template-columns: repeat(2, 1fr); column-gap: var(--s-6); }
}
.motion-ok .v-zoom__stage > * { --z: clamp(0, var(--p, 1) * 2.2, 1); clip-path: inset(0 calc((1 - var(--z)) * 9%) round var(--r-xl)); }
.motion-ok .v-zoom__stage img { transform: scale(calc(1.18 - var(--z) * 0.18)); }
@media (min-width: 900px) { .v-zoom__copy { columns: 2; column-gap: clamp(2rem, 5vw, 5rem); } .v-zoom__copy > * { break-inside: avoid; } .v-zoom__copy .lead { margin-top: 0; } }

/* ---------- table: highlighted column ---------- */
.v-hl .table :is(tbody th, thead th:first-child) { position: sticky; left: 0; background: var(--white); z-index: 1; }
.v-hl .table thead th:first-child { background: var(--bg); }
.section--dark .v-hl .table tbody th { background: var(--dark-2); }
.v-hl .table .is-hl { background: var(--accent-wash); font-weight: 600; }
.v-hl .table thead .is-hl { background: var(--ink); color: var(--white); }
.section--dark .v-hl .table thead .is-hl { background: var(--accent); color: var(--ink); }
.v-hl .table tbody tr { transition: background-color var(--d-fast); }
.v-hl .table tbody tr:hover { background: var(--bg); }
.section--dark .v-hl .table tbody tr:hover { background: var(--dark-3); }

/* ---------- table: tabs ---------- */
.v-tabs { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .v-tabs:not(.is-tabs) { grid-template-columns: repeat(2, 1fr); } }
.v-tabs__panel { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: clamp(1.25rem, 3vw, 2.5rem); }
.section--dark .v-tabs__panel { background: var(--dark-2); box-shadow: none; }
.v-tabs__title { font-size: var(--t-h3); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: var(--s-5); }
.v-tabs__title > span { display: block; font-size: var(--t-xs); font-weight: 600; letter-spacing: var(--track-label); color: var(--muted-2); margin-bottom: var(--s-2); }
.v-tabs__dl { display: grid; gap: var(--s-4); }
.v-tabs__dl > div { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.section--dark .v-tabs__dl > div { border-color: var(--dark-3); }
.v-tabs__dl dt { font-size: var(--t-xs); font-weight: 600; color: var(--muted-2); margin-bottom: var(--s-1); }
.v-tabs__dl dd { margin: 0; }
.v-tabs.is-tabs .v-tabs__dl { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); column-gap: var(--s-6); }
.v-tabs__list { display: flex; gap: var(--s-2); overflow-x: auto; padding: 4px; margin: -4px; scrollbar-width: none; }
.v-tabs__list::-webkit-scrollbar { display: none; }
.v-tabs__tab { flex: none; font: inherit; font-size: var(--t-small); font-weight: 600; padding: 0.6rem 1.1rem; border: 0; border-radius: var(--r-pill); background: var(--white); color: var(--ink); box-shadow: var(--sh-pill); cursor: pointer; transition: background-color var(--d-med), color var(--d-med); }
.v-tabs__tab[aria-selected="true"] { background: var(--ink); color: var(--white); box-shadow: none; }
.section--dark .v-tabs__tab { background: var(--dark-2); color: var(--on-dark); box-shadow: inset 0 0 0 1px var(--dark-3); }
.section--dark .v-tabs__tab[aria-selected="true"] { background: var(--accent); color: var(--ink); }
.motion-ok .v-tabs.is-tabs .v-tabs__panel:not([hidden]) { animation: v-fade 420ms var(--ease-out) both; }
@keyframes v-fade { from { opacity: 0; transform: translateY(8px); } }
