/* Recovery Trail, LLC — site styles
   Plain CSS, mobile-first, no external fonts or trackers. */

:root {
  /* Palette sampled from the Recovery Trail logo (logo-full.jpg) */
  --night: #270f03;        /* logo background */
  --bark: #3e180f;         /* tree silhouette */
  --maroon: #7d2718;       /* foreground ground: primary (9.3:1 on paper) */
  --rust: #b4401e;         /* rust hills: accent text (5.2:1+ on cream/paper) */
  --ember: #cb4d23;        /* bright rust hill: decorative */
  --trail: #f29631;        /* burnt-orange trail: decorative on light, text OK on dark */
  --amber: #f1a846;        /* far hills: decorative */
  --gold: #fbdd6b;         /* sunset sky */
  --gold-text: #fae093;    /* "TRAIL LLC" lettering */
  --cream: #fdf5cd;        /* "RECOVERY" lettering */
  --sun: #fbf7c8;          /* sun glow */
  /* Derived neutrals (tints/shades of the sampled colors) */
  --paper: #fffaf0;        /* page background */
  --tint: #faeccb;         /* light gold tint for pills / hover */
  --line: #ecdcbc;         /* borders */
  --ink: #270f03;          /* body text: 17.5:1 on paper */
  --muted: #5a3a2c;        /* secondary text: 9.7:1 on paper */
  --on-dark: #fdf5cd;      /* text on night: 16.5:1 */
  --on-dark-muted: #e9d9b8;/* 13:1 on night */
  --white: #ffffff;
  --focus: #b4401e;
  --focus-dark: #fbdd6b;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(39, 15, 3, .07), 0 8px 24px rgba(39, 15, 3, .08);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--bark); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw + .5rem, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.5vw + .6rem, 2.25rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .35em; }

a { color: var(--maroon); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--bark); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--night); color: var(--white); padding: .7rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Crisis bar ---------- */
.crisis-bar { background: var(--maroon); color: var(--white); font-size: .92rem; }
.crisis-bar .container { padding: .5rem 0; text-align: center; }
.crisis-bar a { color: var(--white); font-weight: 700; }
.crisis-bar a:hover { color: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand svg { width: 210px; height: auto; display: block; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--maroon); color: var(--white); border: 0; border-radius: 10px;
  padding: .6rem .9rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
}
.nav-toggle-bars { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .7rem .8rem; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 8px;
}
.site-nav a:hover { background: var(--tint); color: var(--bark); }
.site-nav a[aria-current="page"] { color: var(--maroon); background: var(--tint); }

/* Mobile: nav collapses only when JS is available (progressive enhancement) */
.js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.js .site-nav.is-open { display: block; }
.js .site-nav ul { padding: .5rem 1.25rem 1rem; }
.no-js .nav-toggle { display: none; }
.no-js .header-inner { flex-wrap: wrap; }
.no-js .site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .js .site-nav ul, .site-nav ul { display: flex; gap: .15rem; padding: 0; }
  .site-nav li + li { margin-top: 0; }
  .site-nav a { padding: .5rem .7rem; font-size: .97rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid var(--maroon); background: var(--maroon); color: var(--white); font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--bark); border-color: var(--bark); color: var(--white); }
.btn-outline { background: transparent; color: var(--maroon); }
.btn-outline:hover { background: var(--tint); color: var(--bark); }
.btn-light { background: var(--white); color: var(--bark); border-color: var(--white); }
.btn-light:hover { background: var(--gold); border-color: var(--gold); color: var(--bark); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%); overflow: hidden; }
.hero-inner { display: grid; gap: 2rem; padding: 3rem 0 2.5rem; align-items: center; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); margin-bottom: .75rem; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 38em; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr .9fr; padding: 4.5rem 0 4rem; } }

.page-hero { background: var(--cream); padding: 3rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 42em; margin-bottom: 0; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--white); }
.section-forest { background: var(--night); color: var(--on-dark); }
.section-forest h2, .section-forest h3 { color: var(--white); }
.section-forest a:not(.btn) { color: var(--gold); }
.section-head { max-width: 46em; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-forest .section-head p { color: var(--on-dark-muted); }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.section-alt .card { background: var(--paper); }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .icon { width: 48px; height: 48px; margin-bottom: .8rem; color: var(--maroon); }

.trail-marker { /* blaze-style list marker */
  list-style: none; padding-left: 0;
}
.trail-marker li { position: relative; padding-left: 1.75rem; }
.trail-marker li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: .8rem; height: 1.05rem; border-radius: 3px;
  background: var(--trail); box-shadow: inset 0 0 0 2px rgba(0,0,0,.08);
}

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1.25rem 1.25rem 1.25rem 4.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li + li { margin-top: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--maroon); color: var(--white); font-weight: 700;
}
.steps h3 { margin-bottom: .25em; font-size: 1.15rem; }
.steps p { margin: 0; }

.callout {
  border-left: 6px solid var(--rust); background: var(--tint); padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.callout-warn { border-left-color: var(--rust); background: #fbefd9; }
.callout p:last-child { margin-bottom: 0; }

.cta-band { background: var(--maroon); color: var(--white); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1rem; align-items: center; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { margin: 0; color: #fff3e6; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; padding: 2.5rem 3rem; } }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.pill-list li { margin: 0; background: var(--tint); color: var(--bark); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .95rem; }

.placeholder-block { border: 2px dashed var(--amber); border-radius: var(--radius); padding: 2rem; background: var(--white); text-align: center; color: var(--muted); }

/* ---------- Resources ---------- */
.crisis-card { border-top: 6px solid var(--maroon); }
.crisis-card .big { font-size: 1.6rem; font-weight: 800; color: var(--bark); margin: .25rem 0 .5rem; font-family: var(--font); }
.crisis-card .big a { text-decoration: none; color: var(--bark); }
.crisis-card .big a:hover { text-decoration: underline; }
.source { font-size: .9rem; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--bark); }
.field .hint { display: block; font-weight: 400; font-size: .92rem; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #8c7666; border-radius: 10px; padding: .7rem .85rem; min-height: 48px;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--maroon); outline: 3px solid var(--focus); outline-offset: 1px; }
.req { color: #9c2a12; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.checkbox { display: flex; gap: .65rem; align-items: flex-start; }
.checkbox input { width: 1.3rem; height: 1.3rem; min-height: 0; margin-top: .25rem; accent-color: var(--maroon); flex: none; }
.checkbox label { font-weight: 400; color: var(--ink); margin: 0; }

.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.4fr .8fr; } }

dl.info { margin: 0; }
dl.info dt { font-weight: 700; color: var(--bark); margin-top: 1rem; }
dl.info dt:first-child { margin-top: 0; }
dl.info dd { margin: .15rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark-muted); padding: 3rem 0 1.5rem; margin-top: 0; font-size: .97rem; }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--gold); }
.site-footer h2 { color: var(--white); font-size: 1.1rem; font-family: var(--font); letter-spacing: .02em; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; }
.footer-crisis { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 2rem 0 1.5rem; }
.footer-crisis p { margin: 0; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.18); padding-top: 1.25rem; font-size: .9rem; color: var(--on-dark-muted); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-brand svg { width: 220px; }

@media print {
  .site-header, .crisis-bar, .nav-toggle, .site-footer .footer-grid { display: none; }
  body { background: #fff; }
}
.h3 { font-size: 1.25rem; }
address { font-style: normal; }

/* ===== Logo-matched theme (dark header + hero) ===== */
.site-header { background: var(--night); border-bottom: 1px solid #4a2414; }
.brand { gap: .7rem; color: var(--on-dark); }
.brand-emblem { width: 56px; height: 56px; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font); font-weight: 600; font-size: 1.12rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream); }
.brand-sub { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-top: .3rem; }
.brand-name, .brand-sub { white-space: nowrap; }
@media (max-width: 479px) {
  .brand { gap: .55rem; }
  .brand-emblem { width: 46px; height: 46px; }
  .brand-name { font-size: .98rem; letter-spacing: .1em; }
  .brand-sub { display: none; }
  .nav-toggle { padding: .55rem .75rem; }
}
.site-nav a { color: var(--on-dark); }
.site-nav a:hover { background: #4a2414; color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--night); background: var(--gold); }
.js .site-nav { background: var(--night); border-bottom: 1px solid #4a2414; }
.nav-toggle { background: var(--gold); color: var(--night); }
.nav-toggle:hover { background: var(--cream); }

.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible, .section-forest :focus-visible,
.crisis-bar :focus-visible, .cta-band :focus-visible { outline-color: var(--focus-dark); }

.hero { background: radial-gradient(ellipse at 78% 45%, #5a2410 0%, var(--night) 62%); color: var(--on-dark); }
.hero h1 { color: var(--cream); }
.hero .lead { color: var(--on-dark-muted); }
.hero .eyebrow { color: var(--gold-text); }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(100%, 380px); height: auto; display: block; filter: drop-shadow(0 12px 40px rgba(251, 221, 107, .18)); }

.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--cream); border-color: var(--cream); color: var(--night); }
.btn-outline-light { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn-outline-light:hover { background: rgba(253, 245, 205, .12); color: var(--gold); border-color: var(--gold); }
.btn-light { background: var(--cream); border-color: var(--cream); color: var(--night); }
.btn-light:hover { background: var(--gold); border-color: var(--gold); color: var(--night); }

.section-forest a:not(.btn), .site-footer a { color: var(--gold-text); }
.section-forest a:not(.btn):hover, .site-footer a:hover { color: var(--cream); }
.crisis-bar a { color: var(--white); }
.crisis-bar a:hover { color: var(--gold); }
.site-footer h2 { color: var(--cream); }
.footer-logo { width: 200px; height: auto; display: block; margin-bottom: 1rem; }
.footer-crisis { background: rgba(253, 245, 205, .06); border-color: rgba(253, 245, 205, .2); }
.footer-legal { border-top-color: rgba(253, 245, 205, .2); }

.cta-band { background: var(--maroon); }
.card .icon { color: var(--rust); }
.page-hero { background: var(--cream); border-bottom-color: var(--line); }
.callout { border-left-color: var(--trail); background: #fdf1d6; }
.callout-warn { border-left-color: var(--maroon); background: #fbe9dc; }
.pill-list li { background: var(--tint); color: var(--bark); }
.crisis-card { border-top-color: var(--maroon); }
.steps li::before { background: var(--maroon); }

.logo-feature { display: grid; gap: 1.5rem; align-items: center; margin-top: 2.5rem; }
.logo-feature img { width: 240px; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 700px) { .logo-feature { grid-template-columns: 240px 1fr; } }
