/* syncopated.app — marketing site.
 *
 * Palette + typography calibrated against real screenshots of the iOS
 * app. System sans throughout (SF Pro on Apple, system UI elsewhere),
 * cream-paper background, mustard-brass accent. Dark "warm-studio-
 * after-sunset" band for the beta CTA mirrors the app's dark mode.
 */

:root {
  /* Paper stack — very light cream, matching the iPad light-mode
     background sampled from dashboard screenshots. */
  --paper:       #f4edde;
  --paper-elev:  #fbf5e9;
  --paper-well:  #ece3d1;
  --paper-line:  #d7cbb4;

  /* Ink stack — near-black primary, warm grey for secondary. */
  --ink:         #1a1611;
  --ink-2:       #4a4236;
  --ink-muted:   #766b59;

  /* Brass accent — mustard/dark-gold, sampled from the iPad "New room"
     button. Not orange; darker than my first attempt. */
  --brass:       #b8892e;
  --brass-deep:  #8f6a22;
  --brass-soft:  #d7b15f;

  /* Dark palette for the beta section (matches app dark mode). */
  --night:       #1a130a;
  --night-elev:  #241a0f;
  --night-line:  rgba(255, 232, 190, 0.08);

  /* Sparingly used. */
  --teacher:     #b84438;
  --student:     #3a4f8c;

  --radius:      14px;
  --max:         1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro",
               "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "calt";
}

.skip {
  position: absolute; left: -9999px; top: 0;
  padding: 8px 12px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ==== Header ====================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
}

.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--brass); }
.wordmark.small { font-size: 17px; }

/* Brand mark (app icon: two figures + piano) sits left of the wordmark.
   margin (not flex gap) so SYNC + opated stay joined. */
.wordmark { display: inline-flex; align-items: center; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 7px; margin-right: 9px;
  flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(26, 22, 17, 0.08);
}
.logo-mark.sm { width: 22px; height: 22px; border-radius: 6px; margin-right: 7px; }

.site-header nav a {
  color: var(--ink-2);
  text-decoration: none;
  margin-left: 22px;
  font-size: 14px;
  font-weight: 500;
}
.site-header nav a:hover { color: var(--ink); }

/* ==== Hero ======================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--max);
  margin: 16px auto 64px;
  padding: 40px 24px 0;
}

/* Tight variant — no device frame on the right; just the copy block. */
.hero.hero-tight {
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 24px auto 24px;
  padding: 56px 24px 32px;
  text-align: left;
}
.hero-tight .hero-copy { max-width: 720px; }
.hero-tight h1 { font-size: clamp(38px, 5.5vw, 60px); }
.hero-tight .lede { max-width: 620px; font-size: 20px; }

/* Hero autoplay loop — fills the existing .device-screen. Poster shows
   before play starts and as fallback if both <source> tags 404. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper);
  display: block;
}
.hero-video-caption {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  max-width: 360px;
  margin: 0;
}

/* Respect reduced-motion: hide any legacy hero video; the static hero
   screenshot fills the frame on its own. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brass);
  margin: 0 0 14px;
  font-weight: 700;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  margin: 0 0 20px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.8px;
}

.lede {
  font-size: 19px;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 500px;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.06s ease, background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brass);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
.btn-primary:hover { background: var(--brass-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--paper-line);
}
.btn-ghost:hover { background: var(--paper-elev); }

.meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 6px 0 0;
}

/* ==== Hero device + screenshot cross-fade ======================== */

.hero-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* iPad frame — thin warm-grey bezel, gentle rounded corners. */
.device-frame {
  --bezel: 10px;
  padding: var(--bezel);
  background: #0f0a05;
  border-radius: 26px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 40px rgba(26, 22, 17, 0.18),
    0 0 0 1px rgba(26, 22, 17, 0.08);
  position: relative;
}
.device-frame.ipad {
  width: min(100%, 420px);
  aspect-ratio: 3 / 4; /* iPad portrait-ish */
}
.device-frame.ipad.dark {
  background: #000;
}
.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
}

/* Screenshots fill the screen; the active one is visible. */
.shot, .device-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.shot.active, .device-screen > img:only-child { opacity: 1; }

.panel-caption {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* Honour reduced motion — pin the first shot. */
@media (prefers-reduced-motion: reduce) {
  .shot { transition: none; }
  .shot:not(.active) { display: none; }
}

/* ==== Sections ==================================================== */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px;
}

.section h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--ink);
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.prose {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 24px;
  line-height: 1.55;
}
.prose.small { font-size: 14px; }

/* Section intros are centered to match the hero. Targets direct-child
   intros (and the narrative intro) only — the two-column showcase
   sections (#library, #download) keep their text left-aligned beside
   their image, where centering would orphan the heading over a
   left-aligned column. */
.section > h2,
.section > .prose,
.narrative-intro h2,
.narrative-intro .prose {
  text-align: center;
}
.section > .prose,
.narrative-intro .prose {
  margin-left: auto;
  margin-right: auto;
}

.problem {
  background: var(--paper-elev);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  max-width: none;
}
.problem > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

/* ==== Feature grid =============================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.feature {
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 22, 17, 0.08);
}

.feature h3 {
  font-size: 18px;
  color: var(--ink);
  margin: 0 18px;
  padding-top: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.feature p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 6px 18px 18px;
  flex: 1;
  line-height: 1.5;
}

/* ==== Media slots ================================================ */

.media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Real-screenshot media — show the full image, cropped tastefully. */
.media-shot {
  background: var(--paper);
}
.media-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Asset-slot media — placeholder until the real video drops in. */
.media-asset { background: var(--night); }
.media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brass-soft);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(215, 177, 95, 0.14), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(184, 137, 46, 0.10), transparent 55%),
    var(--night);
}
.media[data-loaded="1"] .media-placeholder { display: none; }

.chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(244, 237, 222, 0.14);
  color: var(--brass-soft);
  border-radius: 999px;
  border: 1px solid rgba(215, 177, 95, 0.3);
}

/* ==== Mini inline CSS demos ===================================== */

.media-cursor, .media-annotate, .media-webfeed {
  background: var(--paper);
  padding: 28px;
  flex-direction: column;
  gap: 16px;
}

.mini-staff {
  position: relative;
  height: 18px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 2px,
    var(--ink-muted) 2px, var(--ink-muted) 3px,
    transparent 3px, transparent 7px
  );
  opacity: 0.55;
  border-radius: 1px;
  width: 100%;
}
.media-cursor .mini-staff:first-child { opacity: 1; }

.mini-cursor {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 3px;
  background: var(--brass);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(184, 137, 46, 0.55);
  animation: mini-cursor 3.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes mini-cursor {
  0%   { left: 6%; }
  92%  { left: 92%; }
  100% { left: 92%; opacity: 0; }
}

.mini-circle {
  position: absolute;
  left: 40%; top: -10px;
  width: 26px; height: 26px;
  border: 2px solid var(--teacher);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
  animation: mini-circle 3.5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes mini-circle {
  0%, 15%  { opacity: 0; transform: scale(0.4); }
  35%      { opacity: 1; transform: scale(1); }
  80%      { opacity: 1; transform: scale(1); }
  100%     { opacity: 0; transform: scale(1); }
}
.mini-stroke {
  position: absolute;
  left: 18%; top: 10px;
  height: 2px;
  background: var(--student);
  border-radius: 2px;
  width: 0;
  animation: mini-stroke 3.5s infinite;
}
@keyframes mini-stroke {
  0%, 40%  { width: 0; }
  60%      { width: 30%; }
  85%      { width: 30%; opacity: 1; }
  100%     { width: 30%; opacity: 0; }
}

.qr-block {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.qr-pattern {
  width: 104px; height: 104px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(-45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--ink) 75%),
    linear-gradient(-45deg, transparent 75%, var(--ink) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: var(--paper-elev);
  border: 10px solid var(--paper-elev);
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--paper-line);
  animation: qr-pulse 2.6s infinite ease-in-out;
}
@keyframes qr-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}
.qr-caption {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==== Steps ====================================================== */

.steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.steps li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
}
.steps .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--brass);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 4px;
  font-weight: 600;
}
.steps p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

/* ==== Who it's for =============================================== */

.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 14px;
}
.who-grid h3 {
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 600;
}
.who-grid p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

/* ==== Ship list ================================================== */

.ship-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.ship-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--paper-line);
  align-items: start;
}
.ship-list li:last-child { border-bottom: 1px solid var(--paper-line); }
.ship-list .ver {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--brass);
}
.ship-list span:not(.ver) {
  font-size: 15px;
  color: var(--ink-2);
}

.section.ship a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
}

/* ==== Beta CTA (warm-studio-after-sunset) ======================== */

.beta {
  max-width: none;
  padding: 96px 24px;
  background: var(--night);
  color: #efe5d0;
}
.beta-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.beta h2 {
  color: #fbf0d3;
  font-size: clamp(28px, 3.4vw, 38px);
}
.beta p {
  color: rgba(251, 240, 211, 0.78);
  font-size: 17px;
  max-width: 480px;
  margin: 0 0 28px;
  line-height: 1.5;
}
.beta .btn-primary {
  background: var(--brass);
  color: #fff;
}
.beta .btn-primary:hover { background: var(--brass-soft); color: var(--night); }
.beta .meta { color: rgba(251, 240, 211, 0.55); margin-top: 16px; }

.beta-visual {
  display: flex;
  justify-content: center;
}
.beta-visual .device-frame { width: min(100%, 380px); }

@media (max-width: 860px) {
  .beta-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ==== Footer ===================================================== */

.site-footer {
  border-top: 1px solid var(--paper-line);
  background: var(--paper-elev);
  padding: 40px 24px 28px;
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}
.foot-grid nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot-grid nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
}
.foot-grid nav a:hover { color: var(--ink); }
.foot-grid .by {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 6px 0 0;
}
.foot-grid .by a { color: var(--brass); text-decoration: none; }
.copyright {
  max-width: var(--max);
  margin: 24px auto 0;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ==== Responsive ================================================= */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }
  .hero-device { order: -1; }
  .site-header nav { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  .beta { padding: 72px 20px; }
}

/* ==== Utility pages (terms, announcements) ======================= */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.doc h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.doc h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 32px 0 10px;
  font-weight: 600;
}
.doc h3 {
  font-size: 17px;
  color: var(--ink);
  margin: 24px 0 6px;
  font-weight: 600;
}
.doc p, .doc li {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
}
.doc ul { padding-left: 20px; }
.doc a { color: var(--brass); }
.doc .meta-row {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ==== Narrative (How a lesson flows) ============================= */

.narrative {
  max-width: none;
  padding: 48px 0 72px;
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-elev) 30%, var(--paper-elev) 70%, var(--paper) 100%);
}
.narrative-intro {
  max-width: var(--max);
  margin: 0 auto 40px;
  padding: 0 24px;
}
.narrative-intro h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  margin: 0 0 10px;
}

.flow-list {
  list-style: none;
  counter-reset: step;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.step {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.step.reverse { grid-template-columns: 1fr 1.1fr; }
.step.reverse .step-figure { order: 2; }
.step.reverse .step-body { order: 1; }

.step-figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.step-num {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
  margin-bottom: 10px;
}
.step h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  color: var(--ink);
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.step p {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 10px;
  line-height: 1.55;
  max-width: 540px;
}
.step p.detail {
  font-size: 15px;
  color: var(--ink-muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
}
.step p.detail strong { color: var(--ink); font-weight: 600; }
.step p.detail em {
  font-style: normal;
  color: var(--brass-deep);
  font-weight: 600;
}

/* Real-shot figure: iPad-ish frame. */
.shot-frame {
  --bezel: 8px;
  padding: var(--bezel);
  background: #0f0a05;
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 24px 50px rgba(26, 22, 17, 0.18),
    0 0 0 1px rgba(26, 22, 17, 0.08);
  max-width: 100%;
  width: min(100%, 480px);
}
.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.figure-caption {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

.narrative-footnote {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  border-top: 1px solid var(--paper-line);
  line-height: 1.55;
}

/* ==== Narrative illustrations (steps 4–8) ======================== */

/* Shared "session canvas" illustration frame — mimics the real iPad
   lesson layout without pretending to be a screenshot. */
.illus {
  width: min(100%, 480px);
  padding: 8px;
  background: #0f0a05;
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 42px rgba(26, 22, 17, 0.15),
    0 0 0 1px rgba(26, 22, 17, 0.08);
}
.illus-stage {
  background: var(--paper);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 14px;
  min-height: 320px;
}

.illus-score {
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.illus-staff-title {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.illus-staff {
  position: relative;
  height: 16px;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 2px,
    var(--ink-muted) 2px, var(--ink-muted) 3px,
    transparent 3px, transparent 6px
  );
  opacity: 0.5;
  border-radius: 1px;
}
.illus-staff.active { opacity: 1; }

/* A brass cursor sweeping the active staff. */
.illus-cursor {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 3px;
  background: var(--brass);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(184, 137, 46, 0.6);
  left: 35%;
}
.illus-cursor.advancing {
  animation: illus-cursor-sweep 4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes illus-cursor-sweep {
  0%   { left: 10%; }
  92%  { left: 90%; }
  100% { left: 90%; opacity: 0.6; }
}

/* Video tile dock. */
.illus-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.illus .tile {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--paper-well);
  display: flex;
  align-items: flex-end;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px var(--paper-line);
  position: relative;
}
.illus .tile.teacher { background: linear-gradient(135deg, #d6b0ab 0%, #a87b73 100%); }
.illus .tile.student { background: linear-gradient(135deg, #a7b4d4 0%, #5d6e99 100%); }
.illus .tile.hands   { background: linear-gradient(135deg, #c6b795 0%, #826f49 100%); }
.illus .tile.active::after {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  pointer-events: none;
  animation: illus-pulse 2.4s infinite ease-in-out;
}
@keyframes illus-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.illus-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.illus .pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--paper-line);
  color: var(--ink-2);
  background: var(--paper-elev);
}
.illus .pill.on {
  background: var(--brass);
  color: #fff;
  border-color: transparent;
}

/* MIDI bridge illustration. */
.illus-midi-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  border-radius: 10px;
}
.illus-midi-bridge .node {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  padding: 8px 6px;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--paper-line);
}
.illus-midi-bridge .flow {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--brass) 50%, transparent 100%);
  position: relative;
  animation: illus-flow 2.2s infinite ease-in-out;
}
@keyframes illus-flow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* Step-6 annotation marks on the score. */
.illus-annotation-circle {
  position: absolute;
  left: 54%; top: -10px;
  width: 28px; height: 28px;
  border: 2px solid var(--teacher);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
  animation: illus-draw-circle 4s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}
.illus-annotation-circle.settled { opacity: 1; transform: scale(1); animation: none; }
@keyframes illus-draw-circle {
  0%, 15%   { opacity: 0; transform: scale(0.4); }
  35%       { opacity: 1; transform: scale(1); }
  85%, 100% { opacity: 1; transform: scale(1); }
}
.illus-annotation-stroke {
  position: absolute;
  left: 20%; top: 12px;
  height: 2px;
  width: 0;
  background: var(--teacher);
  border-radius: 2px;
  animation: illus-draw-stroke 4s infinite;
}
.illus-annotation-stroke.settled { width: 32%; animation: none; }
@keyframes illus-draw-stroke {
  0%, 30%   { width: 0; }
  55%       { width: 32%; }
  100%      { width: 32%; }
}

/* Step-7 callout arrow. */
.illus-callout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--brass);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  align-self: flex-end;
  max-width: 70%;
}
.illus-callout .arrow {
  width: 14px; height: 14px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  opacity: 0.85;
}

/* Step-2 invite illustration. */
.illus-invite {
  padding: 28px;
  background: #0f0a05;
}
.illus-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 8px 20px rgba(26, 22, 17, 0.15);
}
.illus-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.illus-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 6px;
  text-align: center;
  padding: 14px;
  background: var(--paper-elev);
  border-radius: 10px;
  border: 1px dashed var(--paper-line);
  margin-bottom: 16px;
}
.illus-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.illus-channels .ch {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  color: var(--ink-2);
}
.illus-note {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0;
}

/* Step-8 summary sheet illustration. */
.illus-summary {
  padding: 28px;
  background: #0f0a05;
}
.summary-sheet {
  background: var(--paper);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 8px 20px rgba(26, 22, 17, 0.15);
}
.sum-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.summary-sheet h4 {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.sum-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.sum-list li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink-2);
}
.sum-list .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
  margin-top: 6px;
}
.sum-actions {
  display: flex;
  gap: 8px;
}
.sum-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper-elev);
  border: 1px solid var(--paper-line);
  color: var(--ink-2);
}
.sum-btn.primary {
  background: var(--brass);
  color: #fff;
  border-color: transparent;
}

/* Step-7 shared-annotation pair: two compact score panes with a dotted
   flow line between them, showing the same ink on both iPads. */
.illus-annotate-pair { padding: 26px; }
.illus-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
}
.illus-pane {
  background: var(--paper);
  border-radius: 12px;
  padding: 14px 14px 18px;
  box-shadow: 0 4px 12px rgba(26, 22, 17, 0.08);
  border: 1px solid var(--paper-line);
}
.illus-pane-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-bottom: 10px;
}
.illus-score.compact {
  padding: 10px 12px;
  gap: 12px;
  min-height: unset;
}
.illus-pair-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.illus-pair-flow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  opacity: 0.25;
  animation: illus-flow-dot 2.4s infinite ease-in-out;
}
.illus-pair-flow .dot:nth-child(2) { animation-delay: 0.4s; }
.illus-pair-flow .dot:nth-child(3) { animation-delay: 0.8s; }
@keyframes illus-flow-dot {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.35); }
}

/* Responsive: stack step rows on narrow viewports. */
@media (max-width: 860px) {
  .illus-pair { grid-template-columns: 1fr; }
  .illus-pair-flow { flex-direction: row; justify-content: center; }

  .step,
  .step.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step.reverse .step-figure,
  .step.reverse .step-body { order: initial; }
  .flow-list { gap: 56px; }
  .shot-frame, .illus { max-width: 100%; }
}

/* ==== 2026 refresh: text-only feature cards, lesson tools, library = */

/* Text-only feature card (no media slot) — used for in-lesson tools and
   feature points where a dedicated screenshot doesn't exist. */
.feature.pad {
  padding: 4px 2px 2px;
}
.feature.pad h3 { padding-top: 22px; }

.feature-grid.tight { margin-top: 24px; }

/* In-lesson tools block under the lesson narrative. */
.lesson-tools {
  max-width: var(--max);
  margin: 64px auto 0;
  padding: 0 24px;
}
.tools-head {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0;
  text-align: center;
}

/* Library section — copy beside a stack of stat cards. */
.library-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.library-shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.library-shot figcaption { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.library-copy h2 { margin-top: 0; }
.lib-points {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 12px;
}
.lib-points li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.5;
}
.lib-points .dot {
  width: 7px; height: 7px;
  background: var(--brass);
  border-radius: 50%;
  margin-top: 8px;
}
.library-stats { display: grid; gap: 16px; }
.stat {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--brass-deep);
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 4px;
}

@media (max-width: 860px) {
  .library-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ==== Hero live-lesson mock (interim; swap for real footage) ===== */
.lessonmock {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, var(--paper-elev), var(--paper));
}
.lm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lm-host {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--brass);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.lm-locks { display: flex; gap: 6px; }
.lm-lock {
  font-size: 10px; font-weight: 600; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--paper-line);
  padding: 4px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.lm-lock::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass); flex: 0 0 auto;
}
.lm-tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  flex: 1 1 auto; min-height: 0;
}
.lm-tile {
  position: relative; margin: 0; border-radius: 14px; overflow: hidden;
  display: flex; align-items: flex-end; min-height: 140px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.lm-tile.teacher { background: radial-gradient(120% 120% at 50% 28%, #e0bdb6, #b5685c); }
.lm-tile.student { background: radial-gradient(120% 120% at 50% 28%, #b3c0de, #5d6e99); }
.lm-avatar {
  position: absolute; top: 50%; left: 50%; width: 46%;
  transform: translate(-50%, -58%); fill: rgba(255, 255, 255, 0.92);
}
.lm-avatar.child { width: 42%; transform: translate(-50%, -52%); }
.lm-ring {
  position: absolute; inset: 0; border: 3px solid var(--brass);
  border-radius: 14px; pointer-events: none;
}
.lm-cap {
  position: relative; z-index: 1; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; color: #fff; font-size: 12px; font-weight: 600;
  background: linear-gradient(0deg, rgba(20, 12, 6, 0.5), transparent);
}
.lm-badge {
  font-size: 9px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, 0.92); padding: 2px 7px;
  border-radius: 999px; white-space: nowrap;
}
.lm-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #6fbf7d;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.lm-score {
  background: var(--paper); border: 1px solid var(--paper-line);
  border-radius: 12px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.lm-score-title { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.lm-staff {
  position: relative; height: 14px; border-radius: 1px; opacity: 0.6;
  background: repeating-linear-gradient(to bottom,
    transparent 0, transparent 2px, var(--ink-muted) 2px,
    var(--ink-muted) 3px, transparent 3px, transparent 6px);
}
.lm-staff.alt { opacity: 0.4; }
.lm-cursor {
  position: absolute; top: -4px; bottom: -4px; left: 30%; width: 3px;
  background: var(--brass); border-radius: 2px;
  box-shadow: 0 0 8px rgba(184, 137, 46, 0.6);
  animation: lm-sweep 4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes lm-sweep { 0% { left: 8%; } 90% { left: 88%; } 100% { left: 88%; opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .lm-cursor { animation: none; left: 30%; } }

/* ==== Differentiator band — "more than a video call" ============= */
.diffband { max-width: none; background: var(--paper-elev); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.diffband > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.diff-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px;
}
.diff {
  background: var(--paper); border: 1px solid var(--paper-line);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column;
}
.diff h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 14px 0 4px; letter-spacing: -0.2px; }
.diff p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.45; }
.diff-viz {
  background: var(--paper-well); border: 1px solid var(--paper-line);
  border-radius: 10px; padding: 12px; min-height: 116px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
/* control viz */
.dv-control { gap: 7px; }
.dv-pill { align-self: flex-start; font-size: 10px; font-weight: 700; color: #fff; background: var(--brass); padding: 4px 10px; border-radius: 999px; }
.dv-chip { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--paper); border: 1px solid var(--paper-line); border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.dv-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); }
.dv-chip.ok::before { background: #6fbf7d; }
/* exercises viz */
.dv-ex { align-items: stretch; }
.dv-q { font-size: 12px; font-weight: 700; color: var(--ink); }
.dv-answers { display: flex; gap: 6px; }
.dv-ans { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--paper); border: 1px solid var(--paper-line); border-radius: 8px; padding: 6px 0; }
.dv-ans.correct { color: #fff; background: #5b8a4a; border-color: transparent; }
.dv-feedback { font-size: 11px; font-weight: 600; color: #5b8a4a; }
/* plan viz */
.dv-plan { gap: 6px; }
.dv-row { font-size: 11px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--paper-line); border-radius: 8px; padding: 6px 9px; }
.dv-row b { color: var(--brass-deep); margin-right: 8px; font-variant-numeric: tabular-nums; }
/* angles viz */
.dv-angles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dv-cam { position: relative; font-size: 10px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #8a94b4, #5d6e99); border-radius: 8px; padding: 14px 8px 6px; min-height: 40px; display: flex; align-items: flex-end; }
.dv-cam:first-child { background: linear-gradient(135deg, #cbab9f, #b5685c); }

@media (max-width: 980px) { .diff-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .diff-grid { grid-template-columns: 1fr; } }

/* ==== Stacked hero with the two-iPad "both screens" duo ========== */
.hero.herostack {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 10px;
  margin-bottom: 56px;
}
.herostack .hero-copy { max-width: 760px; margin: 0 auto; }
.herostack .lede { margin-left: auto; margin-right: auto; }
.herostack .cta-row { justify-content: center; }

.hero-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  max-width: 760px; margin: 12px auto 8px; align-items: start;
}
.duopad { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.duopad .device-frame.ipad { width: 100%; max-width: 330px; }
.duopad figcaption { font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; }

/* Session screenshot framed inside the iPad: compact video strip on top
   (portrait layout) over the real captured score. */
.device-screen.sess { display: flex; flex-direction: column; background: var(--paper); }
.sess-strip {
  display: flex; gap: 6px; align-items: stretch;
  background: rgba(15, 10, 5, 0.92); padding: 6px;
}
.st-tile {
  position: relative; flex: 0 0 auto; width: 74px; height: 50px;
  border-radius: 6px; overflow: hidden;
  display: flex; align-items: flex-end;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.st-tile.student { background: radial-gradient(120% 120% at 50% 30%, #b3c0de, #5d6e99); }
.st-tile.teacher { background: radial-gradient(120% 120% at 50% 30%, #e0bdb6, #b5685c); }
.st-tile.self { width: 50px; background: var(--paper-well); }
.st-ini {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -62%);
  font-weight: 700; color: rgba(255, 255, 255, 0.92); font-size: 13px; white-space: nowrap;
}
.st-tile.self .st-ini { color: var(--ink-muted); font-size: 10px; }
.st-name {
  position: relative; z-index: 1; width: 100%;
  font-size: 9px; font-weight: 600; color: #fff; padding: 2px 5px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent);
}
.st-host {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  font-size: 8px; font-weight: 700; color: #fff; background: var(--brass);
  padding: 1px 6px; border-radius: 999px;
}
.device-screen img.sess-score {
  position: static; opacity: 1;          /* beat generic .device-screen img (absolute/opacity:0) */
  width: 100%; height: auto; flex: 1 1 auto; min-height: 0;
  object-fit: cover; object-position: top center; display: block;
}

@media (max-width: 620px) {
  .hero-duo { grid-template-columns: 1fr; gap: 28px; max-width: 360px; }
}

/* ==== Real two-device hero (teacher iPad + student iPhone) ======= */
.hero-duo.realduo {
  display: flex; gap: 32px; justify-content: center; align-items: flex-end;
  max-width: 900px; margin: 16px auto 8px; grid-template-columns: none;
}
.rd-pad, .rd-phone { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.rd-pad { flex: 0 1 560px; min-width: 0; }
.rd-phone { flex: 0 0 190px; }
.rd-pad figcaption, .rd-phone figcaption {
  font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; max-width: 320px;
}
.lshot img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset,
              0 24px 50px rgba(26,22,17,0.20), 0 0 0 1px rgba(26,22,17,0.10);
}
.pshot img {
  width: 100%; height: auto; display: block; border-radius: 28px;
  box-shadow: 0 24px 50px rgba(26,22,17,0.22), 0 0 0 1px rgba(26,22,17,0.10);
}
@media (max-width: 720px) {
  .hero-duo.realduo { flex-direction: column; align-items: center; gap: 26px; }
  .rd-pad { flex: 0 1 auto; width: 100%; max-width: 520px; }
  .rd-phone { flex: 0 0 auto; max-width: 200px; }
}

/* Real iPhone screenshot inside a feature card — phone peeks up from the
   bottom of the same 16/10 media area the landscape cards use, so rows stay
   even. Shows the top of the screen (header + first items). */
.media-phone {
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, var(--paper-elev), var(--paper-well));
  display: flex; align-items: flex-start; justify-content: center;
  overflow: hidden;
}
.media-phone img {
  width: 58%; height: auto; margin-top: 7%;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(26, 22, 17, 0.22), 0 0 0 1px rgba(26, 22, 17, 0.10);
}
