/* ==========================================================================
   home.css — Home page styles for The Prepper's Firearms Guide
   Uses tokens and design system variables from storefront.css.
   All home-specific class names are prefixed with "hm-".
   ========================================================================== */

/* ---------- Nav Extensions ---------- */
.hm-nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.hm-nav-right .theme-toggle {
  margin-left: 0;
  margin-right: 0;
}
.hm-nav-right .nav-cta {
  margin-left: 0;
}
.hm-nav-link {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.hm-nav-link:hover {
  color: var(--paper);
}

/* ---------- Hero Section ---------- */
.hm-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.hm-hero-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.hm-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0.75rem auto 1.25rem;
  color: var(--paper);
  text-wrap: balance;
}
.hm-hero-lead {
  font-size: clamp(1.1875rem, 2.2vw, 1.35rem);
  color: var(--muted);
  line-height: 1.55;
  max-width: 660px;
  margin: 0 auto 2rem;
}
.hm-hero-lead b {
  color: var(--paper);
  font-weight: 700;
}
.hm-hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.cta-btn.hm-cta-big {
  font-size: clamp(1.1875rem, 2.2vw, 1.3125rem);
  padding: 18px 38px;
}
.hm-price-now {
  font-size: 1.3rem;
  font-weight: 800;
  margin-left: 6px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.hm-micro {
  font-size: 0.9375rem;
  color: var(--muted-2);
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* ---------- Stats Strip ---------- */
.hm-stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(23, 21, 18, 0.75);
}
.hm-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.hm-stat-item {
  padding: 26px 16px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.hm-stat-item:first-child {
  border-left: none;
}
.hm-stat-item b {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  display: block;
  letter-spacing: -0.01em;
  color: var(--gold-bright);
  line-height: 1.15;
  margin-bottom: 4px;
}
.hm-stat-item span {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Shared Section Typography ---------- */
.hm-sec-desc {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0.75rem auto 0;
  line-height: 1.55;
}

/* ---------- What's Inside (#guide) ---------- */
.hm-guide-get {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: 2.5rem;
}
.hm-guide-cover {
  position: sticky;
  top: calc(var(--head-h) + 16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #171512;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.75);
}
.hm-guide-cover img {
  width: 100%;
  height: auto;
  display: block;
}
.hm-chapters {
  display: flex;
  flex-direction: column;
}
.hm-chapter {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: baseline;
}
.hm-chapter:first-child {
  border-top: 1px solid var(--line);
}
.hm-ch-no {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.hm-chapter h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.25;
}
.hm-chapter p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* ---------- Why It's Worth It (#worth) ---------- */
.hm-worth-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 2.5rem auto 0;
  text-align: center;
}
.hm-worth-item {
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, #1d1b16, #13120f);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.8);
}
.hm-worth-item b {
  font-size: clamp(2rem, 4vw, 2.75rem);
  display: block;
  color: var(--gold-bright);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hm-worth-item span {
  font-size: 1.0625rem;
  color: var(--muted);
  display: block;
  line-height: 1.45;
}

/* ---------- The Offer (#buy) ---------- */
.hm-offer-box {
  max-width: 520px;
  margin: 2.5rem auto 0;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #1f1b13, #14120e);
  padding: clamp(32px, 5vw, 44px) clamp(22px, 4vw, 36px);
  text-align: center;
  box-shadow: 0 18px 48px -16px rgba(0, 0, 0, 0.9), 0 0 32px -12px rgba(237, 176, 42, 0.35);
}
.hm-save-badge {
  display: inline-block;
  background: var(--gold-grad);
  color: #2a1c00;
  font-weight: 800;
  font-size: 0.9375rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px -4px rgba(237, 176, 42, 0.5);
}
.hm-big-price {
  font-size: clamp(2.75rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
}
.hm-per {
  font-size: 1rem;
  color: var(--muted-2);
  margin: 8px 0 24px;
}
.hm-offer-checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  text-align: left;
  max-width: 380px;
}
.hm-offer-checklist li {
  padding: 9px 0 9px 28px;
  position: relative;
  font-size: 1.0625rem;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.hm-offer-checklist li:last-child {
  border-bottom: none;
}
.hm-offer-checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}
.hm-offer-btn {
  width: 100%;
}
.hm-reassure {
  font-size: 0.875rem;
  color: var(--muted-2);
  margin: 16px 0 0;
  line-height: 1.5;
}

/* ---------- Is It For You? (#fit) ---------- */
.hm-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 860px;
  margin: 2.5rem auto 0;
}
.hm-fit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #171512;
  font-size: 1.0625rem;
  color: var(--paper);
  line-height: 1.5;
}
.hm-mk {
  color: var(--ok);
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.2;
}
.hm-fit-item.hm-no .hm-mk {
  color: var(--red-bright);
}

/* ---------- Reviews (#reviews) ---------- */
.hm-quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 820px;
  margin: 2.5rem auto 0;
  align-items: stretch;
}
.hm-quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #171512;
  padding: 28px 24px;
}
.hm-stars {
  color: var(--gold-bright);
  font-size: 1.125rem;
  letter-spacing: 3px;
  margin-bottom: 14px;
}
.hm-quote p {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  color: var(--paper);
  line-height: 1.6;
}
.hm-who {
  font-size: 0.875rem;
  color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Newsletter Teaser (#newsletter) ---------- */
.hm-news {
  background: radial-gradient(800px 380px at 50% 0%, rgba(237, 176, 42, 0.08), transparent 70%);
}
.hm-news-card {
  max-width: 860px;
  margin: 2.5rem auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #171512;
  overflow: hidden;
  box-shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.8);
}
.hm-news-top {
  padding: 34px 28px 26px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hm-news-logo {
  height: 38px;
  width: auto;
  margin: 0 auto 14px;
}
.hm-news-top h3 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--paper);
}
.hm-news-top p {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.55;
}
.hm-news-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hm-nt {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hm-nt:first-child {
  border-right: 1px solid var(--line);
}
.hm-t-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.hm-t-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--paper);
  margin-bottom: 16px;
}
.hm-t-price small {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted-2);
}
.hm-nt ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  flex-grow: 1;
}
.hm-nt li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.hm-nt li:last-child {
  border-bottom: none;
}
.hm-nt li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.hm-tier-btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: 1.0625rem;
}

/* ---------- FAQ (#faq) Accordions ---------- */
.hm-faq {
  max-width: 740px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hm-faq details {
  background: #171512;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.hm-faq details[open] {
  border-color: rgba(237, 176, 42, 0.45);
}
.hm-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 52px 20px 22px;
  font-size: clamp(1.0625rem, calc(2vw * var(--ts)), 1.1875rem);
  font-weight: 600;
  color: var(--paper);
  position: relative;
  line-height: 1.4;
}
.hm-faq summary::-webkit-details-marker {
  display: none;
}
.hm-faq summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}
.hm-faq details[open] summary::after {
  content: "\2212";
}
.hm-faq p {
  padding: 0 22px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ---------- Final CTA (#final) ---------- */
.hm-final {
  text-align: center;
}
.hm-final h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.hm-final-desc {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}
.hm-guarantee-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.6rem;
  font-size: 0.9375rem;
  color: var(--muted);
  border: 1px solid rgba(237, 176, 42, 0.35);
  border-radius: 999px;
  padding: 10px 22px;
  background: rgba(237, 176, 42, 0.06);
  line-height: 1.4;
}
.hm-guarantee-line b {
  color: var(--paper);
}

/* ==========================================================================
   Light Mode Overrides: html[data-theme="light"]
   ========================================================================== */
html[data-theme="light"] .hm-nav-link:hover {
  color: var(--paper);
}
html[data-theme="light"] .hm-hero-lead b {
  color: var(--paper);
}
html[data-theme="light"] .hm-stats-band {
  background: #fff;
  border-color: var(--line);
}
html[data-theme="light"] .hm-stat-item b {
  color: var(--gold);
}
html[data-theme="light"] .hm-guide-cover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px -16px rgba(60, 40, 0, 0.25);
}
html[data-theme="light"] .hm-worth-item {
  background: #fff;
  border-color: rgba(154, 98, 0, 0.25);
  box-shadow: 0 10px 30px -22px rgba(60, 40, 0, 0.35);
}
html[data-theme="light"] .hm-worth-item b {
  color: var(--gold);
}
html[data-theme="light"] .hm-offer-box {
  background: #fffaf0;
  border-color: var(--gold);
  box-shadow: 0 20px 48px -20px rgba(120, 80, 0, 0.35), 0 0 32px -16px rgba(255, 170, 0, 0.35);
}
html[data-theme="light"] .hm-fit-item {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px -16px rgba(60, 40, 0, 0.25);
}
html[data-theme="light"] .hm-fit-item.hm-no .hm-mk {
  color: var(--red);
}
html[data-theme="light"] .hm-quote {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 24px -18px rgba(60, 40, 0, 0.25);
}
html[data-theme="light"] .hm-stars {
  color: var(--gold);
}
html[data-theme="light"] .hm-news-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px -20px rgba(60, 40, 0, 0.25);
}
html[data-theme="light"] .hm-faq details {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px -10px rgba(60, 40, 0, 0.15);
}
html[data-theme="light"] .hm-guarantee-line {
  border-color: rgba(154, 98, 0, 0.35);
  background: rgba(154, 98, 0, 0.06);
}

/* ==========================================================================
   Mobile / Responsive (<= 760px) & 360px overflow prevention
   ========================================================================== */
@media (max-width: 760px) {
  .hm-nav-link {
    display: none;
  }
  .hm-stats-grid {
    grid-template-columns: 1fr;
  }
  .hm-stat-item {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 18px 14px;
  }
  .hm-stat-item:first-child {
    border-top: none;
  }
  .hm-guide-get {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hm-guide-cover {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }
  .hm-worth-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hm-worth-item {
    padding: 24px 18px;
  }
  .hm-fit-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hm-quotes {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hm-news-tiers {
    grid-template-columns: 1fr;
  }
  .hm-nt:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .hm-nt {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .brand .b-name {
    display: none;
  }
  .hm-nav-right {
    gap: 10px;
  }
  .hm-chapter {
    gap: 12px;
  }
  .hm-offer-box {
    padding: 28px 18px;
  }
  .hm-guarantee-line {
    font-size: 0.875rem;
    padding: 8px 16px;
  }
}

.hm-big-price .cta-was{margin-right:.3em}

/* Free tier: the sign-up form sits right in the card */
form.hm-nt-form{margin-top:auto;max-width:none;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:10px}
form.hm-nt-form .fn-email,form.hm-nt-form button{flex:none;width:100%;min-height:52px}
form.hm-nt-form .nl-msg,form.hm-nt-form .nl-error{flex:none;width:100%}
/* after a sign-up only the confirmation stays */
form.hm-nt-form.is-done .fn-email,form.hm-nt-form.is-done button{display:none}

/* ---------- Newsletter sign-up pop-up ---------- */
.nl-pop .m-eye { color: var(--gold); }
.nl-pop .nlp-plan-form { flex-direction: column; max-width: none; width: 100%; margin: 0; text-align: left; }
.nl-pop .nlp-plan-form .fn-email,
.nl-pop .nlp-plan-form button { width: 100%; flex: none; }
.nl-pop .nlp-plan-form .nl-msg:empty,
.nl-pop .nlp-plan-form .nl-error:empty { display: none; }
html[data-theme="light"] .nl-pop .m-eye { color: #9a6200; }
