/* Herd of Horns — herdofhorns.com
   One stylesheet, no build step, no JavaScript. Sections are strata: bands of
   bone and bog with irregular edges, deepest layer last. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/fonts/BricolageGrotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/Alegreya-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/Alegreya-Italic-latin.woff2") format("woff2");
}

:root {
  --bone: #e4d9bd;
  --bone-2: #d2c49f;
  --bone-3: #bfaf86;
  --bog: #1b221a;
  --bog-2: #273122;
  --fern: #66772a;
  --fern-bright: #aab85e;
  --ochre: #c98a2e;
  --ochre-deep: #a06d1c;
  --rust: #8f3a1e;
  --ink: #241f17;
  --ink-2: #5a5244;
  --on-bog: #e9e0c8;
  --on-bog-2: #b7ad93;

  --display: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.15rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--fern); text-decoration-thickness: 1.5px; text-underline-offset: 0.15em; }
a:hover { color: var(--rust); }
/* Links that leave the site open a new tab; say so to assistive tech, invisibly
   (the box is hidden by the .visually-hidden rule below). */
a[target="_blank"]::after { content: " (opens in a new tab)"; }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 92%;
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem); letter-spacing: -0.005em; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.visually-hidden,
a[target="_blank"]::after {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--bog);
  color: var(--on-bog);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding-block: 18px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 128px; height: auto; }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.site-nav a {
  font-family: var(--display);
  font-stretch: 94%;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--on-bog);
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--fern-bright); border-bottom-color: var(--fern-bright); }

/* ---------- Hero ---------- */

.hero {
  background: var(--bog);
  color: var(--on-bog);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  align-items: center;
  gap: 32px;
  min-height: min(84vh, 860px);
  padding-block: 48px 72px;
}
.hero-copy { position: relative; z-index: 1; }
.hero-logo { width: min(100%, 540px); height: auto; margin-bottom: 28px; }
.hero-title {
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 790;
  font-size: clamp(1.9rem, 1rem + 3.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero-lede {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  max-width: 48ch;
  color: var(--on-bog);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 18px;
}
.hero-note {
  font-style: italic;
  color: var(--on-bog-2);
  max-width: 48ch;
}

.hero-art {
  position: relative;
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 560px;
}
.hero-art img {
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-stretch: 94%;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1;
  padding: 16px 22px;
  border-radius: 4px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--ochre); color: var(--bog); border-color: var(--ochre); }
.btn-primary:hover { background: var(--ochre-deep); border-color: var(--ochre-deep); color: var(--bog); }
.btn-outline { color: var(--on-bog); border-color: var(--bone-3); background: transparent; }
.btn-outline:hover { color: var(--bog); background: var(--bone); border-color: var(--bone); }
.btn-outline-dark { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-outline-dark:hover { color: var(--bone); background: var(--ink); border-color: var(--ink); }

/* ---------- Strata ---------- */

.stratum { padding-block: clamp(56px, 8vw, 110px); }
.stratum-bone { background: var(--bone); color: var(--ink); }
.stratum-bog { background: var(--bog); color: var(--on-bog); }
.stratum-bog a { color: var(--fern-bright); }
.stratum-bog a:hover { color: var(--ochre); }
.stratum-bog p { color: var(--on-bog); }

/* The irregular edge between two strata. The svg's fill is the colour of the
   stratum it belongs to; it sits on top of the previous one. */
.edge {
  display: block;
  width: 100%;
  height: clamp(22px, 3.2vw, 44px);
  margin-bottom: -1px;
}
.edge svg { display: block; width: 100%; height: 100%; }
.edge-bone { background: var(--bog); color: var(--bone); }
.edge-bog { background: var(--bone); color: var(--bog); }
.edge-bone svg, .edge-bog svg { fill: currentColor; }

.section-intro { margin-bottom: clamp(28px, 4vw, 48px); }
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.two-col h2 { max-width: 14ch; }

.bleed {
  margin: clamp(40px, 6vw, 80px) 0 0;
  width: 100%;
}
.bleed img { width: 100%; height: auto; }
.bleed figcaption, .figure figcaption {
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 10px var(--gutter) 0;
  font-style: italic;
}
.stratum-bog .figure figcaption { color: var(--on-bog-2); }

/* ---------- Species plate ---------- */

.plate {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.plate li {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--bone-3);
}
.plate li:nth-child(odd) { padding-right: clamp(20px, 3vw, 44px); }
.plate li:nth-child(even) { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid var(--bone-3); }
.plate-intro { margin-bottom: 20px; }
.plate .species {
  font-family: var(--display);
  font-stretch: 92%;
  font-weight: 740;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.plate .genus {
  font-style: italic;
  color: var(--ink-2);
  margin: 0 0 4px;
  font-size: 0.98rem;
}
.plate p { margin: 0; font-size: 1.05rem; line-height: 1.5; }

.attributes {
  margin-top: clamp(40px, 6vw, 72px);
}
.attribute-row {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 34px;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 780;
  font-size: clamp(1.7rem, 1rem + 2.6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--fern);
}

/* ---------- Dice ---------- */

.dice-row {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 12px);
}
.die { aspect-ratio: 1 / 1.08; }
.die svg { display: block; width: 100%; height: 100%; }
.die polygon { stroke: var(--bog); stroke-width: 3; stroke-linejoin: round; }
.die line { stroke: var(--bog); stroke-width: 2.5; opacity: 0.55; }
.die text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 46px;
  text-anchor: middle;
  fill: var(--bog);
}
.die-low polygon { fill: var(--fern-bright); }
.die-mid polygon { fill: var(--bone-2); }
.die-high polygon { fill: var(--ochre); }

.ranges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  margin-top: 10px;
}
.range {
  border-top: 6px solid;
  padding-top: 14px;
}
.range-low { border-color: var(--fern-bright); }
.range-mid { border-color: var(--bone-2); }
.range-high { border-color: var(--ochre); }
.range h3 { margin-bottom: 6px; }
.range .verbs {
  font-family: var(--display);
  font-stretch: 94%;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 10px 0 0;
}
.range p { font-size: 1.05rem; line-height: 1.5; }
.verbs-label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 2px;
}

.dice-aside {
  margin-top: clamp(28px, 4vw, 44px);
  font-size: 1.05rem;
}

/* ---------- Herd & caucuses ---------- */

.herd-stats {
  list-style: none;
  margin: 18px 0 26px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 30px;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 780;
  font-size: clamp(1.6rem, 1rem + 2.2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--fern-bright);
}

.caucuses {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.sigils { display: grid; gap: 28px; padding-top: 10px; }
.sigils img { width: 100%; height: auto; opacity: 0.9; }
.caucus-list {
  margin: 0; padding: 0;
  border-top: 1px solid var(--bog-2);
}
.caucus-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 7fr);
  gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid #3a4633;
}
.caucus-list dt {
  font-family: var(--display);
  font-stretch: 92%;
  font-weight: 740;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--on-bog);
}
.caucus-list dd { margin: 0; max-width: var(--measure); color: var(--on-bog); font-size: 1.05rem; line-height: 1.5; }
.caucus-intro { margin-bottom: 16px; font-size: 1.05rem; line-height: 1.5; }

.figure { margin: clamp(40px, 6vw, 80px) 0 0; }
.figure img { width: 100%; height: auto; }

/* ---------- Setting ---------- */
.setting-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.setting-grid .figure { margin: 0; }
.timeline-note {
  border-left: 4px solid var(--ochre);
  padding: 4px 0 4px 18px;
  margin-top: 24px;
  font-size: 1.05rem;
}
.timeline-note h3 { margin: 0 0 0.35em; font-size: 1.15rem; }

/* ---------- Campaign ---------- */

.campaign {
  position: relative;
  overflow: hidden;
  background: var(--rust);
  color: var(--on-bog);
}
.campaign-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
}
.campaign-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.5;
}
.campaign-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(27, 34, 26, 0.9) 0%, rgba(27, 34, 26, 0.62) 55%, rgba(27, 34, 26, 0.38) 100%);
}
.campaign .wrap {
  position: relative;
  z-index: 1;
  padding-block: clamp(56px, 8vw, 110px);
}
.campaign h2 { max-width: 22ch; }
.campaign p { color: var(--on-bog); }
.campaign .campaign-status { font-style: italic; color: var(--on-bog-2); }
.funds {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
  max-width: 60ch;
  font-size: 1.05rem;
  line-height: 1.5;
}
.funds li { margin-bottom: 2px; }
.campaign a { color: var(--ochre); }
.campaign a:hover { color: var(--bone); }
.campaign .btn-primary { color: var(--bog); }
.campaign .btn-primary:hover { color: var(--bog); }

.tiers {
  margin: 28px 0 0;
  padding: 0;
  max-width: 60ch;
  border-top: 2px solid var(--ochre);
}
.tiers > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(233, 224, 200, 0.28);
}
.tiers dt {
  font-family: var(--display);
  font-stretch: 92%;
  font-weight: 780;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ochre);
}
.tiers dd { margin: 0; }
.tiers dd strong { font-family: var(--display); font-stretch: 94%; font-weight: 700; font-size: 1.15rem; }
.tiers dd ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.tiers-note {
  margin: 26px 0 0;
  font-size: 1.05rem;
  max-width: 60ch;
}
.tiers-note + .funds { margin-top: 0.6em; }
.campaign-actions { margin-top: 32px; }

/* ---------- Questions ---------- */

.qa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px) clamp(28px, 5vw, 72px);
}
.qa h3 { margin-bottom: 8px; }
.qa p { font-size: 1.08rem; line-height: 1.55; }

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px) clamp(28px, 5vw, 72px);
}
.team-intro { margin-bottom: clamp(24px, 4vw, 40px); }
.team h3 { margin-bottom: 6px; }
.team p { font-size: 1.08rem; line-height: 1.55; }
.credits { grid-column: 1 / -1; border-top: 1px solid var(--bone-3); padding-top: 24px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bog);
  color: var(--on-bog-2);
  padding-block: 48px 40px;
  font-size: 1rem;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: start;
}
.site-footer img { width: 150px; height: auto; margin-bottom: 18px; }
.site-footer p { max-width: 52ch; margin-bottom: 0.6em; }
.site-footer a { color: var(--on-bog); }
.site-footer a:hover { color: var(--fern-bright); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { font-family: var(--display); font-stretch: 94%; font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- 404 ---------- */
.lost {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bog);
  color: var(--on-bog);
  padding-block: 64px;
}
.lost img { width: min(100%, 360px); margin: 0 auto 28px; }
.lost h2 { margin-bottom: 12px; }
.lost p { margin-inline: auto; }
.lost .btn { margin-top: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 8px 56px;
  }
  .hero-art {
    order: -1;
    justify-self: center;
    max-width: 440px;
  }
  .hero-art img {
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .hero-logo { margin-top: -40px; }
  .two-col, .setting-grid { grid-template-columns: 1fr; }
  .ranges { grid-template-columns: 1fr; }
  .caucuses { grid-template-columns: 1fr; }
  .sigils { grid-template-columns: repeat(2, 110px); }
  .qa, .team { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1.08rem; }
  .plate { grid-template-columns: 1fr; }
  .plate li:nth-child(odd) { padding-right: 0; }
  .plate li:nth-child(even) { padding-left: 0; border-left: 0; }
  .dice-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .die text { font-size: 44px; }
  .caucus-list > div { grid-template-columns: 1fr; gap: 4px; }
  .tiers > div { grid-template-columns: 1fr; gap: 2px; }
  .brand img { width: 108px; }
}
