/* Standalone recipe page styles; intentionally separate from the Enbright app-site family. */

:root {
  color-scheme: light dark;
  --bg: #fffaf4;
  --surface: #ffffff;
  --text: #2b231e;
  --muted: #6e6259;
  --line: #eadfd3;
  --accent: #b24a22;
  --accent-ink: #ffffff;
  --accent-soft: #f8e9dd;
  --shadow: 0 1px 2px rgb(60 30 10 / 6%), 0 10px 30px rgb(60 30 10 / 8%);
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --column: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171311;
    --surface: #221c19;
    --text: #f3ece6;
    --muted: #b8aaa0;
    --line: #3a302a;
    --accent: #ec8a5e;
    --accent-ink: #1d120d;
    --accent-soft: #33241c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page {
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

/* Title block */

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 700;
}

.dek {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.facts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jump {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

/* Hero */

.hero {
  margin: 24px calc(var(--gutter) * -1) 32px;
}

.hero img {
  width: 100%;
}

@media (min-width: 760px) {
  .hero {
    margin-inline: 0;
  }

  .hero img {
    border-radius: 16px;
  }
}

/* Article */

.prose p,
.prose li {
  margin: 0 0 16px;
}

.prose h2 {
  margin: 48px 0 16px;
  font-size: 28px;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 21px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.prose li::marker {
  color: var(--accent);
}

.faq h3 {
  margin-top: 24px;
}

/* Recipe card */

.card {
  margin-top: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}

.card-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 24px 20px 28px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.card-dek {
  margin: 0 0 20px;
  color: var(--muted);
}

.card-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  margin: 0 0 8px;
  padding: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 16px;
}

.card-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-facts dd {
  margin: 0;
  font-weight: 600;
}

.card h3 {
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-size: 22px;
}

.ingredients,
.card-notes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredients li,
.card-notes li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid var(--line);
}

.ingredients li:last-child,
.card-notes li:last-child {
  border-bottom: 0;
}

.ingredients li::before {
  position: absolute;
  top: 0.95em;
  left: 2px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
}

.card-notes li::before {
  position: absolute;
  top: 1.2em;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 16px;
  padding-left: 44px;
  counter-increment: step;
}

.steps li::before {
  position: absolute;
  top: 0.1em;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  content: counter(step);
  font-size: 15px;
  font-weight: 700;
}

/* 404 */

.not-found {
  max-width: 480px;
  margin: 0 auto;
  padding: 96px var(--gutter);
  text-align: center;
}
