/* =============================================
   QT Academy - the home page
   =============================================
   Loaded after academy.css, which supplies the Academy palette. This file only
   lays out academy-home.html; the course player has its own theme.
   ============================================= */

.ac-home {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 36px) 96px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vw, 52px);
}

.ac-loading {
  color: var(--color-text-muted, #8f97b5);
  font-size: 0.95rem;
}

.ac-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.7rem;
}

:root { --ac-gold: #d9b871; --ac-gold-dim: #8a7444; }

.ac-section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.005em;
  margin: 0 0 1rem;
}

/* ---- Hero: the one thing to do next ---- */
.ac-hero {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-accent) 16%, var(--color-surface)),
    var(--color-surface) 65%);
  border: 1px solid var(--color-divider-strong);
  border-radius: 14px;
  padding: clamp(22px, 4vw, 38px);
}

.ac-hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  text-wrap: balance;
}

.ac-hero-sub {
  color: var(--color-text-muted, #8f97b5);
  font-size: 0.92rem;
  margin: 0 0 1.4rem;
}

.ac-hero-go { text-decoration: none; }

.ac-hero-progress {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted, #8f97b5);
  margin: 1.1rem 0 0;
}

/* Only drawn for a reader with no account, so it sits under the progress line as a note rather
   than a prompt: quieter than the count above it, and set in the body face so it reads as a
   sentence instead of as another piece of instrumentation. */
.ac-hero-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-muted, #8f97b5);
  margin: 0.45rem 0 0;
  max-width: 44ch;
}

.ac-about-text {
  margin: 0;
  line-height: 1.65;
  color: var(--color-text-muted, #b4bad2);
  max-width: 62ch;
}

/* A book's heading carries its size, so two books are comparable at a glance. */
.ac-book-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ac-book-head .ac-section-title { margin-bottom: 0.5rem; margin-right: auto; }

/* Cover art, one square per book. The image carries the book's own title, so the heading
   beside it stays the plain "Book Five" rather than repeating it. */
.ac-book-head:has(.ac-book-cover) { align-items: center; }

.ac-book-cover {
  flex: none;
  align-self: center;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md, 12px);
}

.ac-book-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #8f97b5);
}

.ac-book-sub {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ---- The arcs ---- */
.ac-arc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ac-arc {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.ac-arc:hover {
  border-color: var(--color-accent);
  transform: translateX(2px);
}

.ac-arc.is-done { border-left: 3px solid var(--color-pos); }

.ac-arc-num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--ac-gold);
  text-align: center;
}

.ac-arc-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ac-arc-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.ac-arc-blurb {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted, #8f97b5);
}

.ac-arc-bar {
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  overflow: hidden;
  margin-top: 2px;
}

.ac-arc-fill {
  display: block;
  height: 100%;
  background: var(--color-accent);
}

.ac-arc-state {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8f97b5);
  white-space: nowrap;
}

/* ---- Cast ---- */
.ac-cast-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ac-cast-member {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.ac-cast-role {
  font-size: 0.74rem;
  color: var(--color-text-muted, #8f97b5);
  padding-left: 0.25rem;
}

@media (max-width: 560px) {
  .ac-arc { grid-template-columns: 34px 1fr; }
  .ac-arc-state { grid-column: 2; }
}

/* Slots for the books that do not exist yet. Deliberately muted and non-interactive - they
   show the shape of the series without pretending to be something you can open. */
.ac-coming { opacity: 0.72; }

.ac-coming-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.ac-coming-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 14px;
  padding: 16px 18px;
  border: 1px dashed var(--color-divider);
  border-radius: var(--radius-md, 12px);
  background: transparent;
}

.ac-coming-num {
  grid-row: 1 / span 2;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink3, var(--ink2));
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

/* The cover takes the number's place when one exists - it already says BOOK SIX on it. */
.ac-coming-cover {
  grid-row: 1 / span 2;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm, 8px);
}

.ac-coming-title {
  margin: 0;
  font-size: 16px;
  font-weight: var(--font-heading-weight);
  color: var(--ink2);
}

.ac-coming-when {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3, var(--ink2));
  opacity: 0.8;
}

.ac-coming-blurb {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink3, var(--ink2));
}

.ac-coming-state {
  grid-column: 2;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink3, var(--ink2));
  opacity: 0.75;
}

/* The hero's cover. The book you are in, at a size that makes the page feel like a shelf
   rather than a list of links - which was the note: it looked flat. */
.ac-hero-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--ac-gold-dim);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.ac-hero-copy { min-width: 0; }

/* Gold hairlines under the section headings, the way the covers rule off their titles. */
.ac-book-head { border-bottom: 1px solid color-mix(in srgb, var(--ac-gold) 22%, transparent); padding-bottom: 10px; }

.ac-shelf-num { color: var(--ac-gold); }

.ac-arc-num { opacity: 0.9; }

.ac-eyebrow { color: var(--ac-gold); }

@media (max-width: 560px) {
  .ac-hero { grid-template-columns: minmax(0, 1fr); }
  .ac-hero-cover { max-width: 240px; justify-self: center; }
}

/* Books not started collapse to one row each. The shelf above already shows their covers,
   so repeating them with a full arc list made the page long and said nothing new. */
.ac-shelf-blurb { margin: 0 0 4px; }

.ac-book-row-list { display: flex; flex-direction: column; gap: 10px; }

.ac-book-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 16px;
  padding: 12px 16px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md, 12px);
  text-decoration: none;
  color: inherit;
}

.ac-book-row:hover { border-color: color-mix(in srgb, var(--ac-gold) 40%, transparent); }

.ac-book-row-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink2);
}

.ac-book-row-sub { color: var(--color-text-muted, #b4bad2); font-size: 14px; }

@media (max-width: 560px) {
  .ac-book-row { grid-template-columns: minmax(0, 1fr); }
}
