/* ── Sourdough Sanity — Shared Styles ── */
:root {
  --cream:      #FAF7F2;
  --parchment:  #F2EDE4;
  --olive:      #6F7F3A;
  --olive-dark: #556030;
  --olive-soft: #8A9A50;
  --charcoal:   #2E2E2E;
  --ink:        #1A1A1A;
  --border:     rgba(46,46,46,0.12);
  --shadow:     rgba(46,46,46,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--olive);
  letter-spacing: 0.3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.88rem;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: var(--parchment); }
.nav-link.active { background: var(--olive); color: white; font-weight: 600; }

/* ── Hero ── */
.hero {
  background: var(--olive);
  color: white;
  text-align: center;
  padding: 48px 24px 40px;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto 24px;
  font-weight: 300;
}

.hero-small {
  background: var(--olive);
  color: white;
  text-align: center;
  padding: 40px 24px 32px;
}

.hero-small h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-small p {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
  font-weight: 300;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--olive-dark);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.store-badge:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0,0,0,0.2); }
.store-badge svg { flex-shrink: 0; }

/* ── Main layout ── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* ── Calculator card ── */
.calc-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 2px 20px var(--shadow);
  overflow: hidden;
  margin-bottom: 48px;
}

.calc-header { padding: 24px 24px 0; }

.calc-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.calc-header p {
  font-size: 0.9rem;
  color: rgba(46,46,46,0.65);
  margin-bottom: 20px;
}

.calc-body { padding: 0 24px 24px; }

/* ── Inputs ── */
.loaf-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(46,46,46,0.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
}

.loaf-btn {
  padding: 10px;
  border: none;
  border-radius: 9px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--olive);
  transition: background 0.15s, color 0.15s;
}

.loaf-btn.active { background: var(--olive); color: white; }

.recipe-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--olive);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.15s, transform 0.1s;
}

.recipe-btn:hover { background: var(--olive-dark); transform: translateY(-1px); }

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.temp-tip {
  font-size: 0.78rem;
  color: rgba(46,46,46,0.55);
  font-style: italic;
  margin-bottom: 10px;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--olive);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.input-section {
  background: var(--cream);
  border-left: 3px solid var(--olive);
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin-bottom: 12px;
}

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(46,46,46,0.55);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input-wrap input {
  width: 100%;
  padding: 11px 40px 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.input-wrap input::placeholder {
  font-size: 0.78rem;
  color: rgba(46,46,46,0.4);
  font-style: italic;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(111,127,58,0.12);
}

.input-unit {
  position: absolute;
  right: 13px;
  font-size: 0.78rem;
  color: rgba(46,46,46,0.45);
  pointer-events: none;
}

.section-divider { height: 1px; background: var(--border); margin: 20px 0; }

.error-msg {
  display: none;
  background: #FFF0EE;
  border: 1px solid #FFCDD2;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #B3261E;
  margin-bottom: 16px;
}
.error-msg.visible { display: block; }

.results-section { display: none; }
.results-section.visible { display: block; }

.results-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }

.stat-item {
  background: var(--cream);
  border-radius: 10px;
  padding: 10px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stat-label { font-size: 0.78rem; color: rgba(46,46,46,0.6); }
.stat-value { font-size: 0.85rem; font-weight: 600; color: var(--ink); }

.result-block {
  background: var(--cream);
  border-radius: 13px;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--olive);
}

.result-block-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(46,46,46,0.55);
  margin-bottom: 6px;
}

.result-time {
  font-size: 2rem;
  font-weight: 800;
  color: var(--olive);
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1;
  margin-bottom: 6px;
}

.result-range { font-size: 0.85rem; color: rgba(46,46,46,0.65); margin-bottom: 8px; }
.result-hint { font-size: 0.8rem; color: rgba(46,46,46,0.55); font-style: italic; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.total-label { font-size: 0.85rem; color: rgba(46,46,46,0.65); }
.total-value { font-weight: 700; font-size: 1rem; color: var(--ink); }

.disclaimer {
  font-size: 0.78rem;
  color: rgba(46,46,46,0.45);
  font-style: italic;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Site section grid (home page) ── */
.section-intro {
  text-align: center;
  margin-bottom: 28px;
}

.section-intro h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-intro p {
  font-size: 0.95rem;
  color: rgba(46,46,46,0.65);
  max-width: 480px;
  margin: 0 auto;
}

.site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

.site-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--shadow); }

.site-card-icon { font-size: 1.8rem; }

.site-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.site-card p {
  font-size: 0.85rem;
  color: rgba(46,46,46,0.65);
  line-height: 1.5;
  flex: 1;
}

.site-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--olive);
  margin-top: 4px;
}

/* ── Content pages ── */
.content-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.content-section {
  margin-bottom: 40px;
}

.content-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--olive);
}

.content-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 8px;
}

.content-section p {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 12px;
  line-height: 1.7;
}

.content-section ul, .content-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-section li {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.6;
}

.callout {
  background: var(--parchment);
  border-left: 4px solid var(--olive);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.callout p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--charcoal);
}

.callout strong { color: var(--olive); }

.sanity-badge {
  display: inline-block;
  background: var(--olive);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* Recipe cards */
.recipe-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px var(--shadow);
  margin-bottom: 20px;
}

.recipe-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.recipe-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.recipe-meta span {
  font-size: 0.78rem;
  color: rgba(46,46,46,0.55);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Equipment cards */
.equipment-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px var(--shadow);
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.equipment-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--olive);
  opacity: 0.4;
  line-height: 1;
  min-width: 40px;
}

.equipment-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.equipment-info p {
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: 10px;
  line-height: 1.6;
}

.affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--olive);
  text-decoration: none;
  background: var(--parchment);
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.15s;
}

.affiliate-link:hover { background: #e8e2d8; }

.affiliate-disclosure {
  font-size: 0.75rem;
  color: rgba(46,46,46,0.45);
  font-style: italic;
  padding: 16px;
  background: var(--parchment);
  border-radius: 10px;
  margin-bottom: 24px;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: rgba(46,46,46,0.4);
  border-top: 1px solid var(--border);
}

footer a { color: var(--olive); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 560px) {
  .site-grid { grid-template-columns: 1fr; }
  .input-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .equipment-card { flex-direction: column; gap: 8px; }
}
