:root {
  /* surfaces */
  --night: #10002d;   /* page base */
  --card: #1c0a3e;    /* raised surface / image frame */
  --raised: #26104b;
  --line: rgba(255, 255, 255, 0.12); /* hairline borders */

  /* ink */
  --ink: #ffffff;         /* headings, body on dark */
  --ink-muted: #b9aec9;   /* secondary text */
  --ink-faint: #7c6e90;   /* decorative / footer */

  /* brand hues */
  --magenta: #dc4d8b;
  --orange: #ed6c00;
  --amber: #f9b000;
  --teal: #00aeba;

  /* the signature gradient — brand only, never for data */
  --kv-gradient: linear-gradient(100deg, #dc4d8b 0%, #ed6c00 55%, #f9b000 100%);

  /* shape */
  --radius-card: 20px;
  --radius-field: 14px;

  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  /* night base lit by two off-canvas brand glows (matches the app's .dark-page) */
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(220, 77, 139, 0.22), transparent 60%),
    radial-gradient(700px 420px at 8% 8%, rgba(0, 174, 186, 0.14), transparent 60%),
    var(--night);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gradient headline treatment for dish titles */
.kv-title {
  background-image: var(--kv-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

/* ---------- layout ---------- */

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.masthead {
  display: flex;
  justify-content: center;
  width: 100%;
}

.masthead__logo {
  height: 52px;
  width: auto;
  max-width: 100%;
  display: block;
}

@media (min-width: 700px) {
  .masthead__logo {
    height: 64px;
  }
}

.recipe-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 8.5vw, 3.25rem);
  text-wrap: balance;
  /* the clipped gradient can shave descenders — a little breathing room */
  padding-bottom: 0.08em;
}

/* ---------- recipe image ---------- */

.recipe-figure {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.recipe-frame {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 8px;
  overflow: hidden;
}

.recipe-image {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: calc(var(--radius-card) - 8px);
}

/* amber carries actions — nothing else uses amber as a fill */
.full-image-link {
  color: var(--amber);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  padding: 12px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.full-image-link:hover,
.full-image-link:focus-visible {
  border-color: var(--amber);
}

/* shown when a recipes.json entry has no image yet */
.recipe-placeholder {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.recipe-placeholder code {
  color: var(--ink);
  font-size: 0.875em;
}

/* ---------- landing ---------- */

.landing-lede {
  margin: 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 42ch;
}

.recipe-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 620px) {
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.recipe-grid a {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 16px 18px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.recipe-grid a:hover,
.recipe-grid a:focus-visible {
  border-color: var(--amber);
}

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
}

.notfound__code {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.5rem);
}

.notfound p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 34ch;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 0.8125rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: inherit;
}

:where(a):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
