/* ============================================
   THE ELECTORETTE — Design System
   Civic editorial: ballot-notch motif, brick red
   + civic blue on warm paper, Inbox display type
   ============================================ */

@font-face {
  font-family: 'Inbox';
  src: url('./fonts/Inbox-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Color tokens */
  --ink:        #1A1A1A;
  --paper:      #FAF8F4;
  --paper-dim:  #F1ECE2;
  --rule:       #E0D9CC;
  --red:        #B23A2F;
  --red-dim:    #8C2C23;
  --blue:       #2B4C7E;
  --blue-dim:   #1F3760;
  --gray:       #6B6B63;
  --gray-light: #9A9488;
  --white:      #FFFFFF;

  /* Type */
  --display: 'Inbox', 'Arial Narrow', sans-serif;
  --headline: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --grotesk: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --content-width: 760px;
  --wide-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--red); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

/* ---------- Layout shells ---------- */

.shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.shell-wide {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  background: var(--white);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}

.wordmark {
  font-family: var(--display);
  color: var(--ink);
  text-align: center;
  font-size: 34px;
  letter-spacing: 1px;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.wordmark .the {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 5px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}

.header-nav {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 28px;
  font-family: var(--grotesk);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
}

.header-nav a {
  color: var(--gray);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--ink);
  border-color: var(--red);
}

.back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--grotesk);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}
.back-link:hover { color: var(--ink); }

/* ---------- Ballot-notch motif (signature element) ---------- */
/* A square with one corner clipped — referencing a ballot/punch-card
   notch. Used on every piece of episode art across the site. */

.notch {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-dim);
}

.notch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notch::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}

/* ---------- Eyebrow / labels ---------- */

.eyebrow {
  font-family: var(--grotesk);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
}

.meta {
  font-family: var(--grotesk);
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.2px;
}

.meta .dot {
  margin: 0 7px;
  color: var(--gray-light);
}

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn-play {
  background: var(--red);
  color: var(--white);
}
.btn-play:hover { background: var(--red-dim); }
.btn-play:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 80px;
  padding: 40px 24px 60px;
  background: var(--paper-dim);
}

.site-footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-wordmark {
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--grotesk);
  font-size: 13px;
  color: var(--gray);
}
.footer-links a:hover { color: var(--red); }

.footer-note {
  font-family: var(--grotesk);
  font-size: 12px;
  color: var(--gray-light);
  max-width: var(--wide-width);
  margin: 24px auto 0;
  padding: 0 24px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
  font-family: var(--grotesk);
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}


/* ---------- Header search ---------- */
.search-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}
.search-toggle:hover { color: var(--ink); }
.search-toggle svg { width: 17px; height: 17px; }

.header-search {
  border-top: 1px solid var(--rule);
  background: var(--white);
  padding: 22px 24px;
}
.header-search-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--white);
}
.header-search-field:focus-within { border-color: var(--ink); }
.header-search-field svg { width: 16px; height: 16px; color: var(--gray-light); flex-shrink: 0; }
.header-search-field input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--grotesk);
  font-size: 15px;
  color: var(--ink);
}
.header-search-field input:focus { outline: none; }
.header-search-field input::placeholder { color: var(--gray-light); }
.header-search-cancel {
  background: none; border: none; cursor: pointer;
  font-family: var(--grotesk); font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.header-search-cancel:hover { color: var(--red-dim); }


/* ---------- Mobile header: restack to two rows (fixes nav/wordmark overlap) ---------- */
@media (max-width: 700px) {
  .site-header { padding: 12px 16px 10px; }
  .site-header-inner {
    flex-direction: column;
    gap: 9px;
  }
  .wordmark { font-size: 26px; }
  .wordmark .the { font-size: 10px; letter-spacing: 4px; }
  .header-nav {
    position: static;
    transform: none;
    justify-content: center;
    gap: 24px;
  }
  .back-link {
    position: static;
    transform: none;
  }
  .header-search { padding: 14px 16px; }
  .header-about { padding: 18px 16px; }
}
