/* ============================
   Butter Chicken — recipe site
   ============================ */
:root {
  --bg: #F6EFE4;
  --ink: #1F1612;
  --accent: #D14D24;
  --accent2: #E2A52B;
  --muted: #7A6A5C;
  --card: #FFFAF1;
  --line: rgba(31, 22, 18, 0.12);

  --display-font: "Instrument Serif", Georgia, serif;
  --body-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 64px);
}

html.wide { --max: 1480px; }
html:not(.show-gallery) .gallery { display: none; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "kern";
  transition: background 0.4s ease, color 0.4s ease;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* ============== Layout ============== */
.page { width: 100%; }

main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============== Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name {
  font-family: var(--display-font);
  font-size: 19px;
  letter-spacing: 0.005em;
}

.site-nav { display: flex; gap: 4px; }
.site-nav button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav button:hover { background: var(--line); }
.nav-home {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  font-weight: 500;
}
.nav-home svg { stroke: currentColor; }

/* ============== Hero ============== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 80px);
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(48px, 8vw, 112px);
  align-items: start;
}

.hero-text { padding-top: 8px; }
.hero-image .ph {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(31, 22, 18, 0.4);
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.display {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.5;
  max-width: 44ch;
  color: color-mix(in oklab, var(--ink) 84%, var(--bg));
  margin: 0 0 32px;
  text-wrap: pretty;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(20px, 3vw, 44px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  justify-content: start;
}
.meta-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.meta-value {
  font-family: var(--display-font);
  font-size: 24px;
  line-height: 1;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
}
.btn.primary:hover { transform: translateY(-1px); background: color-mix(in oklab, var(--accent) 90%, black); }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 9px 14px; font-size: 13px; }

/* Hero image */
.hero-image {
  position: relative;
}
.hero-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: color-mix(in oklab, var(--card) 92%, transparent);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}
.hero-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* ============== Placeholders ============== */
.ph {
  position: relative;
  width: 100%;
  background: var(--card);
  overflow: hidden;
}
.ph svg { display: block; }
.ph-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(31, 22, 18, 0.55);
  text-align: center;
  padding: 12px;
  text-transform: lowercase;
}
[data-palette="charcoal"] .ph-label { color: rgba(244, 236, 223, 0.7); }

/* ============== Video ============== */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.video-text { padding-top: 4px; }
.video-lede {
  font-size: 17px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--ink) 84%, var(--bg));
  margin: 18px 0 22px;
  max-width: 48ch;
  text-wrap: pretty;
}
.video-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.video-chapters li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 12px 0;
  font-size: 14.5px;
  line-height: 1.45;
  border-bottom: 1px solid var(--line);
  color: color-mix(in oklab, var(--ink) 88%, var(--bg));
}
.video-chapters .ts {
  font-variant-numeric: tabular-nums;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding-top: 1px;
}
.video-yt-link { margin-top: 20px; }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0807;
  box-shadow: 0 30px 80px -40px rgba(31, 22, 18, 0.45);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-poster {
  appearance: none;
  border: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #0a0807;
  display: block;
}
.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.6s ease;
}
.video-poster:hover img { opacity: 1; transform: scale(1.02); }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease, background 0.18s ease;
}
.video-play svg { transform: translateX(2px); }
.video-poster:hover .video-play {
  transform: translate(-50%, -50%) scale(1.06);
  background: color-mix(in oklab, var(--accent) 92%, black);
}
.video-meta {
  position: absolute;
  left: 18px;
  bottom: 16px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  text-align: left;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}
.video-tag {
  display: inline-block;
  width: max-content;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}
.video-title {
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1.15;
}

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

/* ============== Rule / section header ============== */
.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(48px, 8vw, 96px) 0 28px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.rule span { white-space: nowrap; }

.h2 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

/* ============== Story ============== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.story-body p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 56ch;
  text-wrap: pretty;
}
.pullquote {
  font-family: var(--display-font);
  font-style: italic;
  font-size: 28px;
  line-height: 1.25;
  margin-top: 22px;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  max-width: 30ch;
}

/* ============== Ingredients ============== */
.ing-controls {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 36px;
}
.serves-block { display: flex; align-items: center; gap: 14px; }
.serves-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.serves-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
}
.serves-stepper button {
  appearance: none;
  background: transparent;
  border: 0;
  width: 38px;
  height: 38px;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
}
.serves-stepper button:hover { background: var(--line); }
.serves-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
  min-width: 88px;
}
.serves-count .num {
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1;
}
.serves-count .x {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.unit-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.unit-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.unit-toggle button.on {
  background: var(--ink);
  color: var(--bg);
}

.link-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: auto;
}
.link-btn:hover { color: var(--accent); }

.ing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.ing-section {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-item {
  display: grid;
  grid-template-columns: 22px auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.ing-item:last-child { border-bottom: 0; }
.ing-item:hover .check { border-color: var(--accent); }

.check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: var(--bg);
  background: transparent;
  transition: all 0.15s ease;
}
.ing-item.checked .check {
  background: var(--accent);
  border-color: var(--accent);
}
.ing-item.checked .qty,
.ing-item.checked .ing-name {
  opacity: 0.42;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.qty {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 14.5px;
  white-space: nowrap;
  color: var(--accent);
}
.ing-name {
  font-size: 15px;
  line-height: 1.4;
}
.ing-note {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

/* ============== Method ============== */
.progress-block {
  margin-bottom: 36px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}
.progress-count { color: var(--ink); font-weight: 500; }
.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: clamp(20px, 3vw, 44px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: opacity 0.3s ease;
}
.step:first-child { border-top: 0; padding-top: 0; }
.step.done { opacity: 0.55; }
.step.done .step-title { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); }

.step-num { position: sticky; top: 80px; align-self: start; }
.step-check {
  appearance: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-family: var(--display-font);
  font-size: 28px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-check:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.step.done .step-check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.step-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.step-title {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}
.step-time {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.step-text {
  font-size: 17.5px;
  line-height: 1.65;
  margin: 0;
  max-width: 64ch;
  text-wrap: pretty;
}
.step-tip {
  margin-top: 16px;
  padding: 14px 16px;
  background: color-mix(in oklab, var(--accent2) 12%, transparent);
  border-left: 3px solid var(--accent2);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.5;
  max-width: 60ch;
}
.tip-label {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 600;
  margin-right: 10px;
}

.step-timer { margin-top: 18px; }

.timer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 260px;
}
.timer-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.timer.running .timer-btn { background: var(--accent); }
.timer.done .timer-btn { background: var(--accent2); color: var(--ink); }
.timer-readout { flex: 1; min-width: 160px; }
.timer-time {
  font-variant-numeric: tabular-nums;
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}
.timer-bar {
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  background: var(--accent);
  transition: width 1s linear;
}

/* ============== Gallery ============== */
.gal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 220px;
  gap: 14px;
}
.gal-cell { border-radius: 10px; overflow: hidden; }
.gal-cell.tall { grid-row: span 2; }
.gal-cell.wide { grid-column: span 3; grid-row: span 1; }
.gal-cell .ph { height: 100%; aspect-ratio: auto; }

/* ============== Tips ============== */
.tip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.tip-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
}
.tip-index {
  font-family: var(--display-font);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}
.tip-h {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.tip-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--ink) 86%, var(--bg));
}

/* ============== Footer ============== */
.site-footer {
  margin-top: clamp(80px, 12vw, 160px);
  padding: 64px var(--gutter) 28px;
  border-top: 1px solid var(--line);
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: clamp(28px, 4vw, 64px);
}
.display-sm {
  font-family: var(--display-font);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.dot-period { color: var(--accent); }
.foot-brand p {
  margin: 14px 0 0;
  font-size: 15px;
  max-width: 30ch;
  color: var(--muted);
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.foot-cols > div { display: flex; flex-direction: column; gap: 8px; }
.foot-h {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.foot-cols a {
  font-size: 15px;
  color: var(--ink);
  transition: color 0.15s ease;
}
.foot-cols a:hover { color: var(--accent); }
.foot-base {
  max-width: var(--max);
  margin: 48px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  gap: 12px;
}
.foot-links { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); transition: color 0.15s ease; }
.foot-links a:hover { color: var(--accent); }
.foot-links .sep { opacity: 0.5; }

/* ============== Responsive ============== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .story-grid { grid-template-columns: 1fr; }
  .ing-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 64px 1fr; gap: 18px; }
  .step-check { width: 44px; height: 44px; font-size: 18px; }
  .step-num { position: static; top: auto; }
  .gal-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gal-cell.wide { grid-column: span 2; }
  .tip-grid { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .meta-row { grid-template-columns: repeat(2, auto); gap: 20px 36px; }
}
