:root {
  color-scheme: dark;
  --ink: #17130f;
  --ink-soft: #2b241d;
  --paper: #f5f2ed;
  --gold: #d9ad4c;
  --gold-light: #f0ce7b;
  --muted: #b9ac9e;
  --header-height: 5.25rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
}

body {
  height: 100%;
  min-width: 20rem;
  margin: 0;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 10% 15%, rgb(217 173 76 / 10%), transparent 26rem),
    linear-gradient(135deg, #15110e, #211a14 52%, #15110e);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  pointer-events: none;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--gold-light);
  border-radius: 0.4rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem clamp(0.8rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  background: rgb(23 19 15 / 88%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 0.5rem;
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 32%);
}

.brand__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.phone {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgb(217 173 76 / 55%);
  border-radius: 999px;
  color: var(--paper);
  background: rgb(255 255 255 / 5%);
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.phone svg {
  width: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.download,
.social-link,
.control {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  color: var(--paper);
  background: rgb(255 255 255 / 5%);
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.download {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.download:hover,
.phone:hover,
.social-link:hover,
.control:hover:not(:disabled) {
  color: var(--ink);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.download:focus-visible,
.phone:focus-visible,
.social-link:focus-visible,
.control:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

.download svg,
.social-link svg,
.control svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.social-link svg {
  fill: currentColor;
}

.social-link[href*="instagram"] svg {
  fill: none;
}

.social-link[href*="instagram"] .social-link__dot {
  fill: currentColor;
  stroke: none;
}

.book {
  position: relative;
  height: 100dvh;
  padding-top: var(--header-height);
  overflow: hidden;
}

.book__hint {
  position: fixed;
  z-index: 40;
  top: calc(var(--header-height) + 0.55rem);
  left: 50%;
  margin: 0;
  padding: 0.42rem 0.7rem;
  color: var(--muted);
  background: rgb(23 19 15 / 72%);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  transition: opacity 220ms ease;
}

body[data-has-scrolled="true"] .book__hint {
  opacity: 0;
}

.menu-pages {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  touch-action: none;
}

.menu-page {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 2.25rem 0.45rem 5.4rem;
  visibility: hidden;
  pointer-events: none;
}

.menu-page.is-current,
.menu-page.is-under,
.menu-page.is-flipping-forward,
.menu-page.is-flipping-back {
  visibility: visible;
}

.menu-page.is-current {
  z-index: 3;
}

.menu-page.is-under {
  z-index: 2;
}

.menu-page.is-flipping-forward {
  z-index: 5;
}

.menu-page.is-flipping-back {
  z-index: 5;
}

.menu-page__sheet {
  position: relative;
  width: min(
    calc(100vw - 0.9rem),
    52rem,
    calc((100dvh - var(--header-height) - 7.65rem) * 0.7072)
  );
  overflow: hidden;
  aspect-ratio: 595.5 / 796.77;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 0.12rem 0.12rem 0.35rem 0.35rem;
  background: #eee9e2;
  box-shadow:
    0 2.1rem 5rem rgb(0 0 0 / 52%),
    0 0.22rem 0 #c8bfb4,
    0 0.5rem 0 -1px #9f958a;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-1.5rem) scale(0.99);
  transform-origin: 50% 0;
  will-change: transform, opacity, filter;
}

.menu-page.is-current .menu-page__sheet {
  opacity: 1;
  filter: brightness(1);
  transform: translateY(0) scale(1);
}

.menu-page.is-under .menu-page__sheet {
  opacity: 1;
  filter: brightness(0.98);
  transform: translateY(0) scale(0.998);
}

.menu-page.is-flipping-forward .menu-page__sheet {
  animation: sheet-forward 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.menu-page.is-flipping-back .menu-page__sheet {
  animation: sheet-back 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes sheet-forward {
  0% {
    opacity: 1;
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
  45% {
    opacity: 0.82;
    filter: brightness(0.98);
    transform: translateY(-0.35rem) scale(0.998);
  }
  100% {
    opacity: 0;
    filter: brightness(0.94);
    transform: translateY(-1.5rem) scale(0.99);
  }
}

@keyframes sheet-back {
  0% {
    opacity: 0;
    filter: brightness(0.94);
    transform: translateY(-1.5rem) scale(0.99);
  }
  55% {
    opacity: 0.82;
    filter: brightness(0.98);
    transform: translateY(-0.35rem) scale(0.998);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
}

.book-binding {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 2.25rem 0.45rem 5.4rem;
  overflow: hidden;
  pointer-events: none;
}

.book-binding__sheet {
  position: relative;
  width: min(
    calc(100vw - 0.9rem),
    52rem,
    calc((100dvh - var(--header-height) - 7.65rem) * 0.7072)
  );
  overflow: visible;
  aspect-ratio: 595.5 / 796.77;
}

.book-binding img {
  position: absolute;
  bottom: calc(100% - 1px);
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.7rem 0.7rem 0 0;
  filter: drop-shadow(0 0.28rem 0.22rem rgb(0 0 0 / 22%));
}

.book-binding__sheet::after {
  position: absolute;
  right: 0;
  bottom: calc(100% - 1px);
  left: 0;
  height: 0.24rem;
  content: "";
  background: linear-gradient(to bottom, rgb(0 0 0 / 26%), transparent);
}

.menu-page__sheet::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset 0 0 2.2rem rgb(40 31 22 / 13%);
  pointer-events: none;
}

.menu-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eee9e2;
  user-select: none;
  -webkit-user-drag: none;
}

.book-controls {
  position: fixed;
  z-index: 60;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: max(0.75rem, env(safe-area-inset-left));
  display: grid;
  width: min(calc(100% - 1.5rem), 22rem);
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.4rem;
  margin: auto;
  padding: 0.35rem;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 999px;
  background: rgb(43 36 29 / 91%);
  box-shadow: 0 0.8rem 2.8rem rgb(0 0 0 / 38%);
  backdrop-filter: blur(18px);
}

.control {
  border: 0;
  background: transparent;
}

.control:disabled {
  opacity: 0.25;
  cursor: default;
}

.page-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.page-status strong {
  color: var(--paper);
  font-size: 1rem;
}

.page-progress {
  position: absolute;
  right: 3.4rem;
  bottom: 0.25rem;
  left: 3.4rem;
  height: 2px;
  overflow: hidden;
  background: rgb(255 255 255 / 10%);
  border-radius: 999px;
}

.page-progress span {
  display: block;
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  background: var(--gold);
  transition: width 140ms ease-out;
}

.noscript {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 5rem;
  left: 1rem;
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  background: var(--gold-light);
  border-radius: 0.5rem;
  text-align: center;
}

@media (max-width: 38rem) {
  :root {
    --header-height: 5rem;
  }

  .site-header {
    padding-inline: 0.8rem;
  }

  .brand__mark {
    width: 3.65rem;
    height: 3.65rem;
  }

  .brand__name {
    display: none;
  }

  .phone {
    min-height: 2.6rem;
    padding-inline: 0.7rem;
    font-size: 0.78rem;
  }

  .menu-page {
    padding-top: 2rem;
  }

  .menu-page__sheet {
    border-radius: 0.45rem 0.45rem 0.25rem 0.25rem;
    box-shadow:
      0 1.5rem 3.5rem rgb(0 0 0 / 48%),
      0 0.18rem 0 #c8bfb4;
  }
}

@media (max-width: 22.5rem) {
  .header-actions {
    gap: 0.35rem;
  }

  .phone {
    width: 2.6rem;
    padding: 0;
    justify-content: center;
  }

  .phone span {
    display: none;
  }

  .download,
  .social-link {
    width: 2.6rem;
    height: 2.6rem;
  }
}

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