/* ==========================================================================
   CookConverters.com — "Kitchen Brass & Chalkboard" shared stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Caveat:wght@500;600;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  /* Palette */
  --charcoal: #2B2823;
  --charcoal-soft: #38342c;
  --brass: #C08552;
  --brass-light: #D9A876;
  --brass-dark: #8f5f38;
  --cream: #F5EFE6;
  --cream-warm: #EFE4D3;
  --tomato: #C1440E;
  --tomato-dark: #9c3609;
  --sage: #7C8B6F;
  --line: rgba(43, 40, 35, 0.14);
  --shadow: rgba(43, 40, 35, 0.25);

  /* Type */
  --font-display: 'Caveat', cursive;
  --font-serif: 'Fraunces', serif;
  --font-mono: 'Space Grotesk', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--tomato); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

.section--tight { padding: 40px 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--charcoal);
  color: var(--cream);
  border-bottom: 4px solid var(--brass);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.logo .spoon {
  font-size: 1.5rem;
  transform: rotate(-15deg);
  display: inline-block;
}

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--cream-warm);
  opacity: 0.88;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--brass-light);
  opacity: 1;
  text-decoration: none;
  border-bottom-color: var(--brass-light);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(192,133,82,0.15), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}

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

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .dial-wrap { order: -1; }
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--tomato);
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  margin: 10px 0 18px;
  color: var(--charcoal);
}

.hero h1 .script {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--tomato);
  font-size: 1.15em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--charcoal-soft);
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn--primary {
  background: var(--tomato);
  color: var(--cream);
  box-shadow: 0 4px 0 var(--tomato-dark);
}
.btn--primary:hover { box-shadow: 0 6px 0 var(--tomato-dark); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--tomato-dark); }

.btn--ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn--ghost:hover { background: var(--charcoal); color: var(--cream); }

/* ---------- Measuring Cup Dial (signature component) ---------- */
.dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dial {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9c9, var(--brass) 55%, var(--brass-dark) 100%);
  box-shadow:
    0 10px 0 var(--brass-dark),
    0 18px 30px var(--shadow),
    inset 0 0 0 8px rgba(43,40,35,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: inset 0 2px 8px rgba(43,40,35,0.25);
}

.dial-face {
  position: relative;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  border-radius: 50%;
}

.dial-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 10px;
  background: var(--charcoal);
  opacity: 0.35;
  transform-origin: 50% 100px;
}

.dial-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 88px;
  background: linear-gradient(var(--tomato), var(--tomato-dark));
  border-radius: 4px;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(-90deg);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 0 4px var(--cream);
  z-index: 2;
}

.dial-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--brass-dark);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  box-shadow: 0 0 0 3px var(--cream);
}

.dial-readout {
  position: absolute;
  bottom: 34%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--charcoal);
}

.dial-caption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  text-align: center;
}

/* ---------- Chalkboard scribble result ---------- */
.result-box {
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35);
}

.result-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

.result-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--brass-light);
  margin-bottom: 6px;
}

.result-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--cream);
  position: relative;
  display: inline-block;
}

.result-value.is-scribbled::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -2px;
  height: 8px;
  border-bottom: 4px solid var(--brass-light);
  border-radius: 2px;
  animation: scribble-underline 0.5s ease forwards;
  transform-origin: left;
  transform: scaleX(0);
}

@keyframes scribble-underline {
  to { transform: scaleX(1); }
}

/* ---------- Calculator Card ---------- */
.calc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 0 var(--line);
}

.calc-card h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.calc-card .sub {
  color: var(--charcoal-soft);
  margin-bottom: 22px;
  font-size: 0.98rem;
}

.field-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.field {
  flex: 1;
  min-width: 140px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--charcoal-soft);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brass);
}

.swap-btn {
  align-self: flex-end;
  margin-bottom: 16px;
  background: var(--cream-warm);
  border: 2px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.15s ease;
}
.swap-btn:hover { background: var(--brass-light); transform: rotate(180deg); }

/* ---------- Hub grid ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.hub-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: block;
  color: var(--charcoal);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hub-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: 0 8px 20px var(--shadow);
}

.hub-card .icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.hub-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.hub-card p {
  font-size: 0.92rem;
  color: var(--charcoal-soft);
  margin: 0;
}

.category-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  font-weight: 600;
  margin: 40px 0 18px;
}

/* ---------- Cross-link callout ---------- */
.callout {
  background: var(--cream-warm);
  border: 2px dashed var(--brass);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.callout p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--charcoal);
}

/* ---------- Content pages ---------- */
.content-page h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.content-page .sub {
  color: var(--charcoal-soft);
  margin-bottom: 32px;
}

.content-page h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-top: 36px;
}

.content-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}

.content-page th,
.content-page td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.content-page th {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--charcoal-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream-warm);
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.footer-grid a { color: var(--brass-light); }

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-note {
  opacity: 0.6;
  font-size: 0.8rem;
  margin-top: 18px;
}

/* ---------- Breadcrumb ---------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--charcoal-soft);
  margin-bottom: 18px;
}
.crumb a { color: var(--sage); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.88rem; color: var(--charcoal-soft); }

/* ---------- Responsive: small phones ---------- */
@media (max-width: 480px) {
  .site-header .wrap { justify-content: center; text-align: center; }
  .site-nav { width: 100%; justify-content: center; }
  .dial { width: 220px; height: 220px; }
}
