/* Landing page for the course decks.
   Palette and fonts come from the Slidev theme (vars.css + fonts.css are
   copied into the build next to this file), so the index and the decks stay
   in step automatically. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--rust-fg);
  background: var(--rust-bg);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rust-link);
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- nav ----------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.nav-brand img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-brand span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rust-fg-muted);
}

.nav-links {
  display: flex;
  gap: 1.6rem;
}

.nav-links a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rust-fg);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.nav-links a:hover {
  border-bottom-color: var(--rust-yellow);
}

/* --- header -------------------------------------------------------- */

.hero {
  padding: 2rem 0 4rem;
}

.hero h1 {
  font-family: 'Alfa Slab One', ui-serif, Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.6rem, 11vw, 6.5rem);
  line-height: 1;
  margin: 0 0 1.2rem;
  color: var(--rust-black);
}

.hero p {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  font-weight: 300;
  line-height: 1.25;
  margin: 0;
  max-width: 22ch;
}

.hero .sub {
  font-size: 1rem;
  color: var(--rust-fg-muted);
  margin-top: 1.4rem;
  max-width: 52ch;
  font-weight: 400;
}

/* --- colour bands -------------------------------------------------- */

.band {
  padding: 3.2rem 0 3.6rem;
  scroll-margin-top: 0;
}

.band-green {
  background: var(--rust-green);
  --band-accent: var(--rust-purple);
  color: #fff;
}

.band-purple {
  background: var(--rust-purple);
  --band-accent: var(--rust-crimson);
  color: #fff;
}

.band-ink {
  background: var(--rust-ink);
  --band-accent: var(--rust-yellow);
  color: #fff;
}

.band h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0;
  display: inline-block;
  letter-spacing: -0.01em;
}

.band h2::after {
  content: '';
  display: block;
  height: 7px;
  width: calc(100% + 1.4rem);
  margin-top: 0.4rem;
  background: var(--band-accent);
}

.band-note {
  margin: 1.4rem 0 0;
  opacity: 0.85;
  max-width: 54ch;
}

/* --- chapter cards ------------------------------------------------- */

.decks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.deck {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(255, 255, 255, 0.09);
  border-top: 5px solid var(--band-accent);
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease, transform 0.12s ease;
}

.deck:hover,
.deck:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.deck:focus-visible {
  box-shadow: 0 0 0 3px var(--rust-yellow);
}

.deck-n {
  font-family: 'Source Code Pro', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.deck-title {
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.22;
}

.deck-meta {
  font-family: 'Source Code Pro', ui-monospace, monospace;
  font-size: 0.72rem;
  opacity: 0.6;
  margin-top: auto;
  padding-top: 0.5rem;
}

.empty {
  margin-top: 1.6rem;
  opacity: 0.8;
  font-style: italic;
}

/* --- footer -------------------------------------------------------- */

.foot {
  background: var(--rust-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.4rem 0 2.8rem;
  font-size: 0.88rem;
}

.foot a {
  color: var(--rust-yellow);
}

.foot-links {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .nav {
    justify-content: center;
    text-align: center;
  }
  .hero {
    padding: 1rem 0 2.6rem;
  }
}
