/* ═══════════════════════════════════════════════════════════════
   fooform — the videos page
   ═══════════════════════════════════════════════════════════════ */

.vid { width: var(--shell); margin: 0 auto; padding: calc(var(--nav-h) + 54px) 0 80px; }

.vid__head { text-align: center; margin-bottom: 40px; }
.vid__title {
  font-size: clamp(36px, 5.6vw, 68px); line-height: 1; letter-spacing: -.05em; font-weight: 700;
}
.vid__sub { color: var(--ink-2); font-size: 16.5px; margin: 18px auto 0; max-width: 52ch; }

/* ── player ───────────────────────────────────────────────── */
.player {
  position: relative; margin: 0;
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: #06060b;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent);
  aspect-ratio: 16 / 9;
}
.player__video { width: 100%; height: 100%; display: block; background: #06060b; object-fit: contain; }
/* The element is a tab stop on the way to its native controls, and Chromium
   does not match :focus-visible on it — so use :focus, or a keyboard user
   lands somewhere invisible. */
.player__video:focus { outline: 2px solid var(--accent); outline-offset: -3px; }
.player__fallback { color: var(--ink-2); padding: 24px; font-size: 15px; text-align: center; }
.player__fallback a { color: var(--accent); text-decoration: underline; }

.player__play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: radial-gradient(50% 60% at 50% 50%, rgba(6,6,11,.35), rgba(6,6,11,.66));
  transition: opacity .4s ease, visibility .4s;
}
.player__play svg {
  width: 34px; height: 34px; margin-left: 5px;
  color: var(--on-accent);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.player__play::before {
  content: ""; position: absolute;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 18px 50px -12px color-mix(in oklab, var(--accent) 95%, transparent);
  transition: transform .45s var(--ease-spring);
}
.player__play::after {
  content: ""; position: absolute;
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--accent) 55%, transparent);
  animation: ringOut 2.6s var(--ease-out) infinite;
}
@keyframes ringOut {
  0% { transform: scale(1); opacity: .8 }
  70%, 100% { transform: scale(1.55); opacity: 0 }
}
.player__play:hover::before { transform: scale(1.08); }
.player__play svg { position: relative; z-index: 1; }
.player.is-playing .player__play { opacity: 0; visibility: hidden; }

/* ── meta + chapters ──────────────────────────────────────── */
.feature__meta {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px; align-items: start; margin-top: 28px;
}
.feature__text h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.035em; margin-bottom: 12px; }
.feature__text p { color: var(--ink-2); font-size: 15.4px; line-height: 1.7; max-width: 60ch; }
.feature__note {
  display: flex; align-items: center; gap: 9px;
  margin-top: 16px !important;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3) !important;
}
.feature__note .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2) 60%, transparent) }
  70% { box-shadow: 0 0 0 10px transparent }
  100% { box-shadow: 0 0 0 0 transparent }
}
.feature__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.chapters {
  border-radius: 18px; border: 1px solid var(--line);
  background: var(--card); padding: 16px 14px;
  position: sticky; top: 90px;
}
.chapters__title {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); padding: 2px 8px 10px;
}
.chapters__list { display: flex; flex-direction: column; gap: 2px; }
.chapter {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  padding: 9px 10px; border-radius: 10px; text-align: left;
  color: var(--ink-2); font-size: 13.6px;
  border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.chapter:hover { background: var(--surface-2); color: var(--ink); }
.chapter.is-on {
  background: color-mix(in oklab, var(--accent) 13%, transparent);
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
  color: var(--ink);
}
.chapter__at {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
  flex-shrink: 0; min-width: 3.1em;
}
.chapter.is-on .chapter__at { color: var(--accent); }

@media (max-width: 900px) {
  .feature__meta { grid-template-columns: 1fr; }
  .chapters { position: static; }
}

/* ── notes ────────────────────────────────────────────────── */
.notes { margin-top: 80px; }
.notes__title { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; margin-bottom: 26px; }
.notes__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.note {
  border-radius: 18px; border: 1px solid var(--line);
  background: var(--card); padding: 22px 20px 24px;
  transition: transform .5s var(--ease-out), border-color .4s ease;
}
.note:hover { transform: translateY(-5px); border-color: var(--line-2); }
.note__n {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--accent); margin-bottom: 14px;
}
.note h3 { font-size: 16px; letter-spacing: -.02em; margin-bottom: 8px; line-height: 1.3; }
.note p { color: var(--ink-2); font-size: 13.8px; line-height: 1.65; }

@media (max-width: 1000px) { .notes__grid { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 560px)  { .notes__grid { grid-template-columns: 1fr } }

/* ── how it was made ──────────────────────────────────────── */
.howmade {
  margin-top: 60px; padding: 26px 28px;
  border-radius: 18px; border: 1px dashed var(--line-2);
  background: var(--surface);
}
.howmade h2 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.howmade p { color: var(--ink-2); font-size: 14.4px; line-height: 1.75; max-width: 78ch; }
.howmade code {
  font-family: var(--mono); font-size: 12.4px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink);
}

@media (max-width: 620px) {
  .vid { padding-top: calc(var(--nav-h) + 30px); }
  .player { border-radius: 16px; }
  .player__play::before, .player__play::after { width: 70px; height: 70px; }
}
