/* ==========================================================================
   XO — Course page. Extends styles.css; same tokens, same look as xoaii-v2.
   ========================================================================== */

/* ── Nav (mirrors components/marketing/Nav.tsx) ── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgb(var(--ink-0) / 0.6);
  border-bottom: 1px solid rgb(var(--line) / 0.04);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand img { width: 34px; height: 34px; }
.nav__back { font-size: 14px; color: rgb(var(--fg-muted)); }
.nav__back:hover { color: rgb(var(--fg)); }
.nav__price { font-size: 13px; color: rgb(var(--fg-muted)); }
.nav__price s { color: rgb(var(--fg-dim)); }
@media (max-width: 640px) { .nav__price { display: none; } }

body { padding-top: 64px; }

/* ── Course hero ── */
.chero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vh, 72px); }
.chero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/course/ai-journey.webp') center / cover no-repeat;
  opacity: 0.25;
}
.chero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(var(--ink-0)) 0%, rgb(var(--ink-0) / 0.6) 50%, rgb(var(--ink-0)) 100%);
}
.chero__card { border-radius: 18px; padding: clamp(20px, 4vw, 40px); max-width: 1100px; margin-inline: auto; }
.chero__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .chero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; } }

.chero__cover { order: -1; }
@media (min-width: 1024px) { .chero__cover { order: 0; } }
.chero__cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 30px 90px -25px rgba(212,175,55,0.35);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 22px; }
.chips span {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.07);
}

.outcomes { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .outcomes { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.outcomes li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.75; }
.outcomes li::before { content: '✓'; color: rgb(var(--accent-gold)); flex-shrink: 0; }

.label-gold { font-size: 12px; font-weight: 600; color: rgb(var(--accent-gold)); margin-bottom: 12px; }

/* ── Price block ── */
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.price__now { font-size: clamp(2rem, 7vw, 2.75rem); font-weight: 800; }
.price__unit { color: rgb(var(--fg-muted)); }
.price__was {
  color: rgb(var(--fg-dim));
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.85);
  text-decoration-thickness: 2px;
}
.price__off {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.35);
  color: #22c55e;
}
.price__note { font-size: 13px; color: rgb(var(--fg-muted)); margin-top: 10px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ── Stat band ── */
.band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .band { grid-template-columns: repeat(4, 1fr); } }
.band > div { border-radius: 18px; padding: 22px 14px; text-align: center; }
.band b { display: block; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; }
.band span { display: block; margin-top: 4px; font-size: 12px; color: rgb(var(--fg-muted)); }

/* ── Chapter cards (mirrors ChapterCards.tsx) ── */
.chapters { display: grid; gap: 20px; margin-top: 48px; }
@media (min-width: 640px)  { .chapters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .chapters { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .chapters { grid-template-columns: repeat(4, 1fr); } }

.chapter { border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s cubic-bezier(0.25,0.46,0.45,0.94); }
.chapter:hover { transform: translateY(-6px); }
.chapter__cover { position: relative; aspect-ratio: 1; overflow: hidden; }
.chapter__cover img { width: 100%; height: 100%; object-fit: cover; }
.chapter__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(var(--ink-0) / 0.9) 0%, transparent 55%);
}
.chapter__meta { position: absolute; bottom: 12px; inset-inline: 16px; display: flex; align-items: flex-end; justify-content: space-between; z-index: 1; }
.chapter__meta .eyebrow { font-size: 10px; padding: 4px 10px; }
.chapter__en { font-size: 11px; color: rgb(var(--fg-muted)); direction: ltr; }
.chapter__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.chapter__body h4 { font-size: 1.125rem; margin-bottom: 8px; }
.chapter__body p { font-size: 13px; color: rgb(var(--fg-muted)); line-height: 1.8; margin-bottom: 16px; flex: 1; text-align: justify; }
.chapter__topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chapter__topics li { font-size: 12px; display: flex; gap: 8px; }
.chapter__topics li::before { content: '✓'; color: rgb(var(--accent-gold)); }

/* ── Syllabus accordion ── */
.syllabus { display: grid; gap: 12px; max-width: 900px; margin: 40px auto 0; }

.ch { border-radius: 18px; overflow: hidden; }
.ch__head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.ch__num {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.07);
  font-size: 18px;
  font-weight: 800;
  /* Solid gold, not .text-accent-gradient — this element owns a background,
     which would override the gradient the clip needs and blank the digit. */
  color: rgb(var(--accent-gold-bright));
}
.ch__title { flex: 1; min-width: 0; }
.ch__title strong { display: block; font-size: 16px; font-weight: 700; }
.ch__title span { display: block; font-size: 12px; color: rgb(var(--fg-muted)); margin-top: 2px; }
.ch__count { font-size: 12px; color: rgb(var(--fg-dim)); white-space: nowrap; }
@media (max-width: 520px) { .ch__count { display: none; } }
.ch__chev { flex-shrink: 0; color: rgb(var(--fg-dim)); transition: transform 0.25s; }
.ch[open] .ch__chev { transform: rotate(-180deg); }
.ch__head::-webkit-details-marker { display: none; }
summary.ch__head { list-style: none; }
summary.ch__head::marker { content: ''; }

.ch__inner { padding: 4px 20px 22px; border-top: 1px solid rgb(var(--line) / 0.05); }
.ch__group { margin-top: 18px; }
.ch__group h5 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: rgb(var(--accent-gold)); }
.ch__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
@media (min-width: 768px) { .ch__list { grid-template-columns: 1fr 1fr; column-gap: 20px; } }
.ch__list li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.8; color: rgb(var(--fg)); }
.ch__list li i {
  flex-shrink: 0;
  width: 20px;
  font-style: normal;
  font-size: 11px;
  color: rgb(var(--fg-dim));
  padding-top: 3px;
}
.ch__list--soft li { color: rgb(var(--fg-muted)); }

/* Counts stand in for exercise/template titles — the titles themselves give
   away the deliverable, the numbers only give away the volume. */
.ch__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ch__chips span {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.07);
  color: rgb(var(--fg));
}

/* ── Includes grid ── */
.includes { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px)  { .includes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .includes { grid-template-columns: repeat(3, 1fr); } }
.include { border-radius: 18px; padding: 22px; }
.include__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.25); margin-bottom: 14px; }
.include h4 { font-size: 15px; margin-bottom: 6px; }
.include p { font-size: 13px; color: rgb(var(--fg-muted)); line-height: 1.85; text-align: justify; }

/* ── FAQ ── */
.faq { display: grid; gap: 10px; max-width: 800px; margin: 36px auto 0; }
.faq details { border-radius: 14px; overflow: hidden; }
.faq summary { padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: rgb(var(--accent-gold)); font-size: 20px; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: '−'; }
.faq p { padding: 0 20px 18px; font-size: 14px; color: rgb(var(--fg-muted)); line-height: 1.95; text-align: justify; }

/* ── Final CTA ── */
.final { border-radius: 18px; padding: clamp(28px, 5vw, 52px); text-align: center; max-width: 860px; margin-inline: auto; }
.final .price { justify-content: center; margin-block: 22px 4px; }
.final .cta-row { justify-content: center; }

/* ── Section heads ── */
.sec-head { text-align: center; max-width: 700px; margin-inline: auto; }
.sec-head h2 { margin-top: 16px; }
.sec-head p { margin-top: 14px; color: rgb(var(--fg-muted)); font-size: 15px; line-height: 1.9; }

/* Sticky mobile buy bar */
.buybar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px clamp(14px, 4vw, 20px);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgb(var(--ink-0) / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(212,175,55,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}
.buybar__price { flex: 1; min-width: 0; line-height: 1.3; }
.buybar__price b { display: block; font-size: 17px; font-weight: 800; }
.buybar__price s { font-size: 12px; color: rgb(var(--fg-dim)); text-decoration-color: rgba(239,68,68,0.85); }
.buybar .btn { flex-shrink: 0; }
@media (min-width: 1024px) { .buybar { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: 76px; } }
