/* Alan Jenkins - writer & researcher on harm-based regulation
   Economics-report aesthetic: ink, neutral paper, treasury green, amber, chart red */

:root {
  --ink: #20262b;
  --ink-soft: #59626a;
  --paper: #f4f5f2;
  --paper-deep: #e9eae4;
  --green: #1e5945;
  --green-deep: #153f31;
  --amber: #c99014;
  --red: #a4432e;
  --rule: #dbdcd4;
  --light: #f4f5f2;
  --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
}

h1, h2, h3 {
  font-family: "Spectral", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 500; }

/* ---------- icons (Noun Project PNGs used as masks) ---------- */
.icon {
  display: inline-block;
  width: 42px; height: 42px;
  background-color: var(--green);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  flex: none;
}
.icon.light { background-color: var(--amber); }
.icon-dice      { --icon: url("../icons/dice.png"); }
.icon-cigarette { --icon: url("../icons/cigarette.png"); }
.icon-pint      { --icon: url("../icons/pint.png"); }
.icon-scales    { --icon: url("../icons/scales.png"); }
.icon-chart     { --icon: url("../icons/chart.png"); }
.icon-megaphone { --icon: url("../icons/megaphone.png"); }
.icon-handshake { --icon: url("../icons/handshake.png"); }
.icon-shield    { --icon: url("../icons/shield.png"); }
.icon-envelope  { --icon: url("../icons/envelope.png"); }
.icon-mask      { --icon: url("../icons/mask.png"); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(6px);
}
.wordmark {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem; font-weight: 500;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.wordmark span { color: var(--green); }
.site-head nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-head nav a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
}
.site-head nav a:hover { color: var(--green-deep); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.chart {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.5; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 75%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 75%);
}
.hero-grid {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem; align-items: center;
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1.2rem;
}
.eyebrow span { color: var(--rule); padding: 0 0.35rem; }
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  font-weight: 500; letter-spacing: -0.01em;
  margin-bottom: 1.3rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.7rem 1.5rem;
  background: var(--green); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 0.95rem; border-radius: 3px;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green-deep); color: var(--green-deep); }

.hero-portrait { position: relative; justify-self: center; }
.hero-portrait img {
  display: block; width: min(100%, 400px); height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 45px -18px rgba(32, 38, 43, 0.35);
}
.hero-portrait figcaption {
  margin-top: 1.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.05em;
}
.hero-portrait figcaption span { color: var(--amber); padding: 0 0.25rem; }

/* ---------- sections ---------- */
.section { padding: 4.5rem 1.5rem; }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section.alt { background: var(--paper-deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.section-head .icon { width: 34px; height: 34px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.section-intro {
  color: var(--ink-soft); margin-bottom: 2.4rem; max-width: 46em;
  margin-left: calc((100% - min(var(--max), 100%)) / 2); margin-right: 0;
}

/* about */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: start; }
.about-text p { margin-bottom: 1.2rem; }
.facts { margin-top: 1.8rem; border-top: 2px solid var(--ink); }
.facts div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--rule);
}
.facts dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: 0.3rem;
}
.facts dd { font-size: 0.98rem; }
.about-photo img { width: 100%; height: auto; border-radius: 4px; display: block; }
.about-photo figcaption {
  margin-top: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem; color: var(--ink-soft);
}

/* sectors */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--green); border-radius: 4px;
  padding: 1.8rem 1.6rem;
}
.card .icon { margin-bottom: 1.1rem; }
.card h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.card p { font-size: 0.97rem; color: var(--ink-soft); }

/* themes */
.section.dark { background: var(--ink); color: var(--light); }
.section.dark h2 { color: var(--light); }
.section.dark .section-intro { color: #a7b0b7; }
.themes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.theme {
  border: 1px solid #39424a; border-radius: 4px;
  padding: 1.7rem 1.6rem;
  display: grid; grid-template-columns: 42px 1fr; gap: 1.1rem 1.3rem;
}
.theme .icon { background-color: var(--amber); grid-row: span 2; }
.theme h3 { font-size: 1.25rem; align-self: end; }
.theme p { grid-column: 2; font-size: 0.96rem; color: #c3cad0; }
.section.dark a { color: #9fc4b4; }

/* contact */
.section.contact { padding: 5.5rem 1.5rem; }
.contact-card {
  max-width: 620px; text-align: center;
  background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--green);
  border-radius: 6px; padding: 3rem 2rem;
}
.contact-card .icon { margin: 0 auto 1rem; display: block; }
.contact-card h2 { font-size: 2rem; margin-bottom: 0.8rem; }
.contact-card p { color: var(--ink-soft); margin-bottom: 1.2rem; }
.email {
  display: inline-block;
  font-family: "Spectral", Georgia, serif; font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 1.2rem;
}
.contact-card .social { margin-bottom: 0; font-size: 0.95rem; }

/* footer */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 1.5rem 2.5rem;
  max-width: var(--max); margin: 0 auto;
  font-size: 0.85rem; color: var(--ink-soft);
}
.site-foot .credits { margin-top: 0.6rem; font-size: 0.75rem; }
.site-foot .credits a { color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; }
  .hero-portrait { order: -1; }
  .hero-portrait img { width: min(100%, 320px); }
  .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .themes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-head nav { gap: 1rem; }
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .section { padding: 3.2rem 1.2rem; }
}
