@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --bg: #f6f4ef;
  --ink: #1d1b17;
  --muted: #6a6358;
  --surface: #fffdf8;
  --brand: #c84c2f;
  --brand-dark: #9f3a23;
  --line: #e3dbce;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 12%, #fbe0b7 0%, transparent 32%),
    radial-gradient(circle at 92% 88%, #f9c7b9 0%, transparent 28%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
}

.bg-shape-left {
  width: 260px;
  height: 260px;
  background: #ffd08a;
  top: -70px;
  left: -80px;
}

.bg-shape-right {
  width: 300px;
  height: 300px;
  background: #f5b0a0;
  bottom: -100px;
  right: -90px;
}

.site-header,
main,
.site-footer {
  width: min(1080px, 92vw);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  border-bottom: 2px solid var(--brand);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
}

.hero {
  background: color-mix(in srgb, var(--surface) 86%, white 14%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 3.4rem 1.6rem;
  text-align: center;
  box-shadow: 0 18px 50px rgba(87, 60, 36, 0.12);
}

.eyebrow {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.hero h1 {
  margin: 0.75rem auto 0;
  max-width: 17ch;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.hero-copy {
  margin: 1rem auto 0;
  max-width: 60ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary,
.btn-secondary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 76, 47, 0.3);
}

.features {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.tile-card-calories {
  margin-top: auto;
  padding-top: 0.6rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-size: 0.92rem;
}

.calc-hero {
  margin-bottom: 1rem;
}

.calc-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 1fr;
}

.calc-form {
  display: grid;
  gap: 0.55rem;
}

.calc-form label {
  margin-top: 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

.calc-form input,
.calc-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.status-message {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  color: var(--brand-dark);
  font-weight: 600;
}

.calc-results p {
  margin: 0.5rem 0;
}

.menu-hero {
  margin-bottom: 1rem;
}

.menu-hero-with-filters {
  position: relative;
  padding-top: 5.6rem;
}

.menu-hero-controls {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.filter-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.menu-search-input {
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-empty-state {
  margin: 0.8rem auto 0;
  max-width: 54ch;
  color: var(--muted);
}

.menu-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.tile-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 35%, rgba(200, 76, 47, 0.12) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tile-card:hover,
.tile-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(200, 76, 47, 0.45);
  box-shadow: 0 18px 34px rgba(87, 60, 36, 0.16);
}

.tile-card:hover::after,
.tile-card:focus-visible::after {
  opacity: 1;
}

.tile-card:focus-visible {
  outline: 3px solid rgba(200, 76, 47, 0.2);
  outline-offset: 2px;
}

.tile-card-media {
  overflow: hidden;
}

.tile-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 220ms ease, filter 220ms ease;
}

.tile-card:hover .tile-img,
.tile-card:focus-visible .tile-img {
  transform: scale(1.05);
  filter: saturate(1.06);
}

.tile-card-copy {
  padding: 1rem;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
}

.tile-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tile-card-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(200, 76, 47, 0.1);
  color: var(--brand-dark);
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tile-card-cta {
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 180ms ease, color 180ms ease;
}

.tile-card:hover .tile-card-cta,
.tile-card:focus-visible .tile-card-cta {
  color: var(--brand);
  transform: translateX(4px);
}

.tile-card h2,
.tile-card p {
  padding: 0;
}

.tile-card h2 {
  margin: 0.75rem 0 0;
  line-height: 1.25;
  min-height: 2.6em;
}

.tile-card-copy > p:not(.tile-card-calories) {
  margin: 0.4rem 0 0;
  line-height: 1.45;
  min-height: 4.35em;
}

.recipe-hero {
  margin-bottom: 1rem;
  text-align: left;
}

.recipe-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.recipe-back-link:hover,
.recipe-back-link:focus-visible {
  color: var(--brand);
}

.recipe-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 1.4rem;
  align-items: center;
}

.recipe-copy .hero-copy {
  margin-left: 0;
}

.recipe-meta-grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipe-meta-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  padding: 0.95rem 1rem;
}

.recipe-meta-card strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
}

.recipe-meta-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.recipe-visual {
  min-height: 100%;
}

.recipe-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 42px rgba(87, 60, 36, 0.16);
}

.recipe-content {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

.recipe-panel {
  padding: 1.35rem;
}

.recipe-panel h2 {
  margin-top: 0.55rem;
  margin-bottom: 0.9rem;
}

.recipe-list,
.recipe-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink);
}

.recipe-list li,
.recipe-steps li {
  margin-bottom: 0.7rem;
}

.recipe-tip-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 231, 224, 0.95) 100%);
}

.recipe-tip-panel p:last-child {
  margin-bottom: 0;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
}

.site-contact {
  margin: 0 0 0.35rem;
}

.site-contact a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-underline-offset: 0.18em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.site-contact a:hover,
.site-contact a:focus-visible {
  color: var(--brand-dark);
  text-decoration-color: currentColor;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.social-links a:hover {
  color: var(--brand);
  transform: translateY(-2px);
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .features,
  .menu-grid,
  .calc-layout {
    grid-template-columns: 1fr;
  }

  .recipe-hero-layout,
  .recipe-content {
    grid-template-columns: 1fr;
  }

  .recipe-image {
    min-height: 260px;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: relative;
  }

  .menu-hero-with-filters {
    padding-top: 9rem;
  }

  .menu-hero-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .menu-search-wrap {
    order: -1;
  }

  .filter-tabs {
    order: 1;
  }

  .filter-tab {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }

  .menu-search-input {
    width: 100%;
    min-width: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    right: 4vw;
    top: 64px;
    flex-direction: column;
    background: #fff;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(31, 25, 17, 0.12);
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-nav.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .recipe-meta-grid {
    grid-template-columns: 1fr;
  }
}
