/* ==========================================================================
   FixMyEspressoMachine — design tokens
   Palette: roasted-espresso dark + copper pipe + brushed steel
   Type: Bricolage Grotesque (display) / Source Sans 3 (body) / IBM Plex Mono (specs)
   Signature: pressure-gauge dial readout on each guide card
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #1a1310;
  --surface: #241a16;
  --surface-raised: #2c211c;
  --line: #3a2b24;
  --text: #f0e8e0;
  --text-muted: #a89184;
  --copper: #c4622d;
  --copper-soft: #c4622d24;
  --steel: #8fa3b3;
  --steel-soft: #8fa3b324;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, #2c211c 0%, var(--bg) 55%);
  color: var(--text);
  font-family: 'Source Sans 3', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: 'IBM Plex Mono', monospace; }

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { color: var(--text); }
p.lede { color: var(--text-muted); }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(26, 19, 16, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .gauge-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--copper);
  position: relative;
  flex-shrink: 0;
}
.logo .gauge-dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 1.5px;
  background: var(--copper);
  transform-origin: left center;
  transform: rotate(-40deg);
}
.logo span.dim { color: var(--text-muted); font-weight: 500; }
nav.main-nav { display: flex; gap: 28px; font-size: 0.92rem; }
nav.main-nav a { text-decoration: none; color: var(--text-muted); transition: color 0.15s ease; }
nav.main-nav a:hover, nav.main-nav a:focus-visible { color: var(--copper); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--copper); }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 16ch; color: #fff; }
.hero p.lede { max-width: 54ch; font-size: 1.05rem; margin-top: 18px; }

/* ---------- section labels ---------- */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
}

/* ---------- gauge cards (signature element) ---------- */
.gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  padding: 40px 0 64px;
}
.gauge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.gauge-card:hover, .gauge-card:focus-visible { border-color: var(--copper); transform: translateY(-2px); }

.gauge-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }

/* the dial itself: conic-gradient ring standing in for a pressure gauge */
.dial {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: conic-gradient(var(--copper) calc(var(--fill, 60) * 1%), var(--line) 0);
  display: flex; align-items: center; justify-content: center;
}
.dial::before {
  content: "";
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
}
.dial .reading {
  position: absolute;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.gauge-card .cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.gauge-card h3 { font-size: 1.15rem; margin-bottom: 0; }
.gauge-card .dek { color: var(--text-muted); font-size: 0.92rem; flex-grow: 1; margin: 12px 0 18px; }

.gauge-stats {
  display: flex;
  gap: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.gauge-stats b { color: var(--text); font-weight: 500; }

/* ---------- ad slots ---------- */
.ad-slot {
  border: 1px dashed var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 18px;
  margin: 40px 0;
}
.ad-slot .tag { color: var(--steel); }

/* ---------- article ---------- */
.article-header { padding: 56px 0 32px; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: #fff; max-width: 24ch; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--text-muted);
}
.article-meta b { color: var(--copper); font-weight: 500; }

.article-body { max-width: 68ch; padding: 40px 0 0; }
.article-body h2 { font-size: 1.4rem; margin-top: 2.2em; color: #fff; }
.article-body h2 .num { color: var(--copper); margin-right: 10px; }
.article-body p { margin: 0 0 1.1em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body li { margin-bottom: 0.5em; }

.callout {
  border-left: 2px solid var(--steel);
  background: var(--steel-soft);
  padding: 14px 18px;
  margin: 1.6em 0;
  font-size: 0.94rem;
}
.callout b { color: var(--steel); font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }

.warn {
  border-left: 2px solid var(--copper);
  background: var(--copper-soft);
  padding: 14px 18px;
  margin: 1.6em 0;
  font-size: 0.94rem;
}
.warn b { color: var(--copper); font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }

.spec-table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.spec-table th {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); font-weight: 500;
}

.related { border-top: 1px solid var(--line); padding: 48px 0 64px; }

.prose { max-width: 68ch; padding: 48px 0 64px; }
.prose h2 { margin-top: 1.8em; color: #fff; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; margin-top: 40px; }
footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; color: var(--text-muted);
}
footer a { text-decoration: none; color: var(--text-muted); }
footer a:hover { color: var(--copper); }

@media (max-width: 640px) {
  nav.main-nav { gap: 16px; font-size: 0.85rem; }
  .hero { padding: 48px 0 40px; }
  .gauge-grid { padding: 28px 0 48px; }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
