/* ============================================================
   ListlyRV.com — "Trailhead" design system (LOCKED brand)
   ============================================================ */

:root {
  /* Palette */
  --sage: #5C7268;       /* Sage Slate — primary structure */
  --ember: #E2703A;      /* Trail Ember — action color */
  --ember-dark: #C95B2A; /* darker ember for hover/contrast */
  --pine: #1E3D2F;       /* Deep Pine — heading/dark */
  --forest: #41514A;     /* Forest Text — body, badge bg behind white */
  --paper: #F7F4ED;      /* page background */
  --canvas: #FBFAF5;     /* cards/panels */
  --line: #DCD7C9;       /* borders/dividers */
  --muted: #6E7C73;      /* secondary text (darkened sage for AA) */

  --shadow-sm: 0 1px 2px rgba(30,61,47,.06);
  --shadow-md: 0 4px 16px rgba(30,61,47,.08);
  --shadow-lg: 0 10px 34px rgba(30,61,47,.12);

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --maxw: 1080px;
  --gap: clamp(1rem, 3vw, 2rem);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2,.7,.3,1);

  --header-h: 64px; /* fixed site-header height — keep in sync with .site-header min-height */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  padding-top: var(--header-h); /* clear the fixed header */
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--forest);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--pine);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--forest); }
.eyebrow {
  font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sage);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-150%);
  top: 8px; background: var(--pine); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  z-index: 1000; transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* ---------- Header ---------- */
/* Fixed header: stays above all page content regardless of child stacking
   contexts (transforms on cards/buttons can otherwise paint over a sticky
   header). Body gets matching top padding (above) so nothing renders under it. */
.site-header {
  background: var(--sage);
  color: #fff;
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand:hover { text-decoration: none; }
.brand .tile {
  width: 38px; height: 38px; border-radius: 10px; background: var(--ember);
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(30,61,47,.25);
  flex: none;
}
.brand .tile svg { width: 24px; height: 24px; }
.wordmark { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; color: #fff; letter-spacing: -.01em; }
.wordmark .rv { color: var(--ember); }
.site-header .wordmark .rv { color: #FBD3BF; } /* lighter ember for AA on sage */
.header-tag { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-pill); border: 2px solid transparent;
  font-weight: 800; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ember); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ember-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--sage); border-color: var(--sage); }
.btn-ghost:hover { background: rgba(92,114,104,.08); transform: translateY(-1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Progress indicator ---------- */
.progress { display: flex; align-items: center; gap: .5rem; justify-content: center; margin: 0 auto 1.75rem; flex-wrap: wrap; }
.progress .step { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-weight: 700; font-size: .9rem; }
.progress .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--canvas); border: 2px solid var(--line); color: var(--muted); font-size: .85rem; flex: none;
}
.progress .step.active .dot { background: var(--ember); border-color: var(--ember); color: #fff; }
.progress .step.active { color: var(--pine); }
.progress .step.done .dot { background: var(--sage); border-color: var(--sage); color: #fff; }
.progress .sep { width: 22px; height: 2px; background: var(--line); flex: none; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.25rem, 6vw, 4.5rem); text-align: center; position: relative; overflow: hidden; }
.hero .hero-mark { margin: 0 auto 1.5rem; }
.hero .hero-kicker { margin-bottom: .75rem; }
.hero h1 { margin-bottom: .4em; }
.hero h1 .accent-word { color: var(--ember); font-style: italic; }
.hero .lead { max-width: 42ch; margin-inline: auto; }
.hero .cta-row { margin-top: 1.75rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .hero-reassure { margin-top: .9rem; font-size: .9rem; }
.hero-shot {
  margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  max-width: 720px;
}
.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--lines);
  box-shadow: 0 18px 40px -18px rgba(30, 61, 47, 0.35);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(92,114,104,.12), transparent 70%);
}

/* big hero logo tile */
.mark-tile {
  width: 84px; height: 84px; border-radius: 22px; background: var(--ember);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
}
.mark-tile svg { width: 52px; height: 52px; }

/* ---------- How it works ---------- */
.steps { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 2rem; }
.step-card { padding: 1.75rem; text-align: left; }
.step-card .num {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(92,114,104,.12); color: var(--sage);
  font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; display: grid; place-items: center; margin-bottom: 1rem;
}
.step-card h3 { margin-bottom: .25rem; }
.step-card p { margin: 0; color: var(--forest); }

/* ---------- Rig profile (build.html) ---------- */
.rig-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.rig-card {
  text-align: left; padding: 1.1rem 1.2rem; background: var(--canvas); border: 2px solid var(--line);
  border-radius: var(--radius); position: relative; transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease);
  width: 100%; display: flex; align-items: flex-start; gap: .85rem;
}
.rig-card:hover { border-color: var(--sage); transform: translateY(-1px); }
.rig-card.selected { border-color: var(--ember); background: #FDF1EA; box-shadow: var(--shadow-sm); }
.rig-card:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.rig-card .rig-name { font-weight: 800; color: var(--pine); display: block; }
.rig-card .rig-desc { font-size: .9rem; color: var(--muted); }
.rig-card .rig-check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 2px;
  display: grid; place-items: center; color: #fff; background: transparent; transition: all .15s var(--ease);
}
.rig-card.selected .rig-check { background: var(--ember); border-color: var(--ember); }
.rig-card .rig-check svg { width: 14px; height: 14px; opacity: 0; }
.rig-card.selected .rig-check svg { opacity: 1; }
.rig-badge { font-size: .72rem; font-weight: 800; color: var(--sage); text-transform: uppercase; letter-spacing: .06em; }

/* feature chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: var(--radius-pill);
  border: 2px solid var(--line); background: var(--canvas); color: var(--forest); font-weight: 700; font-size: .92rem;
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--sage); }
.chip.selected { background: var(--sage); border-color: var(--sage); color: #fff; }
.chip:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.chip .chk { width: 16px; height: 16px; opacity: 0; }
.chip.selected .chk { opacity: 1; }

.field-label { font-weight: 800; color: var(--pine); display: block; margin-bottom: .4rem; }
.text-input {
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--canvas); font: inherit; color: var(--forest);
}
.text-input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(226,112,58,.15); }

.form-block { margin-bottom: 2.25rem; }
.form-block > h2 { margin-bottom: .2em; }
.form-help { color: var(--muted); margin-bottom: 1.1rem; }

.sticky-actions {
  position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--paper) 35%);
  padding-top: 1.5rem; padding-bottom: 1rem; margin-top: 2rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}

/* ---------- Checklist (checklist.html) ---------- */
.zone { margin-bottom: 2.5rem; }
.zone-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .25rem; }
.zone-head h2 { margin: 0; }
.zone-timing {
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sage);
  background: rgba(92,114,104,.1); padding: .2rem .6rem; border-radius: var(--radius-pill);
}
.zone-desc { color: var(--muted); margin-bottom: 1rem; max-width: 62ch; }

.group-label {
  font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 1.25rem 0 .6rem;
}

.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.item {
  background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.item.checked { border-color: rgba(226,112,58,.5); background: #FDF7F3; }
.item-row { display: flex; align-items: flex-start; gap: .8rem; }
.item-main { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.item-name { font-weight: 700; color: var(--pine); }
.item.checked .item-name { color: var(--forest); }

/* custom ember checkbox */
.cbox { position: relative; flex: none; margin-top: 1px; width: 26px; height: 26px; }
/* Input sits on top and spans the full box so the ENTIRE area is clickable.
   z-index keeps it above the visual .box; the visuals ignore pointer events. */
.cbox input { position: absolute; inset: 0; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; z-index: 2; }
.cbox .box {
  width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--sage); background: var(--canvas);
  display: grid; place-items: center; transition: all .15s var(--ease);
  pointer-events: none; /* let clicks pass through to the input underneath */
}
.cbox .box svg { pointer-events: none; }
.cbox .box svg { width: 16px; height: 16px; opacity: 0; transform: scale(.6); transition: all .15s var(--ease); color: #fff; }
.cbox input:checked + .box { background: var(--ember); border-color: var(--ember); }
.cbox input:checked + .box svg { opacity: 1; transform: scale(1); }
.cbox input:focus-visible + .box { outline: 3px solid var(--ember); outline-offset: 2px; }

/* badges */
.badge {
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: var(--radius-pill); white-space: nowrap;
}
.badge-critical { background: var(--forest); color: #fff; }
.badge-recommended { background: transparent; color: var(--sage); border: 1.5px solid var(--sage); }
.badge-optional { background: rgba(110,124,115,.12); color: var(--muted); }

/* Critical marker — small red dot shown inline next to must-not-skip items. */
.crit-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #C0392B; flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(192,57,43,.18);
}

/* help / gear */
.item-help { font-size: .9rem; color: var(--muted); margin-top: .45rem; display: none; }
.item.open .item-help { display: block; }
.help-toggle {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--canvas);
  color: var(--sage); font-weight: 800; font-size: .8rem; display: grid; place-items: center; flex: none;
}
.help-toggle:hover { border-color: var(--sage); }
.help-toggle:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.gear-link {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .82rem; font-weight: 800; color: var(--ember);
  margin-left: .25rem;
}
.gear-link:hover { color: var(--ember-dark); }

/* add your own */
.add-own { margin-top: .9rem; display: flex; gap: .5rem; }
.add-own .text-input { padding: .65rem .9rem; }
.add-own .btn { padding: .65rem 1.1rem; font-size: .95rem; flex: none; }

/* count bar */
.count-bar {
  position: sticky; bottom: 0; z-index: 50; background: var(--canvas); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: .85rem 1.2rem; margin-top: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.count-bar .count-txt { font-weight: 800; color: var(--pine); }
.count-bar .count-txt strong { color: var(--ember); }

.empty-zone { color: var(--muted); font-style: italic; padding: .5rem 0; }

/* ---------- Download page ---------- */
.summary-box { padding: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row .lbl { color: var(--muted); font-weight: 700; }
.summary-row .val { font-weight: 800; color: var(--pine); text-align: right; }
.profile-line { font-weight: 700; color: var(--forest); }

.check-inline { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0; }
.check-inline input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ember); flex: none; }
.check-inline label { font-weight: 700; color: var(--forest); }

/* Founding-member opt-in callout */
.founding-optin {
  margin: 1.1rem 0;
  background: var(--paper);
  border: 1px solid var(--lines);
  border-left: 4px solid var(--ember);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.founding-optin .founding-check { margin: 0; }
.founding-optin label { display: flex; flex-direction: column; gap: .35rem; cursor: pointer; }
.founding-title { font-weight: 800; color: var(--pine); font-size: 1.02rem; line-height: 1.3; }
.founding-sub { font-weight: 600; color: var(--forest); line-height: 1.5; }
.founding-sub strong { color: var(--ember); font-weight: 800; }
.founding-fine { font-weight: 600; font-size: .85rem; line-height: 1.4; }

.dl-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--canvas); border-top: 1px solid var(--line); padding-block: 2.5rem; margin-top: 2rem; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer .brand .wordmark { color: var(--pine); font-size: 1.2rem; }
.site-footer .brand .tile { width: 32px; height: 32px; }
.site-footer .brand .tile svg { width: 20px; height: 20px; }
.footer-note { color: var(--muted); font-size: .9rem; }
.footer-note a { font-weight: 700; }

/* ---------- Thanks page ---------- */
.thanks-wrap { text-align: center; max-width: 600px; margin-inline: auto; }
.thanks-icon {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(226,112,58,.12); display: grid; place-items: center;
  margin: 0 auto 1.25rem; color: var(--ember);
}
.thanks-icon svg { width: 40px; height: 40px; }
.tease {
  background: #EEF2EF; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin: 2rem 0; text-align: left;
}
.tease strong { color: var(--pine); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .rig-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 920px) {
  .rig-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 520px) {
  .header-tag { display: none; }
  .dl-actions .btn, .hero .cta-row .btn { width: 100%; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* fade-in util */
.fade-in { animation: fadeUp .4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.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;
}

/* ── Feedback section (early-launch) ───────────────────────────────
   Remove this block + the #feedback section in index.html when done. */
.fb-section { background: var(--paper); }
.fb-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 760px;
  margin-inline: auto;
}
.fb-form { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.fb-cats {
  border: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: .55rem;
}
.fb-cats legend {
  font-size: .9rem; color: var(--muted); font-weight: 700;
  margin-bottom: .5rem; padding: 0;
}
.fb-cats label {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  padding: .42rem .85rem; cursor: pointer; font-weight: 700;
  font-size: .92rem; color: var(--forest);
  transition: border-color .15s var(--ease), background .15s var(--ease);
  user-select: none;
}
.fb-cats label:hover { border-color: var(--sage); }
.fb-cats input { accent-color: var(--ember); margin: 0; }
.fb-cats label:has(input:checked) {
  border-color: var(--ember); background: #fff4ee; color: var(--pine);
}
.fb-field { display: grid; gap: .35rem; }
.fb-field > span { font-size: .9rem; font-weight: 700; color: var(--forest); }
.fb-field em { color: var(--muted); font-weight: 400; font-style: normal; }
.fb-form textarea,
.fb-form input[type="text"],
.fb-form input[type="email"] {
  width: 100%; font: inherit; color: var(--pine);
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: .7rem .8rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.fb-form textarea { resize: vertical; min-height: 96px; }
.fb-form textarea:focus,
.fb-form input:focus {
  outline: none; border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(226,112,58,.15);
}
.fb-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .fb-row { grid-template-columns: 1fr; } }
.fb-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.fb-status { font-size: .92rem; font-weight: 700; }
.fb-status--ok { color: #2f7d4f; }
.fb-status--err { color: #b23b2e; }
