:root {
  --ink: #241915;
  --ink-soft: #68574c;
  --paper: #f2e3cc;
  --page: #fff8ed;
  --page-warm: #f8eddc;
  --forest: #1f2f2a;
  --forest-soft: #314b42;
  --tomato: #db6337;
  --gold: #dcae4b;
  --sage: #9caf88;
  --line: rgba(36, 25, 21, 0.14);
  --shadow: 0 30px 80px rgba(31, 20, 15, 0.26);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(31, 47, 42, 0.96), rgba(51, 39, 30, 0.88)),
    url("assets/images/terraza.webp") center / cover fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

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

.menu-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 10;
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: 999px;
  background: rgba(31, 47, 42, 0.86);
  color: #fff8ed;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.quick-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 248, 237, 0.84);
  font-size: 0.94rem;
  font-weight: 850;
  white-space: nowrap;
}

.quick-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.reserve-link {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
}

.cookbook {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 118px 0 48px;
}

.book-shell {
  width: min(1280px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  margin-inline: auto;
}

.book-index {
  align-self: stretch;
  padding: 28px;
  border: 1px solid rgba(255, 248, 237, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 248, 237, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.book-index p,
.page-top p,
.chef-note span,
.dish-tag {
  margin: 0;
  color: var(--tomato);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.book-index h1 {
  margin: 8px 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-tab {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.category-tab:hover {
  background: rgba(31, 47, 42, 0.06);
}

.category-tab.active {
  border-color: rgba(31, 47, 42, 0.16);
  background: var(--forest);
  color: #fff8ed;
}

.category-tab strong {
  display: block;
  font-size: 0.98rem;
}

.category-tab span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(220, 174, 75, 0.2);
  color: var(--tomato);
}

.category-tab.active span {
  background: rgba(255, 248, 237, 0.14);
  color: var(--gold);
}

.book {
  min-height: 700px;
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  perspective: 1600px;
}

.book::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  z-index: 3;
  width: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.16));
  filter: blur(0.2px);
  pointer-events: none;
}

.page {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 25, 21, 0.12);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.06)),
    repeating-linear-gradient(0deg, rgba(36, 25, 21, 0.022), rgba(36, 25, 21, 0.022) 1px, transparent 1px, transparent 28px),
    var(--page);
}

.page-photo {
  border-radius: var(--radius) 0 0 var(--radius);
  transform-origin: right center;
}

.page-menu {
  display: flex;
  flex-direction: column;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 44px 48px 38px;
  transform-origin: left center;
}

.page-number {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 2;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.28);
  border-radius: 50%;
  background: rgba(31, 47, 42, 0.78);
  color: #fff8ed;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

.page-photo img {
  width: 100%;
  height: 100%;
  min-height: 700px;
  object-fit: cover;
}

.page-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(20, 13, 9, 0.76));
}

.photo-caption {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 2;
  color: #fff8ed;
}

.photo-caption span,
.photo-caption strong {
  display: block;
}

.photo-caption span {
  color: var(--gold);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.photo-caption strong {
  max-width: 420px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.4rem;
  line-height: 0.92;
}

.page-top {
  display: grid;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.page-top h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.page-top span {
  color: var(--ink-soft);
  font-weight: 800;
}

.dish-list {
  display: grid;
  gap: 18px;
  padding: 26px 0;
}

.dish {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.dish + .dish {
  padding-top: 18px;
  border-top: 1px solid rgba(36, 25, 21, 0.1);
}

.dish h3 {
  margin: 4px 0 6px;
  font-size: 1.24rem;
  line-height: 1.18;
}

.dish p {
  margin: 0;
  color: var(--ink-soft);
}

.dish-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(36, 25, 21, 0.1);
  border-radius: 50%;
  background: var(--page-warm);
  color: var(--forest);
  font-weight: 950;
}

.chef-note {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(31, 47, 42, 0.14);
  border-radius: var(--radius);
  background: rgba(156, 175, 136, 0.16);
}

.chef-note p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.menu-strip {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0 auto 48px;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 248, 237, 0.2);
  box-shadow: var(--shadow);
}

.menu-strip article {
  padding: 20px;
  background: rgba(31, 47, 42, 0.86);
  color: #fff8ed;
}

.menu-strip span {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.menu-strip p {
  margin: 5px 0 0;
  font-weight: 850;
}

.book.turning .page-photo {
  animation: leftPage 0.34s ease;
}

.book.turning .page-menu {
  animation: rightPage 0.34s ease;
}

@keyframes leftPage {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(3deg); }
  100% { transform: rotateY(0); }
}

@keyframes rightPage {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(-3deg); }
  100% { transform: rotateY(0); }
}

@media (max-width: 1080px) {
  .book-shell {
    grid-template-columns: 1fr;
  }

  .book-index {
    padding: 20px;
  }

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

  .book {
    min-height: 650px;
  }
}

@media (max-width: 820px) {
  .menu-header {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 18px;
    padding: 10px;
  }

  .quick-nav {
    width: 100%;
    gap: 10px;
    justify-content: space-between;
    overflow-x: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 248, 237, 0.14);
    scrollbar-width: none;
  }

  .quick-nav::-webkit-scrollbar {
    display: none;
  }

  .quick-nav a {
    min-height: 38px;
    justify-content: center;
    flex: 1 0 auto;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 248, 237, 0.08);
  }

  .cookbook {
    padding-top: 168px;
  }

  .book-index {
    overflow: hidden;
  }

  .category-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .category-list::-webkit-scrollbar {
    display: none;
  }

  .category-tab {
    width: auto;
    min-width: 168px;
    flex: 0 0 168px;
    scroll-snap-align: start;
  }

  .book {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .book::before {
    display: none;
  }

  .page-photo,
  .page-menu {
    border-radius: var(--radius);
  }

  .page-photo img {
    min-height: 360px;
  }

  .page-menu {
    padding: 32px 24px 24px;
  }

  .photo-caption strong,
  .page-top h2 {
    font-size: 3rem;
  }

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

@media (max-width: 560px) {
  .menu-header,
  .book-shell,
  .menu-strip {
    width: calc(100% - 28px);
  }

  .menu-header {
    position: fixed;
    top: 8px;
  }

  .brand span {
    font-size: 0.92rem;
  }

  .quick-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .quick-nav a {
    min-width: 0;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .book-index h1 {
    font-size: 2.2rem;
  }

  .category-list {
    margin-inline: -2px;
  }

  .category-tab {
    min-width: 152px;
    flex-basis: 152px;
    min-height: 50px;
  }

  .category-tab strong {
    font-size: 0.92rem;
  }

  .photo-caption {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .photo-caption strong,
  .page-top h2 {
    font-size: 2.45rem;
  }

  .dish {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dish-mark {
    width: 38px;
    height: 38px;
  }
}
