/* RecipeCabin — mobile-first recipe site */

:root {
  --ink: #1c2a22;
  --ink-soft: #3d4f44;
  --sage: #5f7d68;
  --sage-deep: #3e5a48;
  --mist: #e4ece6;
  --foam: #f4f7f4;
  --honey: #c9893a;
  --honey-deep: #a66d28;
  --cream: #f8f3ea;
  --line: rgba(28, 42, 34, 0.1);
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(28, 42, 34, 0.14);

  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;

  --radius: 18px;
  --pad: 1.25rem;
  --max: 100%;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--foam);
  overflow-x: hidden;
}

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

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

button,
input {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Soft herb atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(95, 125, 104, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 20%, rgba(201, 137, 58, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(62, 90, 72, 0.1), transparent 55%),
    linear-gradient(180deg, #eef4ef 0%, var(--foam) 40%, #e8f0ea 100%);
}

.view {
  display: none;
  min-height: 100dvh;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  overflow-x: clip;
}

.view--active {
  display: block;
  animation: viewIn 0.45s var(--ease) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top bar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.85rem + var(--safe-top)) var(--pad) 0.85rem;
  color: var(--white);
  mix-blend-mode: difference;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.icon-btn:active {
  transform: scale(0.94);
}

/* Hero — full bleed */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 42, 34, 0.25) 0%, transparent 28%),
    linear-gradient(180deg, transparent 35%, rgba(18, 28, 22, 0.72) 72%, rgba(14, 22, 18, 0.92) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) calc(2.5rem + var(--safe-bottom));
}

.brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 14vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  animation: rise 0.8s var(--ease) 0.1s both;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 6.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 20ch;
  animation: rise 0.8s var(--ease) 0.22s both;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34ch;
  animation: rise 0.8s var(--ease) 0.34s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  animation: rise 0.8s var(--ease) 0.46s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--honey);
  color: var(--ink);
}

.btn--primary:hover {
  background: #d49a4a;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--block {
  width: 100%;
}

/* Sections */
.section {
  padding: 2.75rem var(--pad) 0.5rem;
}

.section__head {
  margin-bottom: 1.25rem;
}

.section__head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section__head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Tonight — horizontal scroll, image-led rows (not cards) */
.tonight {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  margin: 0 calc(-1 * var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tonight::-webkit-scrollbar {
  display: none;
}

.tonight-item {
  flex: 0 0 72%;
  scroll-snap-align: start;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  animation: fadeUp 0.6s var(--ease) both;
}

.tonight-item:nth-child(2) {
  animation-delay: 0.08s;
}
.tonight-item:nth-child(3) {
  animation-delay: 0.16s;
}

.tonight-item__img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.tonight-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.tonight-item:active .tonight-item__img img,
.tonight-item:hover .tonight-item__img img {
  transform: scale(1.04);
}

.tonight-item__meta {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  font-weight: 600;
}

.tonight-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Filters */
.filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--pad)) 1.25rem;
  padding: 0 var(--pad) 0.25rem;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 550;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.filter-btn[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* Recipe list — stacked image + text, no cards */
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recipe-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  animation: fadeUp 0.55s var(--ease) both;
}

.recipe-row:last-child {
  border-bottom: 0;
}

.recipe-row__img {
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 4px;
}

.recipe-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.recipe-row:hover .recipe-row__img img,
.recipe-row:active .recipe-row__img img {
  transform: scale(1.06);
}

.recipe-row__body h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.recipe-row__body p {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--sage-deep);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 3rem var(--pad) calc(2.5rem + var(--safe-bottom));
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.site-footer p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Detail view */
#view-detail {
  background: var(--foam);
  padding-bottom: calc(2rem + var(--safe-bottom));
}

.back-btn {
  position: sticky;
  top: 0;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: calc(0.65rem + var(--safe-top)) var(--pad) 0.5rem;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 247, 244, 0.88);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(28, 42, 34, 0.08);
}

.detail__hero {
  margin: -3.2rem 0 0;
  aspect-ratio: 4 / 5;
  max-height: 62dvh;
  overflow: hidden;
}

.detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 20s ease-in-out infinite alternate;
}

.detail__body {
  padding: 1.5rem var(--pad) 0;
}

.detail__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
  font-weight: 700;
}

.detail__body h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.detail__summary {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.detail__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail__stats div {
  text-align: center;
}

.detail__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail__stats span {
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail__block {
  margin-bottom: 2rem;
}

.detail__block h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.ingredients li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.ingredients li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--sage);
}

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

.steps li {
  position: relative;
  padding: 0 0 1.35rem 2.6rem;
  counter-increment: step;
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mist);
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.steps p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* Search sheet */
.sheet[hidden] {
  display: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 22, 0.45);
  animation: fade 0.25s ease both;
}

.sheet__panel {
  position: relative;
  background: var(--foam);
  border-radius: 22px 22px 0 0;
  padding: 0.75rem var(--pad) calc(1.5rem + var(--safe-bottom));
  max-height: 85dvh;
  overflow: auto;
  box-shadow: var(--shadow);
  animation: sheetUp 0.35s var(--ease) both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet__handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: var(--line);
}

.search-field input {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.search-field input:focus {
  border-color: var(--sage);
}

.search-results {
  margin-top: 1rem;
}

.search-hit {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.search-hit img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}

.search-hit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.search-hit span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.search-empty {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--ink-soft);
}

/* Mobile — full width, touch-friendly */
@media (max-width: 767px) {
  .view,
  .page {
    width: 100%;
    max-width: 100%;
  }

  .hero__content {
    padding: 0 var(--pad) calc(2rem + var(--safe-bottom));
  }

  .brand {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
    line-height: 0.95;
    margin-bottom: 0.5rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    margin-bottom: 0.6rem;
  }

  .lede {
    max-width: none;
    margin-bottom: 1.15rem;
  }

  .cta-row .btn {
    flex: 1 1 auto;
    min-width: min(100%, 160px);
  }

  .tonight {
    scroll-padding-inline: var(--pad);
    -webkit-overflow-scrolling: touch;
  }

  .filters {
    scroll-padding-inline: var(--pad);
    -webkit-overflow-scrolling: touch;
  }

  .tonight-item {
    flex: 0 0 min(78%, 300px);
  }

  .recipe-row {
    grid-template-columns: 84px 1fr;
    gap: 0.85rem;
    padding: 0.9rem 0;
  }

  .recipe-row__img {
    width: 84px;
    height: 84px;
  }

  .recipe-row__body h3 {
    font-size: 1.05rem;
  }

  .detail__hero {
    max-height: 58dvh;
    margin-top: -2.5rem;
  }

  .detail__body {
    padding: 1.25rem var(--pad) 0;
  }

  .detail__stats {
    gap: 0.35rem;
  }

  .detail__stats strong {
    font-size: 1.05rem;
  }

  .site-footer,
  .page-footer {
    padding: 2.5rem var(--pad) calc(2rem + var(--safe-bottom));
  }

  .footer-nav {
    gap: 0.5rem 0.9rem;
  }

  .footer-nav a {
    font-size: 0.85rem;
  }
}

/* Small phones */
@media (max-width: 380px) {
  :root {
    --pad: 1rem;
  }

  .brand {
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .section {
    padding-top: 2.25rem;
  }

  .section__head h2 {
    font-size: 1.45rem;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
    min-width: 0;
  }

  .tonight-item {
    flex: 0 0 88%;
  }

  .recipe-row {
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
  }

  .recipe-row__img {
    width: 72px;
    height: 72px;
  }

  .filter-btn {
    font-size: 0.85rem;
    min-height: 38px;
    padding: 0.4rem 0.8rem;
  }

  .detail__body h1 {
    font-size: 1.65rem;
  }

  .steps li {
    padding-left: 2.35rem;
  }
}

/* Wider phones / small tablets */
@media (min-width: 520px) {
  :root {
    --pad: 1.5rem;
  }

  .tonight-item {
    flex-basis: 58%;
  }
}

/* Tablet & desktop */
@media (min-width: 768px) {
  :root {
    --max: 1140px;
    --pad: 2rem;
    --radius: 20px;
  }

  .view,
  .page {
    max-width: var(--max);
  }

  /* Hero — split layout */
  .hero {
    min-height: 88vh;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: stretch;
  }

  .hero__media {
    position: relative;
    order: 2;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgba(14, 22, 18, 0.55) 0%, transparent 35%),
      linear-gradient(180deg, rgba(28, 42, 34, 0.2) 0%, transparent 25%);
  }

  .hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 3.5rem 3.5rem;
    background: linear-gradient(145deg, #1c2a22 0%, #243528 55%, #2d4034 100%);
  }

  .brand {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
  }

  .hero h1 {
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    max-width: 18ch;
  }

  .lede {
    font-size: 1.15rem;
    max-width: 36ch;
  }

  .topbar {
    max-width: var(--max);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  /* Sections */
  .section {
    padding: 4rem var(--pad) 1rem;
  }

  .section__head h2 {
    font-size: 2rem;
  }

  /* Cook tonight — grid */
  .tonight {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    overflow: visible;
    margin: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .tonight-item {
    flex: none;
  }

  .tonight-item__img {
    border-radius: var(--radius);
  }

  /* Filters — wrap instead of scroll */
  .filters {
    flex-wrap: wrap;
    overflow: visible;
    margin: 0 0 1.75rem;
    padding: 0;
  }

  /* Recipe list — card grid */
  .recipe-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .recipe-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .recipe-row:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
  }

  .recipe-row__img {
    width: 100%;
    height: 200px;
    border-radius: 0;
  }

  .recipe-row__body {
    padding: 1.15rem 1.25rem 1.35rem;
  }

  .recipe-row__body h3 {
    font-size: 1.2rem;
  }

  /* Detail — two columns */
  .detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
    padding: 0 var(--pad);
    max-width: var(--max);
    margin: 0 auto;
  }

  .detail__hero {
    position: sticky;
    top: calc(1rem + var(--safe-top));
    margin: 0;
    aspect-ratio: 4 / 5;
    max-height: calc(100dvh - 2rem);
    border-radius: var(--radius);
  }

  .detail__hero img {
    border-radius: var(--radius);
  }

  .detail__body {
    padding: 2.5rem 0 3rem;
  }

  .detail__body h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
  }

  #view-detail {
    padding: 0 var(--pad) 3rem;
  }

  .back-btn {
    margin: calc(0.65rem + var(--safe-top)) 0 1rem;
  }

  .detail {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  /* Search — centered modal */
  .sheet {
    justify-content: center;
    align-items: center;
    max-width: none;
    left: 0;
    right: 0;
    transform: none;
  }

  .sheet__panel {
    border-radius: var(--radius);
    max-width: 520px;
    width: calc(100% - 2rem);
    max-height: 70dvh;
    animation: fade 0.25s ease both;
  }

  .sheet__handle {
    display: none;
  }

  /* Footer */
  .site-footer,
  .page-footer {
    padding: 4rem var(--pad) 3rem;
  }

  .footer-nav {
    gap: 0.75rem 2rem;
  }

  /* Content pages */
  .page-hero {
    padding: 3.5rem var(--pad) 2rem;
  }

  .page-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);
  }

  .prose {
    padding: 2.5rem var(--pad) 1.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-form {
    max-width: 560px;
  }
}

@media (min-width: 1024px) {
  :root {
    --max: 1200px;
    --pad: 2.5rem;
  }

  .recipe-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .recipe-row__img {
    height: 220px;
  }

  .hero__content {
    padding: 6rem 4.5rem 4rem;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   Content pages (About, Privacy, Terms, Cookies, Contact)
   ============================================================ */
.page {
  display: block;
  min-height: 100dvh;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  background: var(--foam);
  animation: viewIn 0.45s var(--ease) both;
  overflow-x: clip;
}

/* Solid topbar for light-background pages */
.topbar--solid {
  position: sticky;
  top: 0;
  padding: calc(0.85rem + var(--safe-top)) var(--pad) 0.85rem;
  color: var(--ink);
  mix-blend-mode: normal;
  background: rgba(244, 247, 244, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar--solid .logo {
  color: var(--ink);
}

.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--sage-deep);
}

.topbar__link:hover {
  color: var(--ink);
}

/* Page hero header */
.page-hero {
  padding: 2.75rem var(--pad) 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero__eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
  font-weight: 700;
  animation: rise 0.7s var(--ease) 0.05s both;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  animation: rise 0.7s var(--ease) 0.15s both;
}

.page-hero p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 40ch;
  animation: rise 0.7s var(--ease) 0.25s both;
}

.page-hero__updated {
  margin-top: 1rem !important;
  font-size: 0.85rem !important;
  color: var(--sage-deep) !important;
  font-weight: 600;
}

/* Prose typography */
.prose {
  padding: 2rem var(--pad) 1rem;
  animation: fadeUp 0.6s var(--ease) 0.1s both;
}

.prose section {
  margin-bottom: 2.25rem;
}

.prose section:last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--honey-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.prose ul li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.prose ul li:last-child {
  border-bottom: 0;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sage);
}

.prose ul li strong {
  color: var(--ink);
}

/* Info / value cards used on About + Contact */
.info-grid {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.info-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(28, 42, 34, 0.05);
}

.info-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.info-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.info-card a {
  color: var(--honey-deep);
  font-weight: 600;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: border-color 0.25s;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--sage);
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Page footer with navigation links */
.page-footer {
  padding: 3rem var(--pad) calc(2.5rem + var(--safe-bottom));
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.page-footer .footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.page-footer .footer-tag {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sage-deep);
  transition: color 0.25s;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
