/* ─────────────────────────────────────────────────────────────
   Kitchen Conversions — chalkboard-menu design system
   Signature: a "measurement rail" ruler motif used as section
   dividers, echoing the tick marks on a measuring cup.
───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --bg:          #23262B;
  --bg-card:     #2D3138;
  --bg-card-alt: #33383F;
  --text:        #F2EDE4;
  --text-dim:    #A9AFB8;
  --line:        #3C4149;
  --butter:      #E8B93F;
  --sage:        #8AA17E;
  --paprika:     #C1553B;

  --display: 'Fraunces', serif;
  --body: 'Public Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--butter); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--butter);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--text); }
.dim { color: var(--text-dim); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(35, 38, 43, 0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--butter); }
.brand .tick { color: var(--butter); }

nav.main-nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav.main-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); text-decoration: none; }

/* ── Measurement rail divider (signature element) ────────────
   A ruler-like row of ticks, alternating heights, referencing
   a measuring cup's gradation marks. Pure CSS, no images. */
.rail {
  height: 22px;
  margin: 48px 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 1px,
    transparent 1px, transparent 12px
  );
  background-position: bottom;
  background-repeat: repeat-x;
  background-size: auto 10px;
  position: relative;
  opacity: 0.9;
}
.rail::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.rail::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 60px; height: 18px;
  background-image: repeating-linear-gradient(
    to right,
    var(--butter) 0, var(--butter) 1px,
    transparent 1px, transparent 60px
  );
}

/* ── Buttons / tags ───────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  background: var(--butter);
  color: #23262B;
  font-weight: 600;
  font-family: var(--body);
}
.btn:hover { text-decoration: none; background: #f0c85c; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--butter); background: rgba(232,185,63,0.08); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ── Recipe-index-card style used for article/tool cards ────
   A torn-top-edge card echoing a kitchen recipe index card. */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 16px; right: 16px;
  height: 3px;
  background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
}
.card h3 { margin-bottom: 6px; }
.card .meta { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); }

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

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 32px 0 48px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer nav a { color: var(--text-dim); margin-left: 18px; }
.site-footer nav a:first-child { margin-left: 0; }

/* ── Utility ──────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.92rem;
}
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--sage); font-weight: 600; }

@media (max-width: 640px) {
  nav.main-nav { display: none; }
  .site-header .wrap { justify-content: center; }
}
