/* Drawn to Matter: the plate house style for the web. Tokens from design-system/tokens.json. */
:root {
  --cream: #F1E6CF;
  --paper: #F7EFDD;
  --ink: #1D3557;
  --ink-deep: #12233D;
  --ink-soft: #3D5F86;
  --orange: #DE5B1F;
  --mustard: #E8A33D;
  --suit: #FBF6EA;
  --font: "Jost", Futura, "Century Gothic", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 1120px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--cream); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream); padding: 8px 16px;
}
.skip:focus { left: 16px; top: 16px; z-index: 10; }

/* Type */
.label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
}
.fig {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px;
  margin: 0 0 32px;
}
.fig .label { white-space: nowrap; }
.fig h2 {
  margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 400; letter-spacing: 0.06em; line-height: 1.25;
}
h1, h3 { font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 2.2vw, 21px); max-width: 38em; }
.accent { color: var(--orange); }

/* The plate: heavy outer rule, hairline inner rule 12px inside it. */
.plate {
  position: relative;
  border: 3px solid var(--ink);
  padding: 12px;
}
.plate > .plate-inner {
  position: relative;
  border: 1.2px solid var(--ink);
  overflow: hidden;
  height: 100%;
}

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand span { font-weight: 600; letter-spacing: 0.2em; font-size: 15px; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); }
.site-nav a:not(.button) { text-decoration: none; }
.site-nav a:not(.button):hover { text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 680px) {
  .site-nav a:not(.button) { display: none; }
  .brand span { display: none; }
}

.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--cream);
  border: 3px solid var(--ink);
  padding: 10px 20px;
  font: 600 13px/1 var(--font); letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.button:hover { background: var(--cream); color: var(--ink); }
.button .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--cream); }

/* Hero */
.hero { padding: 8px 0 72px; }
.hero .plate { aspect-ratio: 16 / 9; }
@media (max-width: 760px) { .hero .plate { aspect-ratio: 4 / 5; } }
.hero .plate-inner { display: grid; place-items: center; }
.hero .stars { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .orbit ellipse {
  fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 2 18; vector-effect: non-scaling-stroke;
  animation: drift 40s linear infinite;
}
@keyframes drift { to { stroke-dashoffset: -400; } }
.hero .astronaut {
  position: absolute; z-index: 1; width: clamp(100px, 14%, 180px);
  right: 5%; bottom: 4%;
  animation: float 9s ease-in-out infinite;
}
.hero .planet { position: absolute; z-index: 1; width: clamp(90px, 16%, 210px); left: 7%; top: 12%; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-3deg); }
}
.hero-text { position: relative; text-align: center; padding: 0 24px; background: var(--cream); padding: 20px 28px; }
.hero h1 { font-size: clamp(32px, 7vw, 84px); letter-spacing: 0.08em; }
.hero .rule { width: 160px; height: 0; border-top: 2px solid var(--ink); margin: 20px auto; }
.hero .tagline { margin: 0; }
@media (max-width: 760px) {
  .hero .astronaut { right: 6%; bottom: 4%; width: 26%; }
  .hero .planet { left: 6%; top: 6%; width: 30%; }
}

.hero-caption { margin: 20px 0 0; }
.hero-caption p { font-size: clamp(18px, 2.4vw, 24px); letter-spacing: 0.05em; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Sections */
section.block { padding: 72px 0; border-top: 1.2px solid var(--ink); }

/* Plates (episodes) */
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.episode .plate-inner {
  aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--cream);
}
.episode .art { width: 46%; margin-top: 16px; }
.episode svg.art { width: 70%; }
/* A 16:9 YouTube thumbnail fills the plate. */
.episode .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.episode .status {
  position: absolute; top: 14px; left: 16px; z-index: 1; color: var(--ink);
  background: var(--cream); padding: 4px 8px 4px 0;
}
.episode .meta { padding-top: 16px; }
.episode h3 { font-size: 24px; margin: 6px 0 8px; }
.episode .meta p { margin: 0; }
.episode .number { color: var(--ink-soft); }

/* Method */
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 48px; }
.method h3 { font-size: 20px; margin: 14px 0 8px; }
.method p { margin: 0; }
.mark { width: 56px; height: 56px; }

/* Topics */
.topics-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 760px) { .topics-layout { grid-template-columns: 1fr; } }
.topics { list-style: none; margin: 0; padding: 0; }
.topics li {
  display: flex; gap: 20px; align-items: baseline;
  padding: 16px 0; border-bottom: 1.2px solid var(--ink);
}
.topics li:first-child { border-top: 1.2px solid var(--ink); }
.topics .label { min-width: 3.2em; color: var(--ink-soft); }
.topics strong { font-weight: 600; }
.topics-art { max-width: 360px; margin: 0 auto; }

/* Subscribe band: the night plate */
.night-band { background: var(--ink-deep); color: var(--cream); padding: 80px 0; }
.night-band .plate, .night-band .plate > .plate-inner { border-color: var(--cream); }
.night-band .plate-inner { padding: clamp(28px, 6vw, 64px); text-align: center; }
.night-band h2 { font-size: clamp(28px, 5vw, 52px); font-weight: 600; letter-spacing: 0.04em; line-height: 1.1; margin: 0 0 16px; }
.night-band p { max-width: 34em; margin: 0 auto 28px; }
.night-band .button { background: var(--cream); color: var(--ink-deep); border-color: var(--cream); }
.night-band .button:hover { background: transparent; color: var(--cream); }

/* Footer */
.site-footer { padding: 48px 0 56px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer .seal { width: 96px; height: 96px; border-radius: 50%; }
.site-footer .colophon { display: flex; align-items: center; gap: 20px; }
.site-footer p { margin: 0; font-size: 15px; }
.site-footer nav { display: flex; gap: 24px; }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); }
.lost .plate { width: min(720px, 100%); }
.lost .plate-inner { padding: clamp(32px, 7vw, 72px); text-align: center; }
.lost img { width: 140px; margin: 0 auto 24px; }
.lost h1 { font-size: clamp(28px, 5vw, 44px); margin-bottom: 12px; }
