/* =========================================================
   Warriors in Recovery — shared stylesheet
   A resource site for people in recovery from compulsive
   sexual behavior. Bright, welcoming, unmistakably warm.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --ink:      #FFF8EA;   /* page background — morning light, not stark white */
  --surface:  #FFFFFF;   /* card / panel surface, pops off the cream */
  --surface-2:#FFF2D8;   /* slightly raised surface, hovers */
  --line:     #F1E1BE;   /* soft warm hairline borders */
  --paper:    #362B18;   /* primary text, warm dark brown, never flat black */
  --muted:    #7C6F55;   /* secondary text */
  --amber:    #F5A623;   /* signature accent — the sunrise */
  --amber-dim:#B5720A;   /* readable amber for body text links */
  --rose:     #EC7A93;   /* secondary accent — welcome & warmth */
  --teal:     #1FA398;   /* tertiary accent — steadiness */
  --diamond:  #4C9BE8;   /* fourth trail-blaze color */

  --display: 'Fraunces', ui-serif, Georgia, serif;
  --body: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 14px;
  --max: 1080px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

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

/* subtle ambient texture: faint wash of morning color */
body::before{
  content:"";
  position: fixed;
  inset:0;
  background:
    radial-gradient(ellipse 900px 600px at 20% -10%, rgba(245,166,35,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(236,122,147,0.08), transparent 60%),
    radial-gradient(ellipse 800px 500px at 50% 110%, rgba(31,163,152,0.06), transparent 60%);
  pointer-events:none;
  z-index:0;
}

a{ color: var(--amber-dim); text-decoration: none; }
a:hover{ text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible{
  outline: 2px solid var(--amber-dim);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,h2,h3{
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--paper);
}
h1{ font-size: clamp(2rem, 5vw, 3rem); }
h2{ font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3{ font-size: 1.15rem; font-weight: 500; }

p{ margin: 0 0 1em; color: var(--paper); }
.lede{ color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

.eyebrow{
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-dim);
  display:block;
  margin-bottom: .6em;
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- header / nav ---------- */
header.site{
  position: sticky;
  top:0;
  z-index: 10;
  background: rgba(255,248,234,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row{
  max-width: var(--max);
  margin:0 auto;
  padding: 16px 24px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 20px;
}
.brand{
  display:flex;
  align-items:center;
  gap:.6em;
  font-family: var(--display);
  font-weight:600;
  font-size: 1.15rem;
  color: var(--paper);
}
.brand:hover{ text-decoration:none; }
.brand .flame{ flex-shrink:0; }

nav.links{
  display:flex;
  gap: 1.6em;
  flex-wrap: wrap;
}
nav.links a{
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
  padding: .3em 0;
  border-bottom: 2px solid transparent;
}
nav.links a:hover, nav.links a[aria-current="page"]{
  color: var(--paper);
  text-decoration:none;
  border-bottom-color: var(--amber);
}
.nav-toggle{
  display:none;
  background:none;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1rem;
}

@media (max-width: 720px){
  .nav-toggle{ display:inline-block; }
  nav.links{
    display:none;
    flex-direction:column;
    width:100%;
    gap: .2em;
    padding-top: 12px;
  }
  nav.links.open{ display:flex; }
  .nav-row{ flex-wrap: wrap; }
}

/* ---------- hero ---------- */
.hero{
  padding: 64px 0 40px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items:center;
}
@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; }
}

/* ---------- sections ---------- */
section{ padding: 56px 0; }
section.tight{ padding: 32px 0; }
.divider{
  border:none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- cards ---------- */
.grid{
  display:grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3{ margin-bottom:.35em; display:flex; align-items:center; gap:.5em; }
.card p{ color: var(--muted); margin-bottom: .6em; }
.card .card-link{ font-size:.92rem; font-weight:600; }

/* ---------- trail blazes (signature motif) ---------- */
.blaze{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 1.5em;
  height: 1.5em;
  flex-shrink:0;
}
.blaze svg{ width:100%; height:100%; }
.blaze.saa{ color: var(--amber); }
.blaze.sa{ color: var(--teal); }
.blaze.slaa{ color: var(--rose); }
.blaze.worth{ color: var(--diamond); }

/* ---------- tags ---------- */
.tag{
  display:inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing:.04em;
  padding: .25em .6em;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin: 0 .4em .4em 0;
}

/* ---------- tables ---------- */
.compare-wrap{ overflow-x:auto; }
table.compare{
  width:100%;
  border-collapse: collapse;
  min-width: 640px;
}
table.compare th, table.compare td{
  text-align:left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: .95rem;
}
table.compare th{
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
table.compare td:first-child, table.compare th:first-child{
  color: var(--paper);
  font-weight: 600;
}

/* ---------- callout / notice boxes ---------- */
.notice{
  background: var(--surface);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 24px 0;
}
.notice.rose{ border-left-color: var(--rose); }
.notice.teal{ border-left-color: var(--teal); }
.notice p:last-child{ margin-bottom:0; }
.notice h3{ margin-bottom:.3em; font-size: 1rem; }

/* ---------- buttons ---------- */
.btn{
  display:inline-block;
  font-family: var(--body);
  font-weight:600;
  font-size:.95rem;
  padding: .7em 1.3em;
  border-radius: 999px;
  background: var(--amber);
  color: var(--paper);
  border: none;
}
.btn:hover{ text-decoration:none; background:#FFC15C; }
.btn.ghost{
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}
.btn.ghost:hover{ border-color: var(--amber); color: var(--amber-dim); background: transparent; }

/* ---------- footer ---------- */
footer.site{
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  margin-top: 40px;
}
footer.site .foot-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px){
  footer.site .foot-grid{ grid-template-columns: 1fr; }
}
footer.site h3{ font-size: .85rem; text-transform:uppercase; letter-spacing:.08em; font-family: var(--mono); color: var(--muted); font-weight:500; }
footer.site ul{ list-style:none; padding:0; margin:0; }
footer.site li{ margin-bottom: .5em; }
footer.site a{ color: var(--paper); }
footer.site a:hover{ color: var(--amber-dim); }
.fine{ color: var(--muted); font-size: .85rem; margin-top: 28px; }
.crisis{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .9rem;
  color: var(--muted);
  margin-top: 28px;
}
.crisis strong{ color: var(--paper); }

/* ---------- list of resources ---------- */
.res-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:16px; }
.res-list li{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.res-list h3{ margin-bottom:.25em; }
.res-list p{ margin-bottom:.5em; color: var(--muted); }
.res-list .meta{ font-family: var(--mono); font-size:.75rem; color: var(--muted); }

/* ---------- search page ---------- */
.filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap: .6em;
  margin: 1.2em 0 1.6em;
}
.filter-bar button{
  font-family: var(--body);
  font-size: .85rem;
  cursor:pointer;
}
.search-box{
  width:100%;
  max-width: 460px;
  padding: .8em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
}
.search-box:focus-visible{ outline: 2px solid var(--amber); outline-offset: 2px; }
.result-count{ color: var(--muted); font-size: .85rem; font-family: var(--mono); margin: .8em 0 0; }

/* utility */
.center{ text-align:center; }
.mt0{ margin-top:0; }
.stack > * + *{ margin-top: 1em; }
