/* The Great Transformation: the index page.
 *
 * The Industrial Revolution by firelight: Loutherbourg's Coalbrookdale by
 * Night under a veil of soot, text in old parchment, accents the orange
 * of the furnace glow. slides.css shares the palette.
 */

:root {
  --soot: #120d0a;
  --panel: rgba(22, 15, 11, 0.82);
  --text: #ecdfc6;           /* parchment */
  --dim: #b3a183;
  --ember: #e0873a;          /* furnace glow */
  --rust: #8e3b1f;
  --rule: rgba(224, 135, 58, 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, serif;
}

* { box-sizing: border-box; }

html { background: var(--soot); }

body {
  margin: 0;
  color: var(--text);
  font: 1.05rem/1.6 var(--serif);
}

/* The painting lies on a layer fixed to the screen, so "cover" sizes it to
   the screen (iPad and iPhone Safari ignore background-attachment: fixed).
   The veil darkens it most at the bottom, where the list of lectures sits. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 13, 10, 0.35) 0%,
                    rgba(18, 13, 10, 0.7) 45%, rgba(18, 13, 10, 0.9) 100%),
    url("graphics/coalbrookdale.jpg") center 40% / cover no-repeat;
}

a { color: var(--text); text-decoration-color: var(--ember); }
a:hover { color: #fff3dc; }

/* hero */

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 0, 0, 0.6);
}

.kicker {
  margin: 0;
  color: var(--ember);
  font-variant: small-caps;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0.2rem 0 0.4rem;
  font-weight: normal;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 2.2rem;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--dim);
}

blockquote {
  max-width: 40rem;
  margin: 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--ember);
}

blockquote p { margin: 0 0 0.5rem; font-size: 1.12rem; }

cite {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--dim);
}

/* lectures */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

h2 {
  margin: 0 0 1rem;
  font-weight: normal;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--ember);
  border-bottom: 1px solid var(--rule);
}

.decks {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: deck;
}

.decks li {
  counter-increment: deck;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.8rem;
  padding: 0.7rem 1rem 0.7rem 0.7rem;
  background: var(--panel);
  border: 1px solid rgba(224, 135, 58, 0.15);
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
}

.decks li:hover {
  border-color: var(--ember);
  background: rgba(34, 22, 15, 0.9);
}

.decks li > a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.decks img {
  flex: none;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.decks .title {
  display: block;
  font-size: 1.2rem;
  line-height: 1.25;
}

.decks .title::before {
  content: counter(deck) ". ";
  color: var(--ember);
}

.decks .blurb {
  display: block;
  color: var(--dim);
  font-style: italic;
}

.decks .meta {
  font-size: 0.88rem;
  color: var(--dim);
  white-space: nowrap;
}

footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
  font-size: 0.85rem;
  color: var(--dim);
}

footer a { color: var(--dim); }

@media (max-width: 600px) {
  .hero { padding-top: 3rem; }
  .decks li { grid-template-columns: 1fr; }
  .decks img { width: 80px; height: 60px; }
  .decks .meta { padding-left: calc(80px + 1rem); }
}
