/* Course room (Oct 9, 2026). The funnel page's system: Inter Tight + Inter, white / #f5f5f7 / ink,
   one orange for the primary action, flat pills, air. Phone first (375). The bot family is inline SVG
   from src/pages.ts; the three moments (wake-up, tile pop, stamp + confetti) are keyframes here, cued
   by /course/course.js. prefers-reduced-motion: every moment becomes a static state. */
:root {
  --bg: #fff;
  --bg2: #f5f5f7;
  --ink: #1d1d1f;
  --mute: #6e6e73;
  --line: #d2d2d7;
  --accent: #ff4d00;
  --grey: #c9c9ce;           /* an asleep teammate */
  --disp: "Inter Tight", Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.47; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; height: 56px; border-bottom: 1px solid rgba(0,0,0,.08); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--disp); font-weight: 600; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.top nav a { font-size: 14px; color: var(--mute); text-decoration: none; margin-left: 18px; }

/* type */
h1, h2 { font-family: var(--disp); font-weight: 700; letter-spacing: -.04em; line-height: 1.04; margin: 0 0 14px; }
h1 { font-size: clamp(36px, 9vw, 60px); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 0 0 12px; }
.lede { color: var(--mute); font-size: 19px; line-height: 1.35; letter-spacing: -.02em; margin: 0 0 24px; max-width: 34ch; }
.note { color: var(--mute); font-size: 15px; margin: 0; }
.note.err { color: #d1242f; }
.hero { padding: 40px 0 24px; }

/* buttons: solid, flat, nothing else. Orange = the one thing to do on the page. */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--disp); font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 1;
  color: #fff; background: var(--ink); border: 0; border-radius: 980px; padding: 15px 24px;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: opacity .15s ease;
}
.pill:hover { opacity: .85; }
.pill.accent { background: var(--accent); }
.pill.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.pill.big { font-size: 18px; padding: 17px 28px; white-space: normal; text-align: center; }
.link { font-family: var(--disp); font-weight: 500; font-size: 16px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ===== the orb ===== */
.orbwrap { position: relative; width: 112px; height: 112px; margin: 0 0 22px; }
.orbwrap::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -10px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.18), rgba(0,0,0,0) 70%); }
.orbwrap.small { width: 72px; height: 72px; margin-bottom: 18px; }
.orb { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.16)); }
.orb .eye { transform-box: fill-box; transform-origin: center; }
/* first sign-in: eyes shut → open, a small lean, 1.5 s, once per device (course.js adds .wake) */
.orb.wake { animation: orb-lean 1.5s cubic-bezier(.2,.8,.2,1) both; }
.orb.wake .eye { animation: orb-eye-open 1.5s cubic-bezier(.2,.8,.2,1) both; }
.orb.proud .eye { animation: squint .9s ease-in-out both; }   /* the hero orb at the stamp's impact */
.orb.awake .eye { animation: blink 7s ease-in-out 3s infinite; }
@keyframes eye-open { 0%, 36% { transform: scaleY(.08); } 52% { transform: scaleY(1.08); } 62% { transform: scaleY(.92); } 72%, 100% { transform: scaleY(1); } }
@keyframes orb-eye-open { 0%, 24% { transform: scaleY(.08); } 40% { transform: scaleY(1.08); } 52% { transform: scaleY(.92); } 62%, 100% { transform: scaleY(1); } }
@keyframes orb-lean { 0%, 26% { transform: translateY(6px) rotate(0); } 48% { transform: translateY(-4px) rotate(-7deg); } 70% { transform: translateY(1px) rotate(3deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes squint { 0% { transform: scaleY(1); } 25%, 70% { transform: scaleY(.42) translateY(-10%); } 100% { transform: scaleY(1); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

/* the team beside the orb: the tracker is the line-up (Kareem, fix 2) */
.hero-team { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 22px; }
.hero-team .orbwrap { margin: 0; flex: 0 0 auto; }
.team { display: flex; gap: 6px; padding-bottom: 6px; }
.mate.tiny { width: 30px; height: 30px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.10)); }

/* ===== progress line ===== */
.progress { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.progress .count { font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.bar { display: block; flex: 1; height: 4px; border-radius: 99px; background: #e5e5ea; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }

/* ===== lesson tiles (one teammate each) ===== */
.tiles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.tile > a, .tile > span { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; background: var(--bg2); border-radius: var(--r); padding: 16px; text-decoration: none; transition: background .15s ease; }
.tile > a:hover { background: #ededf0; }
.tile.up > a, .tile.up > span { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.08); }
.tile .body { display: grid; gap: 2px; min-width: 0; }
.tile .num { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.tile .t { font-family: var(--disp); font-weight: 600; font-size: 19px; letter-spacing: -.02em; line-height: 1.15; }
.tile .s { color: var(--mute); font-size: 14px; line-height: 1.35; }
.tile .m { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--mute); white-space: nowrap; }
.tile.done .m { color: var(--ink); }
.tile.up .m { color: var(--ink); font-weight: 600; }        /* orange belongs to the button */
.tile.up.soon .m { color: var(--mute); font-weight: 500; }   /* "Filming" is not an action */
.tile.soon > span { opacity: .6; }
.tile.up.soon > span { opacity: 1; }
.tile.up .mate .eye { transform: scaleY(.45); }             /* half awake: it's next */
.tick { width: 14px; height: 14px; }

/* a teammate: grey and asleep until its lesson is done */
.mate { width: 56px; height: 56px; display: block; color: var(--grey); transition: color .5s ease; filter: drop-shadow(0 4px 8px rgba(0,0,0,.10)); }
.mate .eyes { fill: #8e8e93; transition: fill .3s ease; }
.mate:not(.on) { filter: drop-shadow(0 2px 4px rgba(0,0,0,.06)); }
.mate .eye { transform-box: fill-box; transform-origin: center; transform: scaleY(.12); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.mate.on { color: var(--c); }
.mate.on .eyes { fill: #fff; }
.mate.on .eye { transform: scaleY(1); }
.mate.mini { width: 44px; height: 44px; }
/* the colour-in pop (course.js adds .pop to the tile or the mate) */
.pop .mate, .mate.pop { animation: pop .7s cubic-bezier(.2,.8,.2,1) both; }
.pop .mate .eye, .mate.pop .eye { animation: eye-open .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pop { 0% { transform: scale(.9); } 45% { transform: scale(1.18) rotate(-4deg); } 70% { transform: scale(.96) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }

/* the picture under the list */
.strip { margin: 36px 0 0; }
.strip img { border-radius: var(--r); aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 55%; }
.strip figcaption { font-size: 14px; color: var(--mute); margin-top: 12px; max-width: 52ch; }

/* ===== finished: the stamp ===== */
.finished-row { display: grid; gap: 14px; justify-items: start; margin-top: 18px; padding-left: 6px; }
.finished-row .link { color: var(--mute); font-weight: 500; font-size: 15px; }   /* Start again is not the next thing to do */
/* A rubber stamp prints one colour: the bot's face is printed into it (a disc with knocked-out eyes), with an ink-speckle mask. */
.stamp {
  position: relative; display: grid; grid-template-columns: 44px auto; column-gap: 12px; row-gap: 2px; align-items: center; justify-items: start;
  padding: 14px 22px 12px 16px; border: 4px solid var(--accent); border-radius: 14px; color: var(--accent);
  transform: rotate(-8deg); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 3.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 3.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px;
}
.stamp .st-face { grid-row: 1 / span 2; width: 44px; height: 44px; display: block; }
.stamp .st-a { grid-column: 2; font-family: var(--disp); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.stamp .st-b { grid-column: 2; font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.stamp.slam { animation: slam .42s cubic-bezier(.3,0,.2,1) both; }
.is-finished.shake { animation: shake .32s ease-out .14s both; }
@keyframes slam { 0% { transform: rotate(-8deg) scale(1.9); opacity: 0; } 34% { transform: rotate(-8deg) scale(.95); opacity: 1; } 55% { transform: rotate(-8deg) scale(1.03); } 100% { transform: rotate(-8deg) scale(1); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translate(0,0); } 20% { transform: translate(-3px,2px); } 40% { transform: translate(3px,-1px); } 60% { transform: translate(-2px,1px); } 80% { transform: translate(1px,0); } }
/* confetti: tiny teammate shapes, placed and moved by course.js */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti svg { position: absolute; left: 0; top: 0; width: 22px; height: 22px; will-change: transform, opacity; }

/* ===== lesson page ===== */
.lesson-hero { padding-bottom: 16px; }
.lesson-head { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.bignum { font-family: var(--disp); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: -.05em; color: var(--ink); }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0f0f11; border-radius: var(--r); overflow: hidden; margin: 4px 0 18px; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .soon { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; font-size: 15px; }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.files a { font-size: 14px; background: var(--bg2); padding: 10px 14px; border-radius: 999px; text-decoration: none; }
.donebar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 8px; }
.donebar .pill { flex: 1 1 auto; }
.donechip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-weight: 600; font-size: 14px; color: var(--ink); background: var(--bg2); padding: 8px 12px; border-radius: 999px; }
.donechip[hidden], .link[hidden] { display: none; }
.nextprev { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 8px; font-size: 14px; }
.nextprev a { color: var(--mute); text-decoration: none; }
.nextprev a:hover { color: var(--ink); }

/* ===== my courses ===== */
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.course { display: grid; gap: 0; background: var(--bg2); border-radius: var(--r); overflow: hidden; text-decoration: none; }
.course img { aspect-ratio: 16 / 9; object-fit: cover; }
.course .body { display: grid; gap: 6px; padding: 16px 18px 18px; }
.course .t { font-family: var(--disp); font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.course .s { color: var(--mute); font-size: 15px; }
.course .bar { margin-top: 8px; }
.course .m { font-size: 13px; font-weight: 500; color: var(--mute); }

/* ===== sign-in ===== */
.form { background: var(--bg2); border-radius: 20px; padding: 22px; max-width: 460px; }
.form label { display: block; font-size: 14px; color: var(--mute); margin: 0 0 8px; }
.form input { width: 100%; font: inherit; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; margin: 0 0 12px; font-size: 17px; }
.form .pill { width: 100%; }

.foot { color: var(--mute); font-size: 13px; padding: 36px 0; border-top: 1px solid rgba(0,0,0,.08); margin-top: 48px; }

@media (min-width: 640px) {
  .hero { padding: 56px 0 28px; }
  .orbwrap { width: 132px; height: 132px; }
  .mate.tiny { width: 38px; height: 38px; }
  .team { gap: 8px; }
  .course { grid-template-columns: 42% 1fr; }
  .course img { height: 100%; aspect-ratio: auto; }
  .course .body { align-content: center; }
  .donebar .pill { flex: 0 0 auto; }
}
@media (max-width: 400px) {
  .tile > a, .tile > span { grid-template-columns: 48px 1fr; }
  .tile .m { grid-column: 2; }
  .mate { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .orb.wake, .orb.wake .eye, .orb.awake .eye, .orb.proud .eye, .pop .mate, .mate.pop, .pop .mate .eye, .mate.pop .eye, .stamp.slam, .is-finished.shake { animation: none; }
  .mate, .mate .eye, .mate .eyes, .bar i { transition: none; }
}
