/* ===================================================
   HomePulse — design tokens
   Palette: stone paper, charcoal ink, aged-copper accent,
   slate secondary, moss/amber/rust status colors.
   Type: Space Grotesk (display), Inter (body), IBM Plex Mono (data)
   =================================================== */

:root {
  --ink: #23282B;
  --ink-soft: #4B5257;
  --paper: #EFEDE6;
  --paper-raised: #FAF9F5;
  --line: #DAD6CA;

  --copper: #B5652D;
  --copper-dark: #8F4E22;
  --slate: #3E5C6B;

  --status-good: #5B7553;
  --status-good-bg: #E4EADF;
  --status-watch: #C08A2E;
  --status-watch-bg: #F3E7CD;
  --status-replace: #A8432E;
  --status-replace-bg: #F3DCD5;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
  --wrap: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--copper-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-soft); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--copper); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover { color: var(--copper-dark); }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper-dark);
  margin-bottom: 0.9em;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 60ch;
}

/* ---------- Tool ---------- */

.tool-section { padding: 8px 0 40px; }

.add-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 12px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  align-items: end;
}

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

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field select, .field input {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.field select:focus, .field input:focus,
.btn-primary:focus, details summary:focus {
  outline: 3px solid var(--slate);
  outline-offset: 1px;
}

.btn-primary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  background: var(--copper);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 20px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--copper-dark); }

.empty-state {
  margin-top: 20px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Gauges (signature element) ---------- */

.gauge-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }

.gauge-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.gauge-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.gauge-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

.gauge-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill.good { background: var(--status-good-bg); color: var(--status-good); }
.status-pill.watch { background: var(--status-watch-bg); color: var(--status-watch); }
.status-pill.replace { background: var(--status-replace-bg); color: var(--status-replace); }

.gauge-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--status-good-bg) 0%, var(--status-good-bg) 70%,
    var(--status-watch-bg) 70%, var(--status-watch-bg) 100%,
    var(--status-replace-bg) 100%);
  overflow: visible;
  margin: 10px 0 8px;
}

.gauge-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--ink);
  opacity: 0.08;
  border-radius: 999px 0 0 999px;
}

.gauge-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 24px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
}

.gauge-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.gauge-cost {
  margin-top: 10px;
  font-size: 0.92rem;
}
.gauge-cost strong { color: var(--ink); font-family: var(--font-mono); }

.remove-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 8px;
}
.remove-btn:hover { color: var(--status-replace); }

/* ---------- Summary ---------- */

.summary-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--slate);
  color: #fff;
  border-radius: var(--radius);
}
.summary-card h2 { color: #fff; }
.summary-card p { color: #E7EEF1; margin: 0; }

/* ---------- Ad slots ---------- */

.ad-slot {
  margin: 8px auto;
  padding: 14px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: var(--wrap);
}

/* ---------- How it works ---------- */

.how-it-works { padding: 40px 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.steps li { display: flex; gap: 16px; }

.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--copper);
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 32px;
}

/* ---------- SEO intro ---------- */

.intro-seo { padding: 20px 0 40px; }
.intro-seo p { max-width: 68ch; }

/* ---------- FAQ ---------- */

.faq { padding: 20px 0 56px; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink);
}
.faq details p { margin-top: 10px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  background: var(--paper-raised);
}
.footer-inner p { font-size: 0.88rem; margin-bottom: 6px; }
.disclaimer { color: #8B8578; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .add-form { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 0.85rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
