@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}

:root {
  --paper: #fff7ed;
  --paper-2: #ffedd5;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7d9c6;
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --accent-soft: #fed7aa;
  --moss: #3f6212;
  --moss-bg: #ecfccb;
  --night: #1c1917;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.1);
  --focus: 0 0 0 3px #fff7ed, 0 0 0 6px #c2410c;
}

* { 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(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* Header */
.site-header {
  background: var(--night); color: #fff7ed;
  border-bottom: 4px solid var(--accent);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: #fff7ed;
  display: grid; place-items: center;
  font-family: "DM Serif Display", Georgia, serif; font-size: 26px;
}
.brand-name { margin: 0; font-family: "DM Serif Display", Georgia, serif; font-size: 22px; letter-spacing: 0.2px; }
.brand-sub { margin: 0; font-size: 13px; opacity: 0.75; }
.header-meta { text-align: right; }
.weekend-dates { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 14px; }
.header-note { margin: 2px 0 0; font-size: 13px; opacity: 0.75; }

/* Hero */
.hero {
  max-width: 1180px; margin: 0 auto; padding: 28px 20px 8px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: center;
}
.kicker {
  display: inline-block; margin: 0 0 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--night); color: #fde68a; padding: 6px 10px; border-radius: 999px;
}
.hero h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.02; margin: 0 0 12px; font-weight: 400;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 17px; color: var(--muted); max-width: 52ch; margin: 0 0 16px; }
.hero-facts { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-facts li {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 14px; box-shadow: var(--shadow);
}
.hero-facts strong { color: var(--accent-dark); }
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%; height: 320px; object-fit: cover; border-radius: 20px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-figure figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Controls */
.controls-wrap {
  max-width: 1180px; margin: 18px auto 0; padding: 0 20px;
}
.controls {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 16px; padding: 16px;
  align-items: end;
}
.control label, .saved-label {
  display: block; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.control input[type="search"], .control select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  border: 2px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff;
}
.control input[type="search"]:focus, .control select:focus { border-color: var(--accent); }
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
#saved-filter {
  font: inherit; font-weight: 700; font-size: 15px;
  border: 2px solid var(--night); background: #fff; color: var(--night);
  border-radius: 999px; padding: 10px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
#saved-filter .heart { color: var(--accent); font-size: 17px; line-height: 1; }
#saved-filter[aria-pressed="true"] { background: var(--night); color: #fde68a; }
#saved-filter[aria-pressed="true"] .heart { color: #fb7185; }
.result-count { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); margin: 10px 2px 0; }

/* Cards */
main { max-width: 1180px; margin: 0 auto; padding: 14px 20px 10px; }
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.card-img { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-row { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-family: "IBM Plex Mono", monospace; font-size: 12px;
  padding: 4px 9px; border-radius: 999px; background: rgba(28,25,23,0.88); color: #fff;
}
.badge.free { background: var(--moss); }
.badge.saved { background: var(--accent); }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.day-line { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.card h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 23px; line-height: 1.15; margin: 0; }
.meta { margin: 0; font-size: 14px; color: var(--muted); }
.summary { margin: 0; font-size: 15px; }
.card-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding-top: 8px; }
.price { font-weight: 800; font-size: 15px; }
.price small { font-weight: 400; color: var(--muted); }
.btn {
  font: inherit; font-weight: 700; border-radius: 999px; cursor: pointer;
  padding: 10px 16px; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; border-color: var(--night); color: var(--night); }
.btn-ghost:hover { background: var(--night); color: #fff; }

/* Empty */
.empty {
  border: 2px dashed var(--accent); border-radius: var(--radius);
  background: #fff; padding: 34px 22px; text-align: center; margin-top: 14px;
}
.empty h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; margin: 0 0 8px; font-size: 30px; }
.empty p { color: var(--muted); margin: 0 0 16px; }

/* About + footer */
.about {
  margin: 26px 0; background: var(--night); color: #ffedd5;
  border-radius: var(--radius); padding: 22px;
}
.about h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; margin: 0 0 10px; font-size: 26px; }
.about ol { margin: 0 0 10px 20px; padding: 0; }
.about li { margin-bottom: 6px; }
.fine-print { font-size: 13px; opacity: 0.8; }
.site-footer {
  border-top: 1px solid var(--line); padding: 18px 20px 30px;
  max-width: 1180px; margin: 0 auto; color: var(--muted); font-size: 14px;
}
.site-footer p { margin: 4px 0; }

/* Dialog / detail */
dialog#detail-dialog {
  border: none; border-radius: 20px; padding: 0; max-width: 680px; width: calc(100% - 32px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
dialog#detail-dialog::backdrop { background: rgba(28,25,23,0.6); backdrop-filter: blur(2px); }
.detail { padding: 0; }
.detail-img { position: relative; margin: 0; }
.detail-img img { width: 100%; height: 240px; object-fit: cover; display: block; border-radius: 20px 20px 0 0; }
.detail-img figcaption { font-size: 12px; color: var(--muted); padding: 6px 22px 0; }
.detail-body { padding: 18px 22px 22px; }
.detail-kicker { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.detail h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.08; margin: 0 0 10px; }
.detail-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px;
  font-size: 14.5px;
}
.detail-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.detail-meta dd { margin: 0 0 6px; }
.detail-prose p { margin: 0 0 12px; font-size: 16px; }
.access-note { background: var(--moss-bg); border-left: 5px solid var(--moss); border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: 14.5px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
#detail-slot .btn[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fde68a; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure img { height: 220px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .controls { grid-template-columns: 1fr 1fr; }
  .control-saved { grid-column: 1 / -1; }
  .header-meta { text-align: left; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-img img { height: 180px; }
}
