/* ============================================================
   Healthy Home Compliance — site styles
   Load order: reset → tokens → base → components → utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; }

:root {
  /* Brand */
  --green: #62bb00;
  --green-ink: #4a8f00;
  --green-deep: #2f5a00;

  /* Neutrals — warm */
  --ink: #1a1f1c;         /* deep ink bg */
  --charcoal: #3c3c3c;    /* primary text */
  --slate: #5b6560;
  --mute: #8a928d;
  --hair: #e6e1d6;        /* hairlines on cream */
  --hair-ink: rgba(255,255,255,0.12);
  --cream: #f5f1ea;
  --cream-2: #ece6d7;
  --paper: #faf7f1;
  --white: #ffffff;

  /* Accent (safety orange — used sparingly) */
  --hi-vis: #e85d1a;

  /* Type */
  --sans: 'Inter', system-ui, sans-serif; /* @kind font */
  --display: 'Archivo', 'Inter', system-ui, sans-serif; /* @kind font */
  --mono: 'JetBrains Mono', ui-monospace, monospace; /* @kind font */

  /* Rhythm */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --max: 1240px;
  --pad: clamp(20px, 4vw, 56px);
}

body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.h-display { font-weight: 800; font-size: clamp(44px, 6.8vw, 104px); letter-spacing: -0.035em; line-height: 0.96; }
.h-xl      { font-weight: 800; font-size: clamp(38px, 5vw, 72px);  letter-spacing: -0.03em;  line-height: 1.0; }
.h-lg      { font-weight: 700; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; }
.h-md      { font-weight: 700; font-size: clamp(22px, 2vw, 28px);  line-height: 1.15; }
.h-sm      { font-weight: 700; font-size: 18px;                     line-height: 1.2; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.eyebrow--green { color: var(--green-ink); }
.eyebrow--ink   { color: rgba(255,255,255,0.66); }

.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--charcoal); text-wrap: pretty; max-width: 62ch; }
.body p { text-wrap: pretty; max-width: 70ch; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap--wide { max-width: 1440px; }
section { padding: clamp(72px, 9vw, 140px) 0; }
section.tight { padding: clamp(48px, 6vw, 88px) 0; }

.bg-ink    { background: var(--ink); color: var(--cream); }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--cream); }
.bg-ink .lede { color: rgba(245,241,234,0.82); }
.bg-cream  { background: var(--cream); }
.bg-cream2 { background: var(--cream-2); }
.bg-paper  { background: var(--paper); }
.bg-green  { background: var(--green); color: var(--ink); }

/* ---------- Header ---------- */
.topbar {
  background: var(--ink);
  color: rgba(245,241,234,0.78);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.topbar__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(98,187,0,0.14);
  color: var(--green);
  text-transform: uppercase;
}
.topbar__pill::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(98,187,0,0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(98,187,0,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(98,187,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(98,187,0,0); }
}
.topbar__contact { display: flex; gap: 24px; }
.topbar__contact a { text-decoration: none; color: inherit; }
.topbar__contact a:hover { color: var(--green); }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: saturate(1.2);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
}
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__logo img { height: 50px; width: auto; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--charcoal);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav__links a:hover, .nav__links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--green);
}
@media (max-width: 900px) {
  .nav__links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: transform .08s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--green);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.btn--primary:hover { background: var(--green-ink); color: var(--cream); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.bg-ink .btn--ghost { color: var(--cream); border-color: var(--cream); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.bg-ink .btn--ghost:hover { background: var(--cream); color: var(--ink); }
.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn__arrow { display: inline-block; transition: transform .2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Photo placeholder ---------- */
.photo {
  position: relative;
  background:
    repeating-linear-gradient(135deg, #2a2f2b 0 10px, #1f2420 10px 20px);
  color: #a8b0ab;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  min-height: 240px;
}
.photo--cream {
  background:
    repeating-linear-gradient(135deg, #d8d1be 0 10px, #cec6b0 10px 20px);
  color: #6a6550;
}
.photo--green {
  background:
    repeating-linear-gradient(135deg, #4a8f00 0 10px, #3d7600 10px 20px);
  color: rgba(255,255,255,0.78);
}
.photo__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.42);
  color: #fff;
  padding: 6px 10px;
  border-radius: 3px;
}
.photo--cream .photo__label { background: rgba(255,255,255,0.7); color: #5a5340; }

/* Filled photo (real image inside a .photo frame) */
.photo--img { background: #2a2f2b; }
.photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.photo--img.photo--overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,24,21,0.78) 0%, rgba(20,24,21,0.28) 42%, rgba(20,24,21,0) 72%);
  pointer-events: none;
}
.photo--img > * { position: relative; z-index: 1; }

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  padding: 28px;
}
.bg-ink .panel { background: #222825; border-color: rgba(255,255,255,0.08); }
.bg-cream .panel { background: var(--paper); }

/* ---------- Ticks ---------- */
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tick-list li {
  padding-left: 34px;
  position: relative;
  line-height: 1.5;
}
.tick-list li::before {
  content: '';
  position: absolute; left: 0; top: 4px;
  width: 22px; height: 22px;
  background: var(--green);
  border-radius: 50%;
}
.tick-list li::after {
  content: '';
  position: absolute; left: 6px; top: 10px;
  width: 10px; height: 5px;
  border: solid var(--ink);
  border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(245,241,234,0.72);
  padding: 72px 0 28px;
  font-size: 14px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer a { color: rgba(245,241,234,0.72); text-decoration: none; display: block; padding: 4px 0; }
.footer a:hover { color: var(--green); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.5);
}

/* ---------- Credential strip ---------- */
.creds {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 22px 0;
}
.creds__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.creds__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.creds__items {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}
.cred {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}
.cred strong { color: var(--ink); font-weight: 600; letter-spacing: 0.04em; }
.cred__mark {
  width: 22px; height: 22px;
  border-radius: 3px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--green);
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
}

/* ---------- Small helpers ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(98,187,0,0.14);
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bg-ink .chip { background: rgba(98,187,0,0.16); color: var(--green); }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.kicker__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.12em;
}
.kicker__rule { flex: 1; height: 1px; background: var(--hair); }
.bg-ink .kicker__rule { background: rgba(255,255,255,0.14); }
.bg-ink .kicker__num  { color: rgba(255,255,255,0.52); }

.divider { height: 1px; background: var(--hair); border: 0; }
.bg-ink .divider { background: rgba(255,255,255,0.08); }

/* ---------- Sticky book bar (mobile) ---------- */
.stick-book {
  position: fixed; bottom: 16px; right: 16px; z-index: 60;
  display: none;
}
@media (max-width: 900px) {
  .stick-book { display: block; }
}

/* ---------- Page hero ---------- */
.phero { padding: 60px 0 40px; }
.phero__crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 20px;
}
.phero__crumb a { text-decoration: none; }
.phero__crumb a:hover { color: var(--green-ink); }

/* ============================================================
   MOBILE RESPONSIVE FIXES
   ============================================================ */

/* ---- Hamburger menu button ---- */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none; border: 0;
}
.nav__toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__inner { position: relative; }
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }              /* sticky Book button covers this on mobile */
  .nav__links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hair);
    padding: 6px var(--pad) 14px;
    box-shadow: 0 12px 22px rgba(0,0,0,0.07);
  }
  .nav__links.open { display: flex; }
  .nav__links a {
    width: 100%;
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--hair);
  }
  .nav__links a:last-child { border-bottom: 0; }
}

/* ---- Collapse multi-column layouts to a single column ---- */
@media (max-width: 768px) {
  /* Any inline content grid (except the pricing comparison table) stacks vertically */
  main section:not(#compare) [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  /* Sticky side columns shouldn't stick once stacked */
  main [style*="position:sticky"] { position: static !important; }

  /* Tame oversized headings on small screens */
  .h-display { font-size: clamp(34px, 9vw, 52px) !important; }
  .h-xl      { font-size: clamp(28px, 7.5vw, 42px) !important; }
  .h-lg      { font-size: clamp(26px, 6.5vw, 36px) !important; }

  /* Big inline display numbers (step/point counters) — shrink a bit */
  main [style*="font-size:96px"] { font-size: 64px !important; }
  main [style*="font-size:72px"] { font-size: 52px !important; }

  /* Pricing comparison table: compact, horizontally scrollable, sticky left labels */
  #compare div[style*="border:1px solid"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #compare [style*="grid-template-columns"] { min-width: 500px; }
  /* tighten every cell */
  #compare div[style*="grid-template-columns"] > div { padding: 14px 12px !important; }
  /* shrink the oversized price numbers inside the table */
  #compare [style*="font-size:42px"] { font-size: 23px !important; line-height: 1 !important; }
  /* keep the left-hand label column visible while scrolling across */
  #compare div[style*="grid-template-columns"] > div:first-child {
    position: sticky; left: 0; z-index: 2;
    background: var(--ink);
    box-shadow: 1px 0 0 rgba(255,255,255,0.08);
  }

  /* Tighten section padding on phones */
  section { padding: clamp(48px, 12vw, 72px) 0 !important; }

  /* Keep the sticky Book button clear of the bottom URL bar */
  .stick-book { bottom: 14px; right: 14px; }

  /* Photos: show at natural aspect ratio instead of fixed pixel heights */
  .photo--img {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  .photo--img .photo__img {
    position: static !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* ---- Footer: clean single-column stack on phones ---- */
@media (max-width: 600px) {
  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    margin-bottom: 40px !important;
  }
  .footer p { max-width: none !important; }
}
/* Keep footer content clear of the floating Book button */
@media (max-width: 900px) {
  .footer { padding-bottom: 104px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}
