/* ══════════════════════════════════════════════════════════
   Thai Food — Modern Dark Emerald + Gold
   Typography: Prompt (display) + Noto Sans Thai (body)
   Palette: Deep emerald, warm gold, dark surfaces
   Motion: ease-out-quart
   ══════════════════════════════════════════════════════════ */

:root {
  /* Brand — Emerald + Gold */
  --emerald: #10b981;
  --emerald-dim: #059669;
  --emerald-deep: #064e3b;
  --gold: #f59e0b;
  --gold-dim: #d97706;
  --gold-light: #fbbf24;

  /* Surfaces — dark, layered */
  --bg-base: #0c0f0a;
  --bg-raised: #141a12;
  --bg-card: #1a2318;
  --bg-card-hover: #1f2b1c;
  --bg-glass: rgba(20, 30, 18, 0.75);

  /* Text */
  --text-primary: #f0f4e8;
  --text-secondary: rgba(225, 235, 210, 0.7);
  --text-muted: rgba(180, 200, 160, 0.5);
  --text-on-brand: #0c0f0a;

  /* Accent */
  --accent-red: #ef4444;
  --accent-red-soft: rgba(239, 68, 68, 0.15);

  /* Borders */
  --border-subtle: rgba(16, 185, 129, 0.12);
  --border-medium: rgba(16, 185, 129, 0.25);
  --border-gold: rgba(245, 158, 11, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.06);

  /* Spacing — fluid */
  --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
  --space-s: clamp(0.5rem, 1vw, 0.75rem);
  --space-m: clamp(1rem, 2vw, 1.5rem);
  --space-l: clamp(1.5rem, 3vw, 2.5rem);
  --space-xl: clamp(2.5rem, 5vw, 4rem);
  --space-2xl: clamp(4rem, 8vw, 7rem);
  --space-3xl: clamp(6rem, 12vw, 10rem);

  /* Type scale — fluid */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-s: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
  --text-l: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --text-hero: clamp(3rem, 2rem + 4.5vw, 6rem);

  /* Motion */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.35s;
  --duration-fast: 0.2s;

  /* Layout */
  --content-max: 76rem;
  --content-narrow: 52rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 1rem;
  --radius-lg: 1.5rem;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans Thai", "Prompt", system-ui, sans-serif;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* ── Typography ── */
h1, h2, h3 {
  font-family: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* ══════════════════════════════════════
   GLOBAL NAV
   ══════════════════════════════════════ */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);
}

.brand-text {
  font-family: "Prompt", system-ui, sans-serif;
  font-size: var(--text-l);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  color: var(--emerald);
}

.topbar-links {
  display: flex;
  gap: var(--space-s);
}

.topbar a,
.topbar-links a {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: var(--text-s);
  font-weight: 600;
  backdrop-filter: blur(8px);
  background: rgba(16, 185, 129, 0.08);
  transition: all var(--duration) var(--ease-out);
}

.topbar a:hover,
.topbar-links a:hover {
  background: var(--emerald);
  color: var(--text-on-brand);
  border-color: var(--emerald);
}

/* ══════════════════════════════════════
   HERO — Full-screen with image
   ══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-m) var(--gutter) var(--space-2xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 15, 10, 0.4) 0%, rgba(12, 15, 10, 0.85) 70%, var(--bg-base) 100%),
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(16, 185, 129, 0.12), transparent),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(245, 158, 11, 0.08), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 48rem;
  margin-top: auto;
  padding-top: var(--space-3xl);
  animation: fade-in-up 0.8s var(--ease-out) 0.15s both;
}

.hero .eyebrow {
  color: var(--gold);
  font-size: var(--text-s);
}

.hero h1 {
  font-size: var(--text-hero);
  color: var(--text-primary);
  margin-top: var(--space-s);
  max-width: 14ch;
}

.hero .hero-text {
  color: var(--text-secondary);
  font-size: var(--text-l);
  max-width: 44ch;
  margin-top: var(--space-m);
  line-height: 1.8;
}

/* ── Hero Stats Row ── */
.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--border-subtle);
}

.hero-stat {
  text-align: left;
}

.hero-stat-number {
  font-family: "Prompt", system-ui, sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--emerald);
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 0.25rem;
}


/* ══════════════════════════════════════
   FLASH MESSAGES
   ══════════════════════════════════════ */
.flash-section {
  padding: var(--space-m) var(--gutter) 0;
}

.flash-stack {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  gap: var(--space-s);
}

.flash-message {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-s);
  backdrop-filter: blur(8px);
}

.flash-message.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.flash-message.error {
  background: var(--accent-red-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}


/* ══════════════════════════════════════
   MENU SECTION
   ══════════════════════════════════════ */
.menu-section {
  padding: 0 var(--gutter);
}

.section-heading {
  max-width: var(--content-max);
  margin: var(--space-2xl) auto var(--space-l);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-m);
}

.section-heading .eyebrow {
  color: var(--emerald);
}

.section-heading h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-xs);
  color: var(--text-primary);
}

.menu-intro {
  max-width: 50ch;
  margin-top: var(--space-s);
  color: var(--text-secondary);
  font-size: var(--text-base);
}

.menu-grid {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--space-l);
  padding-bottom: var(--space-2xl);
}

/* ── Card ── */
.menu-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  transition: transform var(--duration) var(--ease-out);
}

.menu-card-link:hover,
.menu-card-link:focus-visible {
  transform: translateY(-6px);
}

.menu-card-link:hover .menu-card {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
}

.menu-card-link:hover .food-image {
  transform: scale(1.05);
}

.menu-card-link:hover .card-cta {
  background: var(--emerald);
  color: var(--text-on-brand);
  border-color: var(--emerald);
}

.menu-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease-out);
}

.food-image-wrap {
  overflow: hidden;
  position: relative;
}

.food-image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3rem;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
}

.food-image {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.menu-card-body {
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-card h3 {
  font-size: var(--text-l);
  color: var(--text-primary);
}

.tagline {
  color: var(--gold);
  font-weight: 600;
  font-size: var(--text-xs);
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

.description {
  margin-top: var(--space-s);
  color: var(--text-secondary);
  font-size: var(--text-s);
  flex: 1;
  line-height: 1.7;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-m);
  padding: 0.625rem 1.25rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  transition: all var(--duration) var(--ease-out);
}

/* ── Empty state ── */
.empty-state {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-xl) var(--space-l);
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius);
  margin-bottom: var(--space-2xl);
}

/* ══════════════════════════════════════
   ADMIN / FORMS
   ══════════════════════════════════════ */
.form-section {
  padding: 0 var(--gutter);
}

.standalone-form {
  padding-top: 0;
}

.admin-shell {
  max-width: var(--content-max);
  margin-inline: auto;
}

.admin-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-m);
  border-radius: var(--radius);
  margin-bottom: var(--space-m);
  font-weight: 600;
  font-size: var(--text-s);
  backdrop-filter: blur(8px);
}

.success-state {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.locked-state {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--border-gold);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald);
  font-weight: 700;
  font-size: var(--text-s);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
}

.ghost-button:hover {
  background: rgba(16, 185, 129, 0.2);
}

.food-form {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-l);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.login-form {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-m);
}

.food-form label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-weight: 600;
  font-size: var(--text-s);
}

.food-form span {
  color: var(--emerald);
}

.food-form input,
.food-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-base);
  color: var(--text-primary);
  resize: vertical;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.food-form input:focus,
.food-form textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.food-form input::placeholder,
.food-form textarea::placeholder {
  color: var(--text-muted);
}

.full-width {
  grid-column: 1 / -1;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-m);
  padding: 0.875rem 2rem;
  border-radius: 2rem;
  border: none;
  background: var(--emerald);
  color: var(--text-on-brand);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--duration) var(--ease-out);
}

.submit-button:hover {
  background: var(--emerald-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.delete-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: var(--accent-red-soft);
  color: #fca5a5;
  font-weight: 700;
  font-size: var(--text-s);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
}

.delete-button:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ── Card actions & Edit button ── */
.card-actions {
  display: flex;
  gap: var(--space-s);
  align-items: center;
  margin-top: var(--space-s);
}

.edit-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid var(--border-medium);
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald);
  font-weight: 700;
  font-size: var(--text-s);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  text-decoration: none;
}

.edit-button:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
}

/* ── Edit page ── */
.hero-compact {
  min-height: auto;
  padding-bottom: var(--space-xl);
}

.edit-preview {
  margin-bottom: var(--space-l);
}

.edit-preview-img {
  width: 100%;
  max-height: 20rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-top: var(--space-m);
}

.cancel-link {
  font-weight: 600;
  font-size: var(--text-s);
  color: var(--text-muted);
  transition: color var(--duration) var(--ease-out);
}

.cancel-link:hover {
  color: var(--text-primary);
}


/* ══════════════════════════════════════
   DETAIL PAGE
   ══════════════════════════════════════ */
.detail-hero {
  position: relative;
  height: 60vh;
  max-height: 36rem;
  overflow: hidden;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.1);
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-m) var(--gutter) var(--space-xl);
  background: linear-gradient(
    180deg,
    rgba(12, 15, 10, 0.4) 0%,
    rgba(12, 15, 10, 0.8) 100%
  );
}

.detail-hero-overlay .topbar {
  justify-content: flex-start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--text-s);
  transition: all var(--duration) var(--ease-out);
}

.back-link:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald);
}

.detail-hero-text {
  max-width: 42rem;
}

.detail-hero-text .eyebrow {
  color: var(--gold);
}

.detail-hero-text h1 {
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-top: var(--space-xs);
}

.detail-tagline {
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: 500;
  margin-top: var(--space-xs);
}

.detail-main {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--space-xl);
}

.detail-section {
  margin-top: var(--space-xl);
}

.detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: var(--space-s);
}

.detail-card {
  padding: var(--space-l);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.detail-card h2 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-s);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--border-subtle);
}

.detail-card p,
.detail-card .recipe-body {
  color: var(--text-secondary);
  line-height: 1.9;
}

.recipe-body {
  white-space: pre-line;
}

.detail-cta {
  text-align: center;
  padding-bottom: var(--space-xl);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 2rem;
  font-weight: 700;
  color: var(--text-on-brand);
  background: var(--emerald);
  box-shadow: var(--shadow-md);
  transition: all var(--duration) var(--ease-out);
}

.cta-button:hover {
  background: var(--emerald-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-2xl) var(--gutter) var(--space-l);
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-l);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.footer-logo {
  display: flex;
  align-items: center;
  color: var(--emerald);
}

.footer-logo svg,
.footer-logo img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-name {
  font-family: "Prompt", system-ui, sans-serif;
  font-size: var(--text-l);
  font-weight: 700;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: var(--text-s);
  color: var(--text-secondary);
  max-width: 36ch;
  margin-top: var(--space-s);
}

.footer-col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-s);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.footer-links a {
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease-out);
}

.footer-links a:hover {
  color: var(--emerald);
}

.footer-social {
  display: flex;
  gap: var(--space-s);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease-out);
}

.footer-social a:hover {
  color: var(--emerald);
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-2px);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-l);
  margin-top: var(--space-m);
  border-top: 1px solid var(--border-subtle);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}


/* ══════════════════════════════════════
   JS FEATURES
   ══════════════════════════════════════ */

/* Navbar glass on scroll */
.topbar-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-s) var(--gutter);
  background: rgba(12, 15, 10, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  z-index: 100;
  animation: slide-down 0.35s var(--ease-out);
}
@keyframes slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Back-to-Top */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: var(--emerald);
  color: var(--text-on-brand);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease-out), background 0.2s;
  z-index: 90;
}
#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--emerald-dim);
  transform: translateY(-3px);
}

/* Menu Search Bar */
.menu-search-bar {
  max-width: var(--content-max);
  margin: 0 auto var(--space-l);
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease-out);
}
.menu-search-bar:focus-within {
  border-color: var(--emerald);
}
.menu-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-size: var(--text-base);
}
.menu-search-bar input::placeholder { color: var(--text-muted); }
.menu-search-bar input:focus { outline: none; }
.menu-search-bar .search-icon {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  color: var(--text-muted);
}

/* Ingredient Checklist */
.ingredient-checklist {
  list-style: none;
  padding: 0;
}
.ingredient-checklist li {
  padding: 0.6rem 0.5rem 0.6rem 2rem;
  position: relative;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.25s, background 0.25s;
  user-select: none;
}
.ingredient-checklist li::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--border-medium);
  border-radius: 0.3rem;
  transition: all 0.25s;
}
.ingredient-checklist li.is-checked {
  text-decoration: line-through;
  color: var(--text-muted);
}
.ingredient-checklist li.is-checked::before {
  background: var(--emerald);
  border-color: var(--emerald);
}
.ingredient-checklist li:hover {
  background: rgba(16, 185, 129, 0.05);
}

/* Recipe Steps */
.recipe-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.recipe-steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 0.5rem 1rem 3.5rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateX(-1rem);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.recipe-steps li.is-visible {
  opacity: 1;
  transform: none;
}
.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  font-weight: 700;
  font-size: var(--text-s);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Typing cursor */
[data-typing] {
  border-right: 2px solid transparent;
}


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 56rem) {
  .hero {
    min-height: auto;
    padding-bottom: var(--space-xl);
  }

  .hero h1 {
    max-width: none;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-l);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-hero {
    height: 44vh;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-s);
    text-align: center;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 36rem) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
