/* ChefVault — Shared SEO Page Styles
   Dark theme, brand colors:
   - bg #0a0a0f
   - surface #1a1a2e
   - accent gold #d4a574
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #1a1a2e;
  --surface-2: #232340;
  --border: #2a2a45;
  --text: #f4f1ea;
  --text-dim: #a8a596;
  --text-muted: #7a786d;
  --accent: #d4a574;
  --accent-bright: #e8bd87;
  --accent-deep: #b88a5a;
  --success: #7fb86c;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(212, 165, 116, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(212, 165, 116, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-bright); text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.brand {
  font-family: "Georgia", "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand span { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.nav-cta:hover {
  background: var(--accent-bright);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { padding: 2.5rem 0 4rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-dim); }

/* ===== HERO / H1 ===== */
.hero {
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
  background: rgba(212, 165, 116, 0.08);
}

h1 {
  font-family: "Georgia", "Playfair Display", serif;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 60ch;
}

/* ===== BIG CONVERSION DISPLAY ===== */
.big-conversion {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  margin: 2rem 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.big-conversion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(212, 165, 116, 0.1), transparent 60%);
  pointer-events: none;
}

.conv-card {
  text-align: center;
  position: relative;
}

.conv-card .label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.conv-card .value {
  font-family: "Georgia", "Playfair Display", serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.conv-card .unit {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* ===== SECTIONS ===== */
section { margin: 2.5rem 0; }

h2 {
  font-family: "Georgia", "Playfair Display", serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.005em;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-dim);
}

/* ===== TABLES ===== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: var(--surface-2);
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(212, 165, 116, 0.04); }

td.amount { font-weight: 600; color: var(--text); }
td.grams { color: var(--accent); font-weight: 600; }

/* ===== TABLE GRID (2-col) ===== */
.tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (max-width: 720px) {
  .tables-grid { grid-template-columns: 1fr; }
}

/* ===== EDUCATIONAL ===== */
.edu {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}
.edu p:last-child { margin-bottom: 0; }

.notes {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 1.25rem;
  background: rgba(212, 165, 116, 0.05);
  border-radius: 8px;
  border: 1px dashed var(--accent-deep);
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin: 3rem 0 2rem;
  color: var(--bg);
  box-shadow: var(--shadow);
}

.cta h2 {
  color: var(--bg);
  margin-bottom: 0.5rem;
}

.cta p {
  color: rgba(10, 10, 15, 0.8);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.cta-btn {
  display: inline-block;
  background: var(--bg);
  color: var(--accent);
  padding: 0.9rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease;
  text-decoration: none;
}
.cta-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--accent-bright);
}

/* ===== RELATED ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: block;
}
.related-card:hover {
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card .r-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.related-card .r-conv {
  color: var(--accent);
  font-size: 0.85rem;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a { color: var(--text-dim); }

/* ===== INDEX PAGE ===== */
.index-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  margin: 1.5rem auto;
  display: block;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-chip {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: capitalize;
}
.filter-chip:hover {
  border-color: var(--accent-deep);
  color: var(--text);
}
.filter-chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  margin: 2rem 0;
}

.ing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: block;
}
.ing-card:hover {
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  text-decoration: none;
  background: var(--surface-2);
}
.ing-card .i-name {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.ing-card .i-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.ing-card .i-cat {
  color: var(--text-muted);
  text-transform: capitalize;
}
.ing-card .i-conv {
  color: var(--accent);
  font-weight: 600;
}

/* ===== STAT BAR (index) ===== */
.stat-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}
.stat .num {
  font-family: "Georgia", "Playfair Display", serif;
  font-size: 1.85rem;
  color: var(--accent);
  font-weight: 700;
  display: block;
}
.stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  main { padding: 1.5rem 0 3rem; }
  .big-conversion { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem 1rem; }
  .conv-card { padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
  .conv-card:last-child { padding-bottom: 0; border-bottom: none; }
  .cta { padding: 2rem 1rem; }
  th, td { padding: 0.6rem 0.7rem; font-size: 0.85rem; }
  .stat-bar { gap: 1.5rem; }
}

/* ===== PRINT ===== */
@media print {
  body { background: white; color: black; }
  .site-header, .cta, .site-footer { display: none; }
}
