/* ==========================================================================
   Small Wedding Budget Calculator — shared stylesheet
   Palette: sage / blush / cream, matching the Small Wedding & Elopement
   Budget Planner Gumroad template.
   ========================================================================== */

:root {
  /* Brand palette */
  --sage: #8FA584;
  --sage-dark: #64775C;
  --sage-light: #E4EAE0;
  --blush: #E9C7C2;
  --blush-dark: #D9A69F;
  --blush-light: #F7E8E5;
  --cream: #FBF7EF;
  --cream-dark: #F2EADA;
  --ink: #40392F;
  --ink-soft: #6B6255;
  --gold: #C9A24B;
  --white: #FFFFFF;
  --danger: #B5544A;
  --success: #5B7A52;

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1080px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(64, 57, 47, 0.08);
  --shadow-sm: 0 2px 10px rgba(64, 57, 47, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--sage-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--sage-dark); }
a:hover { color: var(--gold); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--sage-dark);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sage);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
}
.main-nav a:hover, .main-nav a.active { color: var(--sage-dark); }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.75rem 0;
  }
  .main-nav a { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--cream-dark); }
  .site-header .container { flex-wrap: wrap; }
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 2.75rem 0 2rem;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--sage-light);
  color: var(--sage-dark);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero p.lede {
  max-width: 640px;
  margin: 0 auto 1.25rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--sage-dark);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--sage); color: var(--white); }
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover { background: #B7913F; color: var(--white); }
.btn-outline {
  background: transparent;
  border-color: var(--sage);
  color: var(--sage-dark);
}
.btn-outline:hover { background: var(--sage-light); color: var(--sage-dark); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ---------------- Cards / Sections ---------------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
section { padding: 2.5rem 0; }
section.alt { background: var(--white); }
section.sage { background: var(--sage-light); }
.section-title { text-align: center; margin-bottom: 1.75rem; }
.section-title p { color: var(--ink-soft); max-width: 620px; margin: 0.5rem auto 0; }

/* ---------------- Calculator Form ---------------- */
.calc-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 900px) {
  .calc-shell { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

.mode-toggle {
  display: flex;
  background: var(--cream-dark);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}
.mode-toggle button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.mode-toggle button.active {
  background: var(--white);
  color: var(--sage-dark);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 1.35rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.field .hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.35rem; }
.field input[type="number"],
.field input[type="text"],
.field input[type="email"],
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--sage);
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--sage-dark);
}
.range-row { display: flex; align-items: center; gap: 0.75rem; }
.range-value {
  min-width: 3.4rem;
  text-align: center;
  font-weight: 700;
  color: var(--sage-dark);
  background: var(--sage-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (max-width: 420px) {
  .style-grid { grid-template-columns: 1fr; }
}
.style-option {
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  background: var(--white);
}
.style-option input { margin-right: 0.4rem; }
.style-option.selected {
  border-color: var(--sage);
  background: var(--sage-light);
}
.style-option .style-name { font-weight: 600; font-size: 0.92rem; }
.style-option .style-desc { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* ---------------- Results ---------------- */
.results-card { position: sticky; top: 90px; }
.results-total {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cream-dark);
  margin-bottom: 1rem;
}
.results-total .amount {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--sage-dark);
  font-weight: 700;
}
.results-total .label { color: var(--ink-soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

.chart-wrap { max-width: 280px; margin: 0 auto 1.25rem; }

.breakdown-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.breakdown-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--cream-dark);
  font-size: 0.92rem;
}
.breakdown-list li:last-child { border-bottom: none; }
.swatch { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: 0.55rem; flex-shrink: 0; }
.bd-label { display: flex; align-items: center; flex: 1; }
.bd-amount { font-weight: 700; color: var(--ink); margin-left: 0.5rem; }
.bd-pct { color: var(--ink-soft); font-size: 0.8rem; margin-left: 0.35rem; min-width: 2.6rem; text-align: right; }

.results-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---------------- CTA block ---------------- */
.cta-block {
  background: linear-gradient(135deg, var(--sage-dark), var(--sage));
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-block h2, .cta-block h3 { color: var(--white); }
.cta-block p { color: rgba(255,255,255,0.92); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-block .price-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.cta-block .btn-gold { margin-top: 0.75rem; }
.cta-block ul.included {
  list-style: none;
  padding: 0;
  margin: 1.1rem auto 0;
  max-width: 480px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}
.cta-block ul.included li { font-size: 0.85rem; padding-left: 1.3rem; position: relative; }
.cta-block ul.included li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

.cta-inline {
  background: var(--blush-light);
  border: 1px solid var(--blush-dark);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.cta-inline p { margin-bottom: 0.6rem; }

/* ---------------- Shop / product cards ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card img { width: 100%; height: 180px; object-fit: cover; background: var(--sage-light); }
.product-card .pc-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.product-card p.pc-desc { color: var(--ink-soft); font-size: 0.88rem; flex: 1; }
.product-card .pc-price { font-weight: 700; color: var(--sage-dark); font-size: 1.05rem; margin-bottom: 0.75rem; }
.product-card.featured { border: 2px solid var(--gold); }

/* ---------------- Infographic (percentages page) ---------------- */
.infographic {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.info-bars { display: flex; flex-direction: column; gap: 0.85rem; }
.info-bar-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 0.75rem; }
.info-bar-track { background: var(--cream-dark); border-radius: 999px; height: 20px; overflow: hidden; }
.info-bar-fill { height: 100%; border-radius: 999px; }
.info-bar-label { font-size: 0.88rem; font-weight: 600; }
.info-bar-pct { font-size: 0.85rem; text-align: right; color: var(--ink-soft); }
@media (max-width: 520px) {
  .info-bar-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .info-bar-pct { text-align: left; }
  .infographic { padding: 1.25rem 1rem; }
}

/* ---------------- Articles ---------------- */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { margin-top: 2rem; }
.article-body h3 { margin-top: 1.5rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-meta { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 1.5rem; }
.pull-quote {
  border-left: 4px solid var(--sage);
  background: var(--sage-light);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  margin: 1.5rem 0;
}
.source-note { font-size: 0.78rem; color: var(--ink-soft); }
table.cost-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.92rem; }
table.cost-table th, table.cost-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--cream-dark); }
table.cost-table th { color: var(--sage-dark); font-family: var(--font-serif); }

/* ---------------- Email capture ---------------- */
.email-capture {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}
.email-capture form { display: flex; gap: 0.5rem; max-width: 420px; margin: 1rem auto 0.5rem; flex-wrap: wrap; }
.email-capture input[type="email"] { flex: 1; min-width: 200px; }
.email-capture .fallback { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.5rem; }
.form-status { font-size: 0.85rem; margin-top: 0.6rem; min-height: 1.2em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--sage-dark);
  color: var(--sage-light);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.88rem;
}
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-grid h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.65rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; opacity: 0.85; font-size: 0.8rem; }

/* ---------------- Utility ---------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.85rem; color: var(--ink-soft); }
.badge {
  display: inline-block;
  background: var(--blush-light);
  color: var(--sage-dark);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
hr.divider { border: none; border-top: 1px solid var(--cream-dark); margin: 2rem 0; }

canvas#pngExportCanvas { display: none; }
