@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #faf8f3;
  --card: #ffffff;
  --ink: #2c2a26;
  --muted: #6f6b63;
  --accent: #2e6e4e;
  --accent-dark: #17402c;
  --accent-deep: #0f2e1f;
  --accent-light: #e9f2ec;
  --gold: #e8a33d;
  --gold-dark: #b97a1a;
  --warn-bg: #fdf6ec;
  --warn-border: #ecc27e;
  --danger-bg: #fdf0ef;
  --danger-border: #e3a09b;
  --radius: 16px;
  --max: 980px;
  --shadow-sm: 0 1px 3px rgba(28, 40, 33, 0.06), 0 1px 2px rgba(28, 40, 33, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(28, 40, 33, 0.18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(46, 110, 78, 0.07), transparent 60%),
    radial-gradient(900px 400px at -10% 30%, rgba(232, 163, 61, 0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #cfe5d8; }

/* ---------- Header / nav ---------- */
header {
  background: rgba(15, 46, 31, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 0.85rem 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.2px;
}
.brand span { color: #8fd4ad; }
nav { display: flex; flex-wrap: wrap; gap: 0.2rem; }
nav a {
  color: #c9dcd2;
  text-decoration: none;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}
nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
nav a.active { background: rgba(143, 212, 173, 0.18); color: #aee8c9; font-weight: 600; }

/* ---------- Layout & type ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.4rem 3.5rem; }

h1, h2, h3, .hero h1 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: 2.3rem; margin-bottom: 1rem; line-height: 1.2; color: var(--accent-deep); }
h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 1rem;
  color: var(--accent-dark);
  padding-bottom: 0.45rem;
  border-bottom: 2px solid #e4ddcf;
  position: relative;
}
h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 64px; height: 2px;
  background: var(--gold);
}
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: #23412f; }
p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1.1rem 1.4rem; }
li { margin-bottom: 0.55rem; }
li::marker { color: var(--accent); font-weight: 700; }
a { color: var(--accent); text-decoration-color: rgba(46, 110, 78, 0.35); text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--accent-dark); }
strong { color: #1d1c19; }

.crumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 300px at 90% -40%, rgba(143, 212, 173, 0.28), transparent 60%),
    radial-gradient(500px 260px at -5% 110%, rgba(232, 163, 61, 0.18), transparent 55%),
    linear-gradient(150deg, var(--accent-deep) 0%, #1c4a33 55%, #275c41 100%);
  color: #fff;
  border-radius: 22px;
  padding: 3.25rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M70 20c14 18 14 42 0 60-14-18-14-42 0-60z' fill='%23ffffff' fill-opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 0.9rem;
  color: #fff;
}
.hero p { max-width: 660px; font-size: 1.1rem; color: #dcebe2; position: relative; }
.hero .cta {
  display: inline-block;
  margin-top: 1.4rem;
  background: linear-gradient(180deg, #f5b34f, var(--gold));
  color: #3a2604;
  font-weight: 700;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 18px -6px rgba(232, 163, 61, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero .cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(232, 163, 61, 0.7); color: #3a2604; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; margin: 1.6rem 0; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #6fae8d);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0.4rem; color: var(--accent-dark); font-size: 1.25rem; }
.card .tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid #cbdfd2;
  border-radius: 999px;
  padding: 0.18rem 0.75rem;
  margin-bottom: 0.5rem;
}
.card a.more { font-weight: 600; text-decoration: none; }
.card a.more:hover { text-decoration: underline; }

/* ---------- Callouts ---------- */
.note, .warning, .danger {
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem 1.15rem 3.3rem;
  margin: 1.6rem 0;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.note::before, .warning::before, .danger::before {
  position: absolute;
  left: 1.15rem;
  top: 1.05rem;
  font-size: 1.15rem;
}
.note { background: var(--accent-light); border: 1px solid #c3dccd; border-left: 4px solid var(--accent); }
.note::before { content: "💡"; }
.warning { background: var(--warn-bg); border: 1px solid var(--warn-border); border-left: 4px solid var(--gold-dark); }
.warning::before { content: "⚠️"; }
.danger { background: var(--danger-bg); border: 1px solid var(--danger-border); border-left: 4px solid #c0554d; }
.danger::before { content: "🆘"; }
.note p:last-child, .warning p:last-child, .danger p:last-child { margin-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline {
  border-left: 3px solid transparent;
  border-image: linear-gradient(to bottom, var(--accent), var(--gold)) 1;
  margin: 1.75rem 0 1.75rem 0.5rem;
  padding-left: 1.75rem;
}
.timeline .stage { margin-bottom: 2rem; position: relative; }
.timeline .stage::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.4rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 110, 78, 0.12);
}
.timeline .stage h3 { margin: 0 0 0.35rem; }
.timeline .stage .when {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.14rem 0.7rem;
  display: inline-block;
  margin-bottom: 0.3rem;
}

/* ---------- Supplement products ---------- */
.product {
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product h3 { margin-top: 0; }
.product .why { color: var(--muted); font-size: 0.95rem; }
.product .btn-amzn {
  display: inline-block;
  margin-top: 0.7rem;
  background: linear-gradient(180deg, #f6b656, var(--gold));
  color: #3a2604;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px -4px rgba(185, 122, 26, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product .btn-amzn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -5px rgba(185, 122, 26, 0.6);
  color: #3a2604;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.4rem 0;
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.94rem;
  box-shadow: var(--shadow-sm);
}
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #efece3; vertical-align: top; }
th {
  background: var(--accent-dark);
  color: #eaf4ee;
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
tr:nth-child(even) td { background: #faf9f4; }
tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
footer {
  background: var(--accent-deep);
  color: #9fb8aa;
  padding: 2.5rem 1.4rem;
  font-size: 0.84rem;
  border-top: 4px solid var(--gold);
  margin-top: 2rem;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
footer a { color: #cfe2d7; }
footer p { margin-bottom: 0.65rem; }

/* ---------- Logo mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand .logo { display: block; flex-shrink: 0; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 8px;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #cfe2d7;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 0.5rem;
  }
  .nav-open nav { display: flex; }
  nav a { padding: 0.55rem 0.85rem; border-radius: 10px; font-size: 0.95rem; }
}

/* ---------- Scroll-in reveal ---------- */
.reveal { opacity: 0; }
.reveal.in-view { animation: rise 0.6s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .reveal.in-view { animation: none; }
}

/* ---------- Quit counter ---------- */
.tracker {
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem 1.6rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
}
.tracker h2 { margin-top: 0; border-bottom: none; }
.tracker h2::after { display: none; }
.tracker-controls { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.tracker-count {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.tracker-msg { font-size: 1.05rem; color: #46554c; }
.tracker-reset {
  background: none;
  border: 1px solid #cfc9ba;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}
.tracker-reset:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Buttons & form controls ---------- */
.btn-primary {
  background: linear-gradient(180deg, #3b8563, var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--sans);
  border: 0;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(46, 110, 78, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -5px rgba(46, 110, 78, 0.6); }
input[type="number"], input[type="date"], select {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8d2c3;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  max-width: 100%;
}
input:focus, select:focus { outline: 2px solid rgba(46, 110, 78, 0.35); border-color: var(--accent); }

/* ---------- Taper calculator ---------- */
.calc {
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  margin: 1.4rem 0;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
}
.calc-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.calc-grid .unit-hint { display: none; }
.calc-error { color: #a33f37; font-weight: 600; margin-top: 0.9rem; }
.calc-summary { margin-top: 1.2rem; }
.calc-hint { font-size: 0.88rem; color: var(--muted); }

/* ---------- Prep checklist ---------- */
.checklist-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 64px;
  z-index: 10;
}
.progress {
  flex: 1;
  min-width: 140px;
  height: 10px;
  background: #ece7da;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #6fae8d);
  border-radius: 999px;
  transition: width 0.35s ease;
}
#progress-label { font-size: 0.85rem; font-weight: 600; color: var(--accent-dark); white-space: nowrap; }
.checklist { list-style: none; margin-left: 0; }
.checklist li {
  background: var(--card);
  border: 1px solid #e8e2d4;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  justify-content: space-between;
}
.checklist label { display: flex; gap: 0.65rem; align-items: baseline; cursor: pointer; flex: 1; }
.checklist input[type="checkbox"] {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--accent);
  transform: translateY(2px);
  cursor: pointer;
}
.checklist li:has(input:checked) { background: #f2f7f3; border-color: #cbdfd2; }
.checklist li:has(input:checked) label { text-decoration: line-through; text-decoration-color: rgba(46,110,78,0.45); color: #7a8880; }
.mini-amzn {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: #fdf3e0;
  border: 1px solid #ecd3a3;
  color: #8a5b10;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  text-decoration: none;
  align-self: center;
}
.mini-amzn:hover { background: #fbe9c8; color: #6d4708; }

/* ---------- Story page ---------- */
.story-divider {
  border: none;
  width: 72px;
  height: 3px;
  background: var(--gold);
  border-radius: 999px;
  margin: 2.5rem auto;
}

/* ---------- Print ---------- */
@media print {
  header, footer, .no-print, .hero .cta, .tracker { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  main { padding: 0; max-width: 100%; }
  .checklist li, .note, .warning, .danger { box-shadow: none; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  h1 { font-size: 20pt; }
  h2 { font-size: 15pt; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 2.1rem 1.5rem; border-radius: 18px; }
  .hero h1 { font-size: 1.8rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }
  body { font-size: 16px; }
  main { padding-top: 1.75rem; }
}
