@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Franklin:ital,wght@0,700;0,800;1,700&display=swap");

:root {
  --ink: #14243b;
  --muted: #687383;
  --paper: #f5f3ee;
  --white: #fff;
  --red: #b72735;
  --blue: #244d82;
  --line: #d8d5ce;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #f2b544;
  outline-offset: 3px;
}

.site-header {
  min-height: 82px;
  padding: 14px max(28px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--white);
  border-bottom: 5px solid var(--red);
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 50%;
}
.brand-mark::before {
  content: "";
  width: 28px;
  height: 28px;
  display: block;
  background: var(--paper);
  mask: url("/favicon.svg") center / contain no-repeat;
  -webkit-mask: url("/favicon.svg") center / contain no-repeat;
}
.brand strong { display: block; font-size: 15px; letter-spacing: 1.8px; }
.brand small { display: block; margin-top: 3px; color: #cbd2db; font-size: 11px; letter-spacing: .4px; }
.site-header nav { display: flex; align-items: center; gap: 26px; }
.site-header nav a, .about-button {
  padding: 8px 0;
  color: var(--white);
  background: none;
  border: 0;
  text-decoration: none;
  font-weight: 600;
}

.archive-intro {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 330px;
  padding: 70px 28px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .72fr);
  gap: 80px;
  align-items: end;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
h1, h2 { font-family: "Libre Franklin", Arial, sans-serif; letter-spacing: 0; }
h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(46px, 5vw, 76px);
  line-height: .98;
}
.intro-copy {
  margin: 0 0 5px;
  color: #4e5b6b;
  font-size: 18px;
  line-height: 1.6;
}
.archive-shell {
  padding: 0 max(28px, calc((100vw - var(--max)) / 2)) 90px;
}
.archive-tools {
  position: sticky;
  z-index: 5;
  top: 0;
  margin: 0 -28px;
  padding: 18px 28px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: end;
  gap: 18px;
  background: rgba(245,243,238,.96);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.search {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 17px;
  background: var(--white);
  border: 1px solid #babec4;
  border-radius: 4px;
}
.search span { color: var(--blue); font-size: 28px; line-height: 1; transform: rotate(-18deg); }
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 400;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.tool-row { display: flex; align-items: end; gap: 10px; }
.tool-row label { display: grid; gap: 5px; position: relative; }
.tool-row label::after {
  content: "";
  position: absolute;
  right: 17px;
  bottom: 24px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.tool-row label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
select {
  appearance: none;
  -webkit-appearance: none;
  font-size: 16px;
  font-weight: 400;
  height: 52px;
  min-width: 190px;
  padding: 0 38px 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #babec4;
  border-radius: 4px;
}
.clear-button {
  height: 52px;
  padding: 0 16px;
  color: var(--blue);
  background: transparent;
  border: 1px solid transparent;
  font-weight: 700;
}
.archive-meta {
  padding: 25px 0 20px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.archive-meta p { margin: 0; }
.archive-meta strong { color: var(--ink); }

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 22px;
}
.story-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}
.portrait-wrap {
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #d7d9d8;
  border-radius: 4px;
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(transparent, rgba(9,18,31,.64));
}
.portrait-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 350ms ease;
}
.story-card:hover .portrait-wrap img { transform: scale(1.025); }
.card-place {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 14px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.play-mark {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 13px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border-radius: 50%;
  font-size: 12px;
}
.card-copy { padding: 15px 2px 0; }
.card-copy h2 {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 21px;
  line-height: 1.08;
}
.card-copy p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.empty-state { padding: 90px 20px; text-align: center; }
.empty-state h2 { margin: 0 0 8px; font-size: 30px; }
.empty-state p { margin: 0; color: var(--muted); }
.load-more-wrap { padding-top: 46px; text-align: center; }
.load-more {
  min-width: 210px;
  height: 50px;
  padding: 0 24px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 3px;
  font-weight: 700;
}

dialog {
  padding: 0;
  border: 0;
  border-radius: 5px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
dialog::backdrop { background: rgba(8,15,24,.76); backdrop-filter: blur(3px); }
.story-dialog { width: min(980px, calc(100vw - 36px)); max-height: calc(100vh - 24px); background: #0d1725; }
.dialog-close {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(10,18,29,.78);
  border: 0;
  border-radius: 50%;
  font-size: 28px;
}
.story-dialog-layout {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(330px, 1fr);
  min-height: min(760px, calc(100vh - 24px));
  justify-content: center;
}
.dialog-media {
  width: 100%;
  min-height: 0;
  aspect-ratio: 9 / 16;
  align-self: center;
  background: #050a11;
}
.dialog-media img, .dialog-media iframe { width: 100%; height: 100%; display: block; object-fit: cover; border: 0; }
.dialog-copy { min-width: 0; max-height: calc(100vh - 24px); overflow: auto; padding: 70px 48px 40px; background: var(--white); }
.dialog-place { margin: 0 0 22px; color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.dialog-copy h2 { margin: 0; font-size: 42px; line-height: 1.02; }
.dialog-byline { margin: 15px 0 32px; color: var(--muted); }
.dialog-description { color: #4f5b68; line-height: 1.65; }
.dialog-copy dl { margin: 34px 0; border-top: 1px solid var(--line); }
.dialog-copy dl div { padding: 12px 0; display: grid; grid-template-columns: 90px 1fr; border-bottom: 1px solid var(--line); }
.dialog-copy dt { color: var(--muted); font-size: 12px; }
.dialog-copy dd { margin: 0; font-size: 12px; font-weight: 700; }
.watch-button {
  width: 100%;
  height: 52px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 3px;
  font-weight: 700;
}
.about-dialog { width: min(760px, calc(100vw - 36px)); max-height: calc(100vh - 36px); overflow: auto; padding: 60px; background: var(--white); }
.about-dialog .dialog-close { color: var(--ink); background: #ece9e2; }
.about-dialog h2 { margin: 0 0 24px; font-size: 42px; line-height: 1.05; }
.about-dialog p { color: #4f5b68; font-size: 17px; line-height: 1.7; }
.about-sections {
  margin: 34px 0;
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-sections a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.about-dialog section { margin-top: 30px; }
.about-dialog h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.about-dialog section p { margin: 0 0 12px; }
@media (max-width: 1050px) {
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-tools { grid-template-columns: 1fr; }
  .tool-row { justify-content: flex-start; flex-wrap: wrap; }
  .story-dialog { width: min(840px, calc(100vw - 30px)); }
}
@media (max-width: 720px) {
  .site-header { min-height: 70px; }
  .site-header nav a { display: none; }
  .brand small { display: none; }
  .archive-intro { min-height: 300px; padding-top: 48px; grid-template-columns: 1fr; gap: 25px; }
  h1 { font-size: 48px; }
  .archive-tools { position: static; }
  .tool-row { display: grid; grid-template-columns: 1fr 1fr; }
  .clear-button { grid-column: 1 / -1; }
  select { width: 100%; min-width: 0; }
  .archive-meta { gap: 12px; }
  .archive-meta p:last-child { display: none; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card-copy h2 { font-size: 17px; }
  .story-dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
  .story-dialog-layout { grid-template-columns: 1fr; min-height: auto; }
  .dialog-media { width: min(100%, 420px); max-height: 68vh; margin: 0 auto; }
  .dialog-copy { max-height: none; padding: 38px 25px 28px; }
  .dialog-copy h2 { font-size: 34px; }
  .about-dialog { padding: 42px 24px; }
}
@media (max-width: 430px) {
  .tool-row { grid-template-columns: 1fr; }
  .clear-button { width: 100%; }
  .archive-shell { padding-left: 16px; padding-right: 16px; }
  .archive-tools { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .portrait-wrap { aspect-ratio: 3 / 4; }
}
