/* ----------------------------------------- Design Anthology brand fonts --- */
@font-face {
  font-family: "Big Caslon FB";
  src: url("/fonts/bigcaslonfb-regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Big Caslon FB";
  src: url("/fonts/bigcaslonfb-italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Adobe Caslon Pro";
  src: url("/fonts/acaslonpro-italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "URW Classico";
  src: url("/fonts/urwclassico-regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "URW Classico";
  src: url("/fonts/urwclassico-italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --serif: "Big Caslon FB", "Adobe Caslon Pro", Georgia, "Times New Roman",
    serif;
  --sans: "URW Classico", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --ink: #111;
  --muted: #6b6b6b;
  --line: #e2e1df;
  --bg: #f4f3f2;            /* Design Anthology site background (warm light grey) */
  --bg-rgb: 244, 243, 242;
  --accent: #111;
  --chip: #f2f2f2;
  --maxw: 1600px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;   /* disable long-press save on iOS */
  pointer-events: auto;
}

/* ----------------------------------------------------- announcement bar -- */
.announce {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  text-align: center;
}
.announce span { color: rgba(255, 255, 255, 0.88); }
.announce-cta {
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 1px;
  white-space: nowrap;
}
.announce-cta:hover { border-bottom-color: #fff; }

/* ------------------------------------------------------------ intro copy -- */
.intro {
  max-width: 760px;
  margin: 8px 0 36px;
}
.intro h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  margin: 0 0 12px;
  letter-spacing: 0;
}
.intro p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: #333;
}
.intro p:last-child { margin-bottom: 0; }
.intro a {
  color: var(--ink);
  border-bottom: 1px solid #bbb;
  padding-bottom: 1px;
}
.intro a:hover { border-bottom-color: var(--ink); }

/* ---------------------------------------------------------------- header -- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb), 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Design Anthology masthead -> main site */
.masthead-bar {
  display: flex;
  justify-content: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.masthead { display: inline-block; line-height: 0; }
.masthead img {
  height: 46px;
  width: auto;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}
.masthead:hover img { opacity: 1; }
@media (max-width: 520px) { .masthead img { height: 32px; } }
.titlebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1.page-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0;
}
.count-pill {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* filters */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.seg button {
  border: 0;
  background: #fff;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.seg button.active { background: var(--ink); color: #fff; }
.seg button:not(:last-child) { border-right: 1px solid var(--line); }

select.subfilter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  background: #fff;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  max-width: 60vw;
}
input.search {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-family: inherit;
  min-width: 180px;
  flex: 1 1 160px;
  max-width: 320px;
}
input.search:focus, select.subfilter:focus { outline: 1px solid #bbb; }

/* ------------------------------------------------------------------ grid -- */
main { max-width: var(--maxw); margin: 0 auto; padding: 24px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px 20px;
}
.card { cursor: pointer; }
.card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
  overflow: hidden;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .thumb img { transform: scale(1.04); }
.card .chip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.card .meta { padding: 10px 2px 0; }
.card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 3px;
  letter-spacing: 0;
  line-height: 1.25;
}
.card .byline { color: var(--muted); font-size: 13px; }
.card .loc { color: #999; font-size: 12px; margin-top: 2px; }

.empty { color: var(--muted); padding: 60px 0; text-align: center; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

footer.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 60px;
  color: #aaa;
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- detail -- */
.detail-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }
.back { font-size: 13px; color: var(--muted); margin-bottom: 18px;
  display: inline-block; }
.back:hover { color: var(--ink); }
.detail-head { margin-bottom: 22px; }
.detail-head .kicker {
  font-family: var(--serif);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 8px;
}
.detail-head h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 48px); font-weight: 400;
  margin: 0 0 8px; letter-spacing: 0; line-height: 1.08;
}
.detail-head .byline { font-size: 16px; color: var(--ink); }
.detail-head .loc { font-size: 14px; color: var(--muted); margin-top: 2px; }

.gallery { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.gallery img {
  width: 100%; height: auto; background: #f4f4f4; border-radius: 2px;
}
.statements { max-width: 760px; }
.statements p { margin: 0 0 16px; font-size: 16px; line-height: 1.7; }
.credits { color: var(--muted); font-size: 13px; margin-top: 18px; }

.vote-bar {
  position: sticky; bottom: 0; background: rgba(var(--bg-rgb),0.97);
  border-top: 1px solid var(--line); padding: 14px 24px;
  display: flex; justify-content: center; z-index: 40;
  backdrop-filter: blur(8px);
}
.btn {
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 30px; font-size: 15px; font-family: inherit; cursor: pointer;
  letter-spacing: 0.01em;
}
.btn:hover { background: #333; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* ----------------------------------------------------------------- modal -- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  position: relative;
  background: #fff; border-radius: 10px; width: 100%; max-width: 420px;
  padding: 30px 28px 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  padding: 0; margin: 0;
  border: 0; background: none; cursor: pointer;
  font-size: 28px; line-height: 1; color: var(--muted);
  transition: color 0.15s ease;
}
.modal-close:hover { color: var(--ink); }
.modal h2 { margin: 0 32px 6px 0; font-size: 24px; font-weight: 400;
  font-family: var(--serif); }
.modal .sub { color: var(--ink); font-size: 14px; margin-bottom: 16px; }
.signin-note { font-size: 13px; color: var(--muted); line-height: 1.55;
  margin: 0 0 20px; }
.gbtn { display: block; width: 100%; min-height: 44px; }
.gbtn > div { width: 100% !important; }   /* GIS button spans full width */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; margin-bottom: 5px; }
.field input {
  width: 100%; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
}
.field input:focus { outline: 1px solid #999; }
/* honeypot — hidden from humans, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; }
.modal .row { display: flex; gap: 10px; margin-top: 6px; }
.modal .row .btn { flex: 1; }
.msg { font-size: 13px; margin-top: 16px; min-height: 18px; text-align: center;
  line-height: 1.45; }
.msg.err { color: #c0392b; }
.msg.ok { color: #1e8449; }
.captcha-q { font-weight: 600; }

/* ----------------------------------------------------- fade-in on scroll -- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* detail masthead bar */
.detail-masthead {
  display: flex;
  justify-content: center;
  padding: 4px 0 22px;
  margin-bottom: 4px;
}
.detail-masthead img { height: 42px; width: auto; opacity: 0.92; }
