/* ============================================================
   HauntLaw — shared stylesheet
   Plain CSS. No build step. Drop into any static-HTML host.
   ============================================================ */

:root {
  --forest: #253D30;
  --forest-deep: #1a2c22;
  --forest-shadow: #0f1c14;
  --pumpkin: #B85C2A;
  --pumpkin-faded: #a55427;
  --olive: #6B6B3A;
  --olive-dim: #56582d;
  --brown: #3B2214;
  --brown-deep: #2a1810;
  --cream: #DDD0A8;
  --cream-warm: #e6dab6;
  --cream-deep: #d4c598;
  --paper: #ece0bb;
  --ink: #1c1410;
  --rule: rgba(28,20,16,0.22);

  --f-head: "Old Standard TT", "Playfair Display", Georgia, serif;
  --f-display: "Playfair Display", "Old Standard TT", serif;
  --f-body: "Cormorant Garamond", "Old Standard TT", Georgia, serif;
  --f-mono: "Special Elite", "DM Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--pumpkin); }

/* ── Candle cursor — applied to <body class="candle"> ───── */
.candle, .candle * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='32' viewBox='0 0 24 32'><defs><radialGradient id='g' cx='50%25' cy='40%25' r='60%25'><stop offset='0%25' stop-color='%23fff7c2'/><stop offset='40%25' stop-color='%23d99a4d'/><stop offset='100%25' stop-color='%23b85c2a' stop-opacity='0'/></radialGradient></defs><ellipse cx='12' cy='12' rx='7' ry='10' fill='url(%23g)'/><path d='M12 4 C 15 9 16 14 12 19 C 8 14 9 9 12 4 Z' fill='%23d99a4d'/><path d='M12 8 C 14 11 14 14 12 17 C 10 14 10 11 12 8 Z' fill='%23a8451a'/></svg>") 12 12, auto;
}

/* ── Twilight grain & vignette ─────────────────────────── */
.grain { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/></svg>");
  opacity: 0.14; mix-blend-mode: multiply; z-index: 50;
}
.vignette { position: relative; }
.vignette::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 49;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(15,12,8,0.35) 100%);
}

/* ── Top utility bar ───────────────────────────────────── */
.utility {
  background: var(--brown-deep); color: var(--cream);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 1.5px;
  padding: 7px 56px;
  display: flex; justify-content: space-between;
  border-bottom: 1px solid rgba(221,208,168,0.15);
}
.utility .est { opacity: 0.7; }

/* ── Top nav ───────────────────────────────────────────── */
.topnav {
  background: var(--brown); color: var(--cream);
  padding: 18px 56px;
  display: flex; justify-content: center; gap: 38px;
  font-family: var(--f-head); font-size: 17px; letter-spacing: 0.4px;
  flex-wrap: wrap;
}
.topnav a {
  color: var(--cream); text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 3px;
  transition: border-color .15s, color .15s;
}
.topnav a:hover, .topnav a.active {
  border-bottom-color: var(--pumpkin);
}

/* ── Page title strip (for inner pages) ────────────────── */
.page-strip {
  background: var(--forest-shadow); color: var(--cream);
  padding: 64px 56px 56px;
  border-bottom: 4px solid var(--pumpkin);
  position: relative; overflow: hidden;
}
.page-strip .inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }
.page-strip .eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 4px;
  text-transform: uppercase; color: var(--pumpkin); margin-bottom: 18px;
}
.page-strip h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 78px; line-height: 0.95; letter-spacing: -1.5px;
  margin: 0; color: var(--cream-warm);
  text-shadow: 0 4px 18px rgba(0,0,0,0.7);
}
.page-strip h1 i { color: #e8b34a; }
.page-strip .lede {
  font-family: var(--f-body); font-size: 22px; line-height: 1.5;
  margin-top: 22px; max-width: 760px; color: var(--cream);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--f-head);
  padding: 14px 22px; font-size: 15px; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none;
  transition: transform .15s, background .15s, color .15s;
}
.btn-pumpkin {
  background: var(--pumpkin); color: var(--cream-warm);
  border: 1.5px solid var(--pumpkin);
}
.btn-pumpkin:hover { background: #c96930; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1.5px solid var(--cream); border-style: double; border-width: 3px;
}
.btn-ghost:hover { background: var(--cream); color: var(--brown-deep); }

/* ── Section header ────────────────────────────────────── */
.section { padding: 84px 56px 64px; }
.section .inner { max-width: 1280px; margin: 0 auto; }
.section .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 44px; border-bottom: 1px solid var(--rule); padding-bottom: 18px;
  flex-wrap: wrap; gap: 16px;
}
.section .head .eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 3px;
  color: var(--pumpkin); text-transform: uppercase; margin-bottom: 8px;
}
.section .head h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 60px; margin: 0; line-height: 0.95;
  letter-spacing: -1.5px; color: var(--ink);
}
.section .head h2 i { font-style: italic; }
.section .head .more {
  font-family: var(--f-head); font-size: 15px;
  color: var(--pumpkin); text-decoration: underline; text-underline-offset: 4px;
}

/* ── Footer ────────────────────────────────────────────── */
footer.site {
  background: var(--brown-deep); color: var(--cream);
  padding: 64px 56px 28px;
  font-family: var(--f-body); font-size: 16px;
  border-top: 6px double var(--pumpkin);
}
footer.site .cols {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(221,208,168,0.18);
}
footer.site h4 {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--pumpkin);
  margin: 0 0 16px;
}
footer.site .brand {
  font-family: var(--f-display); font-size: 32px; line-height: 1;
  letter-spacing: -1px; margin-bottom: 12px; color: var(--cream-warm);
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 10px; }
footer.site a { color: var(--cream); text-decoration: none; }
footer.site a:hover { color: var(--pumpkin); }
footer.site .meta {
  max-width: 1280px; margin: 24px auto 0;
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; opacity: 0.65;
}

/* ── Card grid (used for reading-list, ref-mat, blog index) ─ */
.cards { display: grid; gap: 24px; }
.cards.cols-2 { grid-template-columns: 1fr 1fr; }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--cream-warm); padding: 26px;
  border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: var(--ink);
  transition: transform .2s, box-shadow .2s, background .2s;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15,12,8,0.18);
  background: var(--cream-deep);
}
.card .meta-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
}
.card .topic { color: var(--pumpkin); text-transform: uppercase; }
.card .source { color: var(--forest); }
.card h3 {
  font-family: var(--f-head); font-weight: 700; font-size: 22px;
  margin: 0; line-height: 1.15;
}
.card .summary { font-size: 15px; line-height: 1.55; margin: 0; color: rgba(28,20,16,0.85); }
.card .read-more { font-family: var(--f-head); font-size: 14px; color: var(--pumpkin); margin-top: auto; }

/* ── Topic index (Essential Reading style — group by topic) ─ */
.topic-block { margin-bottom: 64px; }
.topic-block h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 38px; margin: 0 0 6px; letter-spacing: -0.5px;
  border-bottom: 2px solid var(--pumpkin);
  padding-bottom: 10px; display: inline-block;
}
.topic-block .topic-rule {
  height: 1px; background: var(--rule); margin-bottom: 24px;
}

/* ── Case row (alternative dense list) ─────────────────── */
.case-row {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--ink);
  transition: padding .15s;
}
.case-row:hover { padding-left: 8px; padding-right: 8px; background: rgba(184,92,42,0.04); }
.case-row-meta {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 10px;
}
.case-row-meta .case-row-topic { color: var(--pumpkin); }
.case-row-meta .case-row-year { color: var(--forest); opacity: 0.75; }
.case-row-title {
  font-family: var(--f-head); font-size: 22px; font-weight: 700;
  line-height: 1.25; margin-bottom: 6px; color: var(--ink);
}
.case-row-tagline {
  font-family: var(--f-body); font-style: italic; font-size: 19px;
  line-height: 1.4; margin-bottom: 10px; color: rgba(28,20,16,0.78);
}
.case-row-summary {
  font-family: var(--f-body); font-size: 15px; line-height: 1.65;
  color: rgba(28,20,16,0.65);
}

/* ── Individual case page tagline ──────────────────────── */
.case-tagline {
  font-family: var(--f-body); font-style: italic;
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.4; margin: 10px 0 0; opacity: 0.85;
}

/* ── Long-form prose (blog posts, about, disclaimer) ───── */
.prose { max-width: 760px; margin: 0 auto; padding: 64px 56px; }
.prose h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 56px; line-height: 1; letter-spacing: -1.5px;
  margin: 0 0 16px;
}
.prose .byline {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--pumpkin); margin-bottom: 36px;
}
.prose p {
  font-size: 19px; line-height: 1.65; margin: 0 0 22px;
  text-wrap: pretty;
}
.prose p:first-of-type::first-letter {
  font-family: var(--f-display); font-size: 78px; line-height: 0.85;
  float: left; padding: 6px 12px 0 0; color: var(--pumpkin);
  font-weight: 700;
}
.prose h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 32px; margin: 48px 0 14px; letter-spacing: -0.5px;
}
.prose h3 {
  font-family: var(--f-head); font-weight: 700;
  font-size: 22px; margin: 34px 0 10px;
}
.prose strong { font-weight: 700; color: var(--brown-deep); }
.prose blockquote {
  font-family: var(--f-display); font-style: italic;
  font-size: 28px; line-height: 1.3; color: var(--brown-deep);
  border-left: 4px solid var(--pumpkin);
  margin: 36px 0; padding: 8px 0 8px 28px;
}
.prose ul, .prose ol { font-size: 19px; line-height: 1.65; padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose hr {
  border: none; height: 0;
  border-top: 1px dashed var(--rule); margin: 48px 0;
}

/* ── Filter bar (cases, essential reading) ─────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 36px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.filter-bar .label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink); opacity: 0.7;
  align-self: center; margin-right: 12px;
}
.filter-bar button {
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink); padding: 8px 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-bar button:hover { border-color: var(--pumpkin); color: var(--pumpkin); }
.filter-bar button.active {
  background: var(--pumpkin); color: var(--cream-warm);
  border-color: var(--pumpkin);
}

/* ── Stat strip ────────────────────────────────────────── */
.stat-strip {
  background: var(--brown-deep); color: var(--cream);
  padding: 24px 56px;
  border-bottom: 1px solid rgba(221,208,168,0.15);
}
.stat-strip .inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat-strip .stat { padding: 0 22px; border-right: 1px solid rgba(221,208,168,0.18); }
.stat-strip .stat:last-child { border-right: none; }
.stat-strip .n {
  font-family: var(--f-display); font-size: 56px; line-height: 1;
  letter-spacing: -1.5px; color: var(--cream-warm);
}
.stat-strip .l {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; margin-top: 6px; opacity: 0.7;
}

/* ── Hero (home page) ──────────────────────────────────── */
.hero {
  position: relative; background: var(--forest-shadow);
  color: var(--cream); overflow: hidden; min-height: 560px;
}
.hero .art {
  position: absolute; inset: 0;
}
.hero .body {
  position: relative; z-index: 5;
  padding: 120px 56px 130px; max-width: 1280px; margin: 0 auto;
}
.hero .grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 48px; align-items: end;
}
.hero .eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 4px;
  text-transform: uppercase; color: var(--pumpkin); margin-bottom: 22px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.hero h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 102px; line-height: 0.95; margin: 0;
  letter-spacing: -2px; color: var(--cream-warm);
  text-shadow: 0 4px 24px rgba(0,0,0,0.85), 0 0 60px rgba(0,0,0,0.6);
}
.hero h1 i { color: #e8b34a; }
.hero .lede {
  font-family: var(--f-body); font-size: 22px; line-height: 1.5;
  max-width: 600px; margin-top: 28px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
}
.hero .actions { display: flex; gap: 14px; margin-top: 38px; }
.hero .seal { justify-self: end; margin-bottom: 8px; }
.hero .caption {
  position: absolute; bottom: 18px; left: 56px; z-index: 6;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  color: var(--cream); opacity: 0.55;
}

/* ── Pillar cards (home: 4 pillars) ─────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }

/* ── Latest blog teaser (home) ─────────────────────────── */
.blog-teaser {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.blog-teaser article {
  background: var(--cream-warm); padding: 32px;
  border-left: 4px solid var(--pumpkin);
  display: flex; flex-direction: column; gap: 14px;
}
.blog-teaser .date {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--pumpkin);
}
.blog-teaser h3 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 28px; line-height: 1.1; margin: 0;
}
.blog-teaser h3 a { color: var(--ink); text-decoration: none; }
.blog-teaser h3 a:hover { color: var(--pumpkin); }
.blog-teaser p { font-size: 16px; line-height: 1.55; margin: 0; }

/* ── Contact form ──────────────────────────────────────── */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px;
  color: var(--pumpkin);
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px;
  font-family: var(--f-body); font-size: 17px;
  background: var(--cream-warm);
  border: 1px solid var(--rule); border-radius: 0;
  color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus {
  outline: 2px solid var(--pumpkin); outline-offset: -2px;
}
.form-row textarea { min-height: 160px; resize: vertical; }

/* ── Door swing animation ──────────────────────────────── */
.hl-door {
  transform-origin: var(--hinge-x, 1140px) 321px;
  transform-box: view-box;
  animation: door-swing 11s ease-in-out infinite;
}
@keyframes door-swing {
  0%   { transform: scaleX(0.82); }
  45%  { transform: scaleX(0.44); }
  58%  { transform: scaleX(0.44); }
  100% { transform: scaleX(0.82); }
}

/* ── Print ─────────────────────────────────────────────── */
@media print {
  .grain::after, .vignette::before { display: none; }
  .topnav, footer.site, .candle * { cursor: auto !important; }
  .page-strip { background: var(--brown-deep); }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 980px) {
  .utility, .topnav, .section, .page-strip, .hero .body { padding-left: 24px; padding-right: 24px; }
  .hero h1 { font-size: 64px; }
  .hero .grid { grid-template-columns: 1fr; }
  .hero .seal { justify-self: start; }
  .section .head h2, .page-strip h1 { font-size: 44px; }
  .pillars, .cards.cols-4, .cards.cols-3 { grid-template-columns: 1fr 1fr; }
  .blog-teaser { grid-template-columns: 1fr; }
  .stat-strip .inner { grid-template-columns: 1fr 1fr; }
  .stat-strip .stat:nth-child(2) { border-right: none; }
  .case-row-title { font-size: 19px; }
  .case-row-tagline { font-size: 16px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .topnav { gap: 18px; font-size: 14px; }
  .pillars, .cards.cols-4, .cards.cols-3, .cards.cols-2 { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; }
  .stat-strip .inner { grid-template-columns: 1fr; }
  .stat-strip .stat { border-right: none; border-bottom: 1px solid rgba(221,208,168,0.15); padding: 12px 0; }
}
