/* ==========================================================================
   HRPR — Harm Reduction Policy & Research
   Rebuilt static site — shared stylesheet
   Palette sampled directly from the real HRPR logo (maroon -> coral).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root{
  /* --- brand colour tokens, sampled from the HRPR logo gradient --- */
  --brand-1:      #8F2A42;   /* deep maroon — top of the logo mark   */
  --brand-2:      #C1445A;   /* rose midpoint                        */
  --brand-3:      #E97A63;   /* coral                                */
  --brand-4:      #F3A883;   /* light peach — base of the logo mark  */

  --ink:          #221E1E;   /* matches the wordmark's near-black    */
  --ink-soft:     #5B5252;
  --paper:        #FBF8F6;
  --paper-raised: #FFFFFF;
  --line:         #E8DFDB;
  --line-strong:  #D2C4BE;
  --brand-tint:   #FBEAE5;   /* pale wash of the coral for callouts  */
  --brand-tint-2: #F3D9CF;

  /* --- type --- */
  --display: 'Sora', 'Public Sans', -apple-system, sans-serif;
  --sans:    'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* --- misc --- */
  --radius: 7px;
  --radius-sm: 4px;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(143,42,66,0.06), 0 10px 26px -14px rgba(143,42,66,0.35);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1,h2,h3,h4{
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 800; }
h2{ font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3{ font-size: 1.2rem; }
p{ margin: 0 0 1.1em; }
a{ color: var(--brand-1); }
img{ max-width: 100%; display: block; }
ul{ margin: 0 0 1.1em; padding-left: 1.2em; }
li{ margin-bottom: 0.4em; }

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--brand-1); color: #fff; padding: 0.75em 1.2em;
  z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus{ left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--brand-3);
  outline-offset: 2px;
}

/* --- eyebrow / labels --- */
.eyebrow{
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-1);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before{
  content: "";
  width: 1.4em; height: 1px; background: var(--brand-1);
  display: inline-block;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,248,246,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap{
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.6rem; padding-bottom: 0.6rem;
  gap: 1rem;
}
.brand{
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink);
}
.brand img{ height: 44px; width: auto; }
.brand-name{
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  line-height: 1.1; color: var(--ink);
}
.brand-name small{
  display: block; font-family: var(--mono); font-weight: 500;
  font-size: 0.58rem; letter-spacing: 0.07em; color: var(--ink-soft);
  text-transform: uppercase; margin-top: 0.3em;
}

.nav-toggle{
  display: none;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  width: 42px; height: 38px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink);
}
.nav-toggle span{ top: 50%; transform: translateY(-50%); }
.nav-toggle span::before{ top: -8px; }
.nav-toggle span::after{ top: 8px; }

.site-nav ul{
  display: flex; gap: 1.9rem; list-style: none; margin: 0; padding: 0;
}
.site-nav a{
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 0.3em 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"]{
  color: var(--brand-1); border-bottom-color: var(--brand-3);
}

@media (max-width: 780px){
  .nav-toggle{ display: block; }
  .site-nav{
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.28s ease;
  }
  .site-nav.open{ max-height: 320px; }
  .site-nav ul{ flex-direction: column; gap: 0; padding: 0.5rem 1.5rem 1.2rem; }
  .site-nav a{ display: block; padding: 0.7em 0; border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-weight: 700; font-size: 0.92rem;
  padding: 0.85em 1.5em; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary{ background: linear-gradient(120deg, var(--brand-1), var(--brand-2)); color: #fff; }
.btn-primary:hover{ box-shadow: var(--shadow); transform: translateY(-1px); color:#fff; }
.btn-ghost{ background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--brand-1); color: var(--brand-1); }
.btn-row{ display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.page-hero{
  padding: 3.2rem 0 2.4rem;
  border-bottom: 1px solid var(--line);
}
.page-hero h1{ max-width: 20ch; }
.page-hero .lede{ max-width: 62ch; font-size: 1.12rem; color: var(--ink-soft); }

/* ==========================================================================
   Home hero + continuum signature
   ========================================================================== */
.hero{
  padding: 3.4rem 0 1rem;
  position: relative;
  overflow: hidden;
}
.hero .wrap{
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
}
.hero h1{ max-width: 16ch; }
.hero .lede{ font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-figure{
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4/5;
}
.hero-figure img{ width: 100%; height: 100%; object-fit: cover; }
.hero-figure::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(35,20,22,0) 45%, rgba(35,20,22,0.6) 100%);
}
.hero-figure figcaption{
  position: absolute; left: 1.1rem; bottom: 1rem; right: 1.1rem;
  color: #fff; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.05em;
  z-index: 2;
}

@media (max-width: 900px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero-figure{ order: -1; aspect-ratio: 16/9; }
}

/* --- the risk-continuum bar: also the logo's own "metamorphosis" gradient --- */
.continuum{
  margin: 2.6rem 0 0.5rem;
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.continuum-label{
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.1rem;
}
.continuum-track{
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-1) 0%, var(--brand-3) 55%, var(--brand-4) 100%);
  margin: 0 0.5rem;
}
.continuum-marker{
  position: absolute; top: 50%; left: 38%;
  transform: translate(-50%, -50%);
}
.continuum-dot{
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 4px solid var(--brand-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  display: block;
}
.continuum-tag{
  position: absolute; top: -3.3em; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.04em; padding: 0.45em 0.7em;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.continuum-tag::after{
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.continuum-ends{
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.8rem;
}
.continuum-ends strong{ color: var(--ink); display:block; font-size: 0.85rem;}

/* ==========================================================================
   Sections
   ========================================================================== */
section{ padding: 3.4rem 0; }
.section-alt{ background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head{ max-width: 60ch; margin-bottom: 2.2rem; }
.two-col{
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem;
}
@media (max-width: 820px){ .two-col{ grid-template-columns: 1fr; } }

.reveal{ opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in{ opacity: 1; transform: none; }

/* --- cards --- */
.card-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.card-grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .card-grid{ grid-template-columns: 1fr; } }
.card{
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  display: flex; flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover{ border-color: var(--brand-2); transform: translateY(-3px); }
.card .card-index{
  font-family: var(--mono); font-size: 0.72rem; color: var(--brand-1);
  letter-spacing: 0.08em; margin-bottom: 0.9rem;
}
.card h3{ margin-bottom: 0.5rem; }
.card p{ color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1rem;}
.card p:last-child{ margin-bottom: 0; }
.card .card-link{
  margin-top: auto; font-weight: 700; font-size: 0.88rem; text-decoration: none;
}

/* --- pull quote / callout --- */
.callout{
  border-left: 3px solid var(--brand-2);
  background: var(--brand-tint);
  padding: 1.3rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--display); font-weight: 500; font-size: 1.05rem;
  color: var(--brand-1);
}

/* --- profile / bio block --- */
.profile{
  display: grid; grid-template-columns: 260px 1fr; gap: 2.4rem; align-items: start;
}
@media (max-width: 780px){ .profile{ grid-template-columns: 1fr; } }
.profile-photo{
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.profile-photo img{ width: 100%; }
.profile-cred{
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--ink-soft); text-transform: uppercase; margin-top: 0.7rem;
}

.figure-frame{
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); margin: 1.5rem 0;
}
.figure-frame img{ width: 100%; }
.figure-frame figcaption{
  padding: 0.7rem 1rem; background: var(--paper-raised);
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* --- notice / limitation box (used sparingly, honest labelling) --- */
.notice{
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--paper);
}
.notice strong{ color: var(--brand-1); }

/* --- shared "Our Brand / Our Mission" widget, echoed on every real page --- */
.brand-widget{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  color: #fff;
}
.brand-widget .wrap{
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem;
}
@media (max-width: 820px){ .brand-widget .wrap{ grid-template-columns: 1fr; } }
.brand-widget h3{ color: #fff; font-size: 1.1rem; margin-bottom: 0.5em; }
.brand-widget p{ color: rgba(255,255,255,0.92); margin-bottom: 0.9em; }
.brand-widget .eyebrow{ color: rgba(255,255,255,0.8); }
.brand-widget .eyebrow::before{ background: rgba(255,255,255,0.6); }
.brand-widget .btn-ghost{ border-color: rgba(255,255,255,0.55); color: #fff; }
.brand-widget .btn-ghost:hover{ border-color: #fff; background: rgba(255,255,255,0.12); color: #fff; }

/* --- project blocks --- */
.project{
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: 1.9rem 2rem;
  margin-bottom: 1.6rem;
}
.project h3{ margin-bottom: 0.6rem; }
.project .tag{
  display:inline-block; font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: #fff; background: var(--brand-1);
  padding: 0.3em 0.7em; border-radius: 999px; margin-bottom: 0.9rem;
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem;
}
@media (max-width: 860px){ .contact-grid{ grid-template-columns: 1fr; } }
.info-card{
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem;
}
.info-card dt{ font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-1); margin-top: 1.1rem;}
.info-card dt:first-child{ margin-top: 0; }
.info-card dd{ margin: 0.25em 0 0; }
.info-card a{ font-weight: 600; }
.map-frame{ border-radius: var(--radius); overflow:hidden; border: 1px solid var(--line); margin-top: 1.4rem;}
.map-frame iframe{ width: 100%; height: 230px; border: 0; display:block; }

form.contact-form{
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem;
  display: grid; gap: 1.1rem;
}
.field label{ display:block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.4em; }
.field input, .field textarea{
  width: 100%; font-family: var(--sans); font-size: 0.95rem;
  padding: 0.7em 0.8em; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper);
}
.field textarea{ min-height: 120px; resize: vertical; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--ink); color: #F1E7E4;
  padding: 2.8rem 0 1.6rem; margin-top: 0;
}
.site-footer a{ color: #F1E7E4; }
.footer-grid{
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem;
  padding-bottom: 1.8rem; border-bottom: 1px solid rgba(241,231,228,0.18);
}
@media (max-width: 780px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid h4{
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #D9B8B0; margin-bottom: 0.9em;
}
.footer-grid ul{ list-style: none; padding: 0; margin: 0; }
.footer-grid li{ margin-bottom: 0.5em; }
.footer-grid a{ text-decoration: none; }
.footer-grid a:hover{ text-decoration: underline; }
.footer-bottom{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  padding-top: 1.3rem; font-size: 0.8rem; color: #C7ACA6;
}
.footer-logo{ height: 32px; filter: brightness(0) invert(1); opacity: 0.92; margin-bottom: 1rem;}
