/* Horizonte — longform macro editorial
   Palette: editorial plum/burgundy
   deep plum #3a1f2d · muted gold #b08a3e · warm paper #f5f0e6 · dark brown text #241a17
*/

:root {
  --plum: #3a1f2d;
  --plum-soft: #5a3344;
  --gold: #b08a3e;
  --gold-soft: #c9a85c;
  --paper: #f5f0e6;
  --paper-deep: #ece4d3;
  --ink: #241a17;
  --ink-soft: #4a3b36;
  --ink-faint: #6b5a52;
  --rule: #d9cdb6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Helvetica Neue", "Avenir Next", Avenir, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.wrap-narrow { max-width: 760px; }

a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }

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

/* ---------- Header ---------- */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.05);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--plum);
  line-height: 1;
}
.brand-tag {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 5px;
}

/* nav */
.nav-primary { display: flex; align-items: center; gap: 26px; }
.nav-primary a {
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-primary a:hover, .nav-primary a[aria-current="page"] {
  color: var(--plum);
  border-bottom-color: var(--gold);
}

/* theme toggle */
.tog {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tog:hover { background: var(--paper-deep); color: var(--plum); }

/* hamburger */
.menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; padding: 0;
}
.menu-btn span {
  display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px auto;
  transition: transform .2s, opacity .2s;
}

/* ---------- Hero / lead ---------- */
.lead {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.lead-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.lead-eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.lead h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--plum);
  margin: 0 0 18px;
}
.lead .dek {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 0 22px;
}
.lead .dek a { font-weight: 600; }
.byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.byline strong { color: var(--ink-soft); font-weight: 600; }
.lead-art { border-radius: 4px; box-shadow: 0 18px 40px -22px rgba(58,31,45,.5); }

/* ---------- Section heads ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 64px 0 28px; padding-bottom: 14px;
  border-bottom: 2px solid var(--plum);
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--plum);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head a {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--gold);
}

/* ---------- Stream (homepage vertical reading) ---------- */
.stream { padding-bottom: 40px; }
.stream-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule);
}
.stream-item:last-child { border-bottom: none; }
.stream-thumb {
  width: 220px; height: 150px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper-deep);
}
.stream-thumb svg { width: 100%; height: 100%; }
.cat {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: inline-block;
}
.stream-item h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.stream-item h3 a { color: var(--ink); text-decoration: none; }
.stream-item h3 a:hover { color: var(--plum); }
.stream-item p { margin: 0 0 12px; color: var(--ink-soft); font-size: 1.02rem; }
.read-meta { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); }
.read-meta .dot { margin: 0 8px; opacity: .5; }

/* ---------- Card grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: #fbf8f0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 14px 30px -22px rgba(58,31,45,.55);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -24px rgba(58,31,45,.6); }
.card-thumb { width: 100%; aspect-ratio: 16/9; background: var(--paper-deep); }
.card-thumb svg { width: 100%; height: 100%; }
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 {
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.25; margin: 0 0 8px;
}
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--plum); }
.card-body p { margin: 0 0 14px; font-size: 0.95rem; color: var(--ink-soft); flex: 1; }

/* ---------- Article (wide magazine) ---------- */
.article { padding: 48px 0 30px; }
.article .wrap-narrow { padding: 0 28px; }
.article-hero { width: 100%; max-height: 420px; overflow: hidden; border-radius: 4px; margin: 26px 0 8px; }
.article-hero svg { width: 100%; height: 100%; }
.figcap { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); margin: 0 0 32px; }

.article h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--plum);
  margin: 8px 0 16px;
}
.article .dek {
  font-size: 1.18rem; color: var(--ink-soft); margin: 0 0 22px; line-height: 1.5;
}
.article .byline { font-size: 0.84rem; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }

.prose { margin-top: 34px; font-size: 1.16rem; line-height: 1.78; color: var(--ink); }
.prose p { margin: 0 0 1.5em; }
.prose h2 {
  font-family: var(--serif); font-size: 1.5rem; color: var(--plum);
  margin: 1.8em 0 0.5em; letter-spacing: -0.01em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--plum-soft);
  font-size: 1.18rem;
}
.prose blockquote cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--sans); font-size: 0.82rem; color: var(--ink-faint); }
.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: var(--plum); text-decoration-color: var(--gold); }

.pullquote {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--plum);
  text-align: center;
  margin: 2em auto;
  max-width: 30ch;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.1em 0;
  font-style: italic;
}

/* article tags / footer */
.article-foot { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--rule); }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tag {
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--ink-soft); background: var(--paper-deep);
  padding: 5px 12px; border-radius: 30px; text-decoration: none;
}
.tag:hover { background: var(--gold); color: #fff; }

/* author chip */
.author-chip { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.author-chip img, .author-chip svg { width: 54px; height: 54px; border-radius: 50%; }
.author-chip .nm { font-family: var(--sans); font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.author-chip .bio { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); }

/* related */
.related { padding: 30px 0 60px; }

/* ---------- Editor's note ---------- */
.editors-note {
  background: var(--plum);
  color: var(--paper);
  border-radius: 6px;
  padding: 42px 48px;
  margin: 56px 0;
  box-shadow: 0 20px 44px -26px rgba(58,31,45,.7);
}
.editors-note .lead-eyebrow { color: var(--gold-soft); }
.editors-note p { font-size: 1.06rem; line-height: 1.7; color: #efe6d4; }
.editors-note p:last-child { margin-bottom: 0; }
.editors-note strong { color: #fff; }
.editors-note a { color: var(--gold-soft); }

/* ---------- Generic page header ---------- */
.page-head { padding: 54px 0 30px; border-bottom: 1px solid var(--rule); }
.page-head h1 {
  font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--plum); margin: 4px 0 12px; letter-spacing: -0.015em;
}
.page-head p { color: var(--ink-soft); font-size: 1.08rem; max-width: 56ch; margin: 0; }

.page-body { padding: 36px 0 30px; font-size: 1.1rem; line-height: 1.75; }
.page-body h2 { font-family: var(--serif); color: var(--plum); margin: 1.6em 0 .4em; font-size: 1.35rem; }
.page-body p { margin: 0 0 1.2em; color: var(--ink); }
.page-body ul { padding-left: 1.3em; }
.page-body li { margin-bottom: .5em; }

/* article listing */
.list-row {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 28px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.list-row .date { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); white-space: nowrap; }
.list-row h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 6px; }
.list-row h3 a { color: var(--ink); text-decoration: none; }
.list-row h3 a:hover { color: var(--plum); }
.list-row p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.cat-filter a {
  font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 7px 16px; border-radius: 30px; border: 1px solid var(--rule);
  color: var(--ink-soft); text-decoration: none; background: var(--paper);
}
.cat-filter a:hover, .cat-filter a.active { background: var(--plum); color: var(--paper); border-color: var(--plum); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; margin-top: 28px; }
.contact-card {
  background: #fbf8f0; border: 1px solid var(--rule); border-radius: 6px;
  padding: 28px 30px; box-shadow: 0 14px 30px -22px rgba(58,31,45,.5);
}
.contact-card a.email { font-size: 1.15rem; color: var(--plum); font-weight: 600; }

/* ---------- Footer ---------- */
.site-foot { background: var(--plum); color: #ddd2c6; margin-top: 70px; padding: 56px 0 30px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-foot h4 {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-soft); margin: 0 0 16px;
}
.site-foot a { color: #ddd2c6; text-decoration: none; }
.site-foot a:hover { color: #fff; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 9px; font-family: var(--sans); font-size: 0.9rem; }
.site-foot .brand-word { color: #fff; }
.site-foot .brand-tag { color: var(--gold-soft); }
.site-foot .blurb { font-size: 0.9rem; line-height: 1.6; color: #c8baab; max-width: 32ch; }
.site-foot .legal {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 42px; padding-top: 22px;
  font-family: var(--sans); font-size: 0.78rem; color: #a99a8c;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; left: 20px; right: 20px; bottom: 18px;
  max-width: 460px;
  background: #fff; border: 1px solid var(--rule);
  border-radius: 6px; padding: 18px 22px;
  box-shadow: 0 18px 40px -18px rgba(36,26,23,.5);
  font-family: var(--sans); font-size: 0.84rem; color: var(--ink-soft);
  z-index: 80; display: none; line-height: 1.5;
}
.cookie.show { display: block; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cookie a { color: var(--plum); }
.cookie .row { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cookie button {
  font-family: var(--sans); font-size: 0.82rem; cursor: pointer;
  border-radius: 30px; padding: 8px 18px; border: 1px solid var(--plum);
}
.cookie .accept { background: var(--plum); color: #fff; }
.cookie .decline { background: transparent; color: var(--plum); }

/* ---------- Dark theme ---------- */
body.dark { background: #1c1216; color: #e9ddcb; }
body.dark .site-head { background: #1c1216; border-bottom-color: #3a2630; }
body.dark .brand-word { color: #f0e3cd; }
body.dark .nav-primary a { color: #c8b8a6; }
body.dark .nav-primary a:hover, body.dark .nav-primary a[aria-current="page"] { color: var(--gold-soft); border-bottom-color: var(--gold); }
body.dark .tog { border-color: #3a2630; color: #c8b8a6; }
body.dark .lead h1, body.dark .page-head h1, body.dark .article h1, body.dark .section-head h2, body.dark .prose h2, body.dark .page-body h2 { color: #f0e3cd; }
body.dark .stream-item h3 a, body.dark .card-body h3 a, body.dark .list-row h3 a { color: #e9ddcb; }
body.dark .stream-item p, body.dark .card-body p, body.dark .lead .dek, body.dark .page-head p, body.dark .article .dek, body.dark .list-row p { color: #b6a692; }
body.dark .card, body.dark .contact-card { background: #251a1f; border-color: #3a2630; }
body.dark .rule, body.dark .stream-item, body.dark .list-row { border-color: #3a2630; }
body.dark .stream-item, body.dark .list-row { border-bottom-color: #3a2630; }
body.dark .section-head { border-bottom-color: var(--gold); }
body.dark .article .byline, body.dark .article-foot { border-color: #3a2630; }
body.dark .editors-note { background: #2a1a23; }
body.dark .page-body p, body.dark .prose { color: #e9ddcb; }
body.dark .tag { background: #2a1a23; color: #c8b8a6; }
body.dark .cat-filter a { background: #251a1f; color: #c8b8a6; border-color: #3a2630; }
body.dark .byline, body.dark .read-meta, body.dark .list-row .date, body.dark .figcap { color: #9a8a78; }
body.dark .menu-btn span { background: #e9ddcb; }
body.dark a { color: var(--gold-soft); }
body.dark .site-foot { background: #150d11; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .lead-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-foot .cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 18px; }
  .nav-primary {
    position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: var(--paper); flex-direction: column; align-items: flex-start;
    padding: 90px 32px 32px; gap: 0; transform: translateX(100%);
    transition: transform .26s ease; box-shadow: -20px 0 50px -20px rgba(0,0,0,.3);
    z-index: 60;
  }
  body.dark .nav-primary { background: #1c1216; }
  .nav-primary.open { transform: translateX(0); }
  .nav-primary a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
  .menu-btn { display: block; z-index: 70; }
  .nav-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .stream-item { grid-template-columns: 1fr; gap: 16px; }
  .stream-thumb { width: 100%; height: 190px; }
  .grid-3 { grid-template-columns: 1fr; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .list-row { grid-template-columns: 1fr; gap: 10px; }
  .list-row .date { order: 3; }
  .editors-note { padding: 30px 26px; }
  .lead { padding: 38px 0 28px; }
  .section-head { margin: 44px 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
