/* ─── StateFace font ────────────────────────────────────────── */
@font-face {
  font-family: 'StateFaceRegular';
  src: url('vendor/stateface/font/webfont/stateface-regular-webfont.woff') format('woff'),
       url('vendor/stateface/font/webfont/stateface-regular-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ─── Spectral font ─────────────────────────────────────────── */
@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('vendor/spectral/fonts/webfonts/Spectral-MediumItalic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 19px; }
:root { --font-serif: 'Spectral', Georgia, "Times New Roman", serif; }

body {
  background: #f7f4ef;
  color: #1c1c1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Access Gate ──────────────────────────────────────────── */
.access-gate {
  position: fixed;
  inset: 0;
  background: #f7f4ef;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 999;
}

.access-gate__card {
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid #e0dbd2;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.access-gate__card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.access-gate__card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.access-gate__card label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin-bottom: 0.35rem;
}

.access-gate__card input {
  width: 100%;
  border: 1px solid #ccc6bb;
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.access-gate__card button {
  border: 1px solid #8b6f47;
  background: #8b6f47;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
}

.access-gate__card button:hover {
  background: #7a6140;
}

.access-gate__error {
  margin-top: 0.6rem;
  color: #a33;
  font-size: 0.85rem;
}

/* ─── Header ───────────────────────────────────────────────── */
header {
  background: #1c1c1c;
  color: #f7f4ef;
  padding: 2.5rem 1rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-text {
  flex: 1 1 0;
  min-width: 0;
}

.header-cover {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.cover-img {
  width: 150px;
  display: block;
  border: 1px solid #444;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}


header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #f7f4ef;
}

.intro-text {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.125rem;
  color: #d4cbbf;
  max-width: 720px;
  line-height: 1.72;
}

.intro-text + .intro-text {
  margin-top: 0.75rem;
}

.intro-text a {
  color: #c8b89a;
  text-underline-offset: 2px;
}

.intro-text a:hover {
  color: #f7f4ef;
}

.stat-line {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-weight: 400;
  line-height: 1.4;
  color: #f5c842;
}

/* ─── Main ─────────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 1.5rem;
}

/* ─── Filters ──────────────────────────────────────────────── */
.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 1.25rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-group label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  white-space: nowrap;
}

.filter-group input,
.filter-group select {
  border: 1px solid #ccc6bb;
  border-radius: 4px;
  padding: 0.42rem 0.65rem;
  font-size: 0.9rem;
  background: #fff;
  color: #1c1c1c;
  min-width: 160px;
  transition: border-color 0.15s;
}

.filter-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.filter-note__clear {
  border: none;
  background: none;
  color: #6b5a43;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.filter-note__clear:hover {
  color: #1c1c1c;
}

.filter-or {
  font-size: 0.8rem;
  color: #7b6d58;
}

.filter-back {
  margin: 1.5rem 0 0;
  border: 1px solid #c7bba7;
  background: #f6efe4;
  color: #6b5a43;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  margin-right: auto;
}

.filter-back:hover {
  background: #ebe1d2;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: #8b6f47;
  outline: 2px solid #8b6f47;
  outline-offset: 1px;
}

.filter-count {
  font-size: 0.8rem;
  color: #666;
  margin-left: auto;
  align-self: flex-end;
  white-space: nowrap;
}

/* ─── Day Sections ─────────────────────────────────────────── */
.stories-list {
  padding-bottom: 1rem;
  max-width: 740px;
}

.day-section {
  margin-bottom: 3rem;
}

.day-header {
  border-top: 2px solid #1c1c1c;
  padding-top: 0.8rem;
  padding-bottom: 1rem;
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0;
  background: #f7f4ef;
  z-index: 20;
  /* Fade edge so cards slide cleanly underneath */
  box-shadow: 0 8px 16px 4px #f7f4ef;
}

.day-header--first {
  margin-top: 0.5rem;
}

.day-ordinal {
  font-size: 2rem;
  font-weight: 700;
  color: #8b6f47;
  line-height: 1.4;
  margin-bottom: 0;
}

.day-sep {
  color: #bbb;
  font-size: 1.2rem;
  margin: 0 0.4rem;
}

.day-subline {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: wrap;
}

.day-date {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  color: #1c1c1c;
  font-weight: 400;
}

/* ─── Story Cards ──────────────────────────────────────────── */
.day-cards {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.story-card {
  background: #fff;
  border: none;
  border-radius: 0;
  border-top: 1px solid #ede7dc;
  padding: 1.1rem 1.25rem 1rem;
}

/* ─── Card Dateline ────────────────────────────────────────── */
.card-dateline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.state-icon {
  font-family: 'StateFaceRegular', sans-serif;
  font-size: 1.08em;
  line-height: 1;
  color: #888;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.3em;
}

.card-place {
  font-size: 0.82rem;
  font-weight: 700;
  color: #444;
}


/* ─── Card Body ────────────────────────────────────────────── */
.card-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.72;
  color: #1c1c1c;
}

.card-citation {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #767676;
  line-height: 1.4;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  font-size: 0.93rem;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ─── Stories Epilogue ─────────────────────────────────────── */
.stories-epilogue {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: #1c1c1c;
  color: #d4cbbf;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.72;
}

.stories-epilogue p + p {
  margin-top: 1rem;
}

/* Width matches the content above */
.stories-epilogue {
  max-width: 740px;
}

/* ─── Credits ──────────────────────────────────────────────── */
.credits {
  max-width: 740px;
  margin: 2.5rem 0 0.8rem;
  padding: 0 0.5rem 0 0;
  color: #5b5b5b;
}

.credits h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.credits-subhead {
  font-size: 0.78rem;
  font-weight: 700;
  color: #666;
  margin: 1.1rem 0 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid #e4ddd3;
}

.credits-subhead:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.credits-block {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #5b5b5b;
  margin: 0 0 1.1rem;
}

.credits-block strong {
  font-weight: 800;
  color: #4a3d2a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
}

.credits-block a {
  color: #8b6f47;
  text-underline-offset: 2px;
}

.credits-block a:hover {
  color: #1c1c1c;
}

/* ─── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Header */
  header { padding: 1.5rem 1rem; }
  .header-inner { flex-direction: column; }
  .header-cover { display: none; }
  .header-cover {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 1.25rem;
  }
  .cover-img { width: 80px; }

  /* Filters */
  .day-subline { flex-direction: column; gap: 0.15rem; }
  .filter-group input,
  .filter-group select { min-width: 0; flex: 1; }
  .filters { flex-wrap: wrap; }

}

/* ─── Footer ───────────────────────────────────────────────── */
footer {
  background: #1c1c1c;
  color: #888;
  padding: 1.5rem 1rem;
  margin-top: 1rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.8rem;
  line-height: 1.7;
}

.footer-inner p + p { margin-top: 0.35rem; }

.footer-inner a {
  color: #c8b89a;
  text-underline-offset: 2px;
}

.footer-inner a:hover {
  color: #f7f4ef;
}
