:root {
  --bg: #f8f4ee;
  --bg-alt: #efe8dd;
  --surface: #fffdf9;
  --ink: #231914;
  --muted: #6a5a50;
  --accent: #8c4a27;
  --accent-dark: #6b3519;
  --line: #e2d6c5;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(35, 25, 20, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 244, 238, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: var(--accent); }

.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}

.hero-desc {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-metrics {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-metrics strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
}

.hero-metrics span {
  font-size: 13px;
  color: var(--muted);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3e4d6;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.card-sub {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.tasting-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tasting-tags span {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg);
}

.recipe-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.recipe-preview dt {
  font-size: 12px;
  color: var(--muted);
}

.recipe-preview dd {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
}

.section { padding: 68px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.bean-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.bean-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.bean-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.bean-card h3 {
  margin: 0;
  font-size: 18px;
}

.bean-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.bean-notes {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink);
}

.calc-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.calc-controls,
.calc-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink);
}

.field select,
.field input[type="range"] {
  width: 100%;
}

.field select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

.field input[type="range"] {
  accent-color: var(--accent);
}

.output-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.stat-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
}

.stat-box span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stat-box strong {
  font-size: 20px;
  color: var(--ink);
}

.calc-output h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.pour-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.pour-steps li { margin-bottom: 8px; }
.pour-steps strong { color: var(--ink); }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.guide-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.guide-card h3 {
  margin: 8px 0;
  font-size: 18px;
}

.guide-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.story-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.story-box p { color: var(--muted); }

.story-meta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.meta-row:last-child { border-bottom: none; }
.meta-row span { color: var(--muted); }

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-inner p { margin: 0; }

@media (max-width: 820px) {
  .hero-grid,
  .calc-layout,
  .story-box {
    grid-template-columns: 1fr;
  }
  .nav { gap: 14px; }
  .hero { padding-top: 44px; }
}
