/* ─────────────────────────────────────────────────────────────
   Tipsy Parties — UK cocktail menu
   Header replicates tipsyparties.co.uk (europa 300, letterspaced,
   monochrome). The menu itself is set like printed bar stationery:
   warm paper stock, deep ink, hairline rules, sage accent.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:      #f5f2eb;
  --paper-deep: #ece7dc;
  --ink:        #16130f;
  --muted:      #6e655a;
  --rule:       rgba(22, 19, 15, .16);
  --rule-soft:  rgba(22, 19, 15, .08);
  --sage:       #78bca1;

  --sans:  europa, "Raleway", "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;

  --hdr-h: 96px;
  --page-w: 560px;
  --page-h: 791px;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px;
  font-size: 13px; letter-spacing: 2px; text-decoration: none;
}
.skip:focus { left: 0; }

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--rule-soft);
}
.hdr-inner {
  max-width: 1360px; margin: 0 auto;
  padding: 0 30px;
  min-height: var(--hdr-h);
  display: flex; align-items: center; gap: 24px;
}
.hdr-logo { display: flex; align-items: center; flex: 0 0 auto; }
/* The source asset is a white shaker on transparency, so it has to be
   inverted to read on the white header. It is used as-is on the dark covers. */
.hdr-logo img { width: 52px; height: auto; display: block; filter: invert(1); }

.hdr-nav { margin-left: auto; }
.hdr-nav ul {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0 26px; margin: 0; padding: 0; list-style: none;
}
.hdr-nav a {
  display: inline-block;
  font-size: 11px; font-weight: 300; letter-spacing: 2px;
  line-height: 20px; color: #333; text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.hdr-nav a:hover, .hdr-nav a:focus-visible {
  color: var(--ink); border-bottom-color: var(--ink);
}

/* Hamburger — mirrors the Avada flyout toggle */
.hdr-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.hdr-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
.hdr-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hdr-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── Mobile flyout ──────────────────────────────────────────── */

.flyout-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(22, 19, 15, .45);
  animation: fade .25s ease;
}
.flyout {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(88vw, 340px);
  background: #fff;
  padding: 28px 30px calc(40px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: -18px 0 50px rgba(22, 19, 15, .16);
  animation: slide-in .32s cubic-bezier(.22, 1, .36, 1);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.flyout-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: 0; cursor: pointer;
  font-size: 34px; line-height: 1; color: var(--ink);
}
.flyout-logo { width: 42px; height: auto; margin-bottom: 26px; display: block; }
.flyout ul { list-style: none; margin: 0; padding: 0; }
.flyout li + li { border-top: 1px solid var(--rule-soft); }
.flyout a {
  display: block; padding: 15px 0;
  font-size: 12px; letter-spacing: 2.4px; color: #333; text-decoration: none;
}
.flyout a:hover { color: var(--ink); }

/* ── Section jump bar (mobile only) ─────────────────────────── */

.jumpbar { display: none; }

/* ── Book ───────────────────────────────────────────────────── */

main { background: #fff; }

.book-shell {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 40px 0 0;
}

.page { background: var(--paper); overflow: hidden; }

/* Paper: a faint vertical gradient plus a whisper of grain, so the
   stock reads as printed rather than as a flat fill. */
.pg {
  position: relative;
  height: 100%;
  padding: 44px 44px;
  background:
    linear-gradient(160deg, #fbf9f4 0%, var(--paper) 42%, var(--paper-deep) 100%);
  display: flex; flex-direction: column;
}
.pg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(22,19,15,.05) 1px, transparent 1px);
  background-size: 3px 3px;
}
.pg > * { position: relative; z-index: 1; }

/* Covers */
.page--cover .pg {
  align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(165deg, #1d1a16 0%, #16130f 55%, #0e0c0a 100%);
  color: var(--paper);
}
.page--cover .pg::after { opacity: .28; background-image: radial-gradient(rgba(245,242,235,.18) 1px, transparent 1px); }
.cover-mark { width: 62px; margin-bottom: 30px; }
.cover-brand {
  margin: 0; font-size: clamp(26px, 3.2vw, 38px); font-weight: 300;
  letter-spacing: .28em; text-transform: uppercase; color: var(--paper);
}
.cover-rule { margin: 26px 0; width: 100%; display: flex; justify-content: center; }
.cover-rule span { display: block; width: 54px; height: 1px; background: var(--sage); }
.cover-title {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 2.4vw, 26px); color: rgba(245,242,235,.82);
}
.page--back .cover-title { margin-bottom: 4px; }
.back-contact {
  margin: 26px 0 0; font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase; color: rgba(245,242,235,.5);
}

/* Type */
.eyebrow {
  margin: 0 0 14px; font-size: 10px; letter-spacing: .42em;
  text-transform: uppercase; color: var(--sage);
}
.sec-title {
  margin: 0 0 26px; font-weight: 300;
  font-size: clamp(24px, 2.9vw, 33px); letter-spacing: .13em;
  text-transform: uppercase; line-height: 1.25;
}
.sec-title::after {
  content: ""; display: block; width: 46px; height: 1px;
  background: var(--ink); opacity: .35; margin-top: 20px;
}
.grp {
  margin: 0 0 20px; font-weight: 300;
  font-size: clamp(17px, 2vw, 21px); letter-spacing: .22em;
  text-transform: uppercase;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.grp-i {
  font-family: var(--serif); font-style: italic; text-transform: lowercase;
  letter-spacing: .04em; font-size: .78em; color: var(--muted);
}

.lede p {
  margin: 0 0 15px; font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 17.5px); line-height: 1.72; color: #2b2620;
}
.lede em { font-style: italic; }

.pick-rule {
  margin: 22px 0 0; padding: 18px 20px;
  border: 1px solid var(--rule); border-left: 2px solid var(--sage);
  font-size: 13.5px; letter-spacing: .04em; line-height: 1.75; color: #2b2620;
}
.pick-rule strong { font-weight: 600; }

.supp {
  margin: -12px 0 24px; font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--muted);
}
.supp strong { font-style: normal; font-weight: 400; color: var(--sage); }

.foot-note {
  margin: auto 0 0; padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  font-size: 11.5px; letter-spacing: .05em; color: var(--muted); line-height: 1.6;
}

/* Drinks list */
.drinks { list-style: none; margin: 0; padding: 0; }
.drinks li { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule-soft); }
.drinks li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.drinks--tight li { padding-bottom: 11px; margin-bottom: 11px; }

.drinks h4 {
  margin: 0 0 4px; font-weight: 400;
  font-size: 13.5px; letter-spacing: .16em;
  text-transform: uppercase; line-height: 1.4;
}
.note {
  margin: 0 0 4px; font-family: var(--serif); font-style: italic;
  font-size: 14px; line-height: 1.48; color: #3a342c;
}
.spec {
  margin: 0; font-size: 10px; letter-spacing: .15em; line-height: 1.5;
  text-transform: uppercase; color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
  padding: 15px 30px; border-radius: 0;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: transparent; color: var(--paper); }

.book-controls {
  display: flex; justify-content: center; gap: 14px; margin-top: 26px;
}

.closing {
  max-width: 760px; margin: 46px auto 0; padding: 0 24px;
  text-align: center; font-size: 12px; letter-spacing: .06em; color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
  margin-top: 56px; padding: 34px 24px calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule-soft); text-align: center;
}
.site-footer p { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; }
.site-footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-footer a:hover { border-bottom-color: var(--ink); }
.site-footer .copy { color: var(--muted); letter-spacing: .16em; text-transform: uppercase; font-size: 10.5px; }

/* ═══ DESKTOP: flipbook ═════════════════════════════════════ */

@media (min-width: 900px) {
  /* Size the spread so the book AND its controls fit the viewport — the
     page aspect is 560:791, so height ≈ width × 1.413 for a single leaf. */
  .book-shell { width: min(1180px, 92vw, 104vh); padding-top: 26px; }
  .book { margin: 0 auto; }
  .page { box-shadow: 0 1px 2px rgba(22,19,15,.1); }
  .book-controls[hidden] { display: none; }

  /* Closed on either cover the book sits in half the spread, so centre it
     there and let it slide out as the menu opens. `can-slide` is set from JS
     only when the shifted book still fits on screen. */
  .book-stage { transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
  .book-stage.can-slide.at-cover { transform: translateX(-25%); }
  .book-stage.can-slide.at-back  { transform: translateX(25%); }
}

/* ═══ MOBILE: scrolling menu ════════════════════════════════ */

@media (max-width: 899px) {
  :root { --hdr-h: 72px; }

  .hdr-nav { display: none; }
  .hdr-toggle { display: flex; }
  .hdr-logo img { width: 42px; }

  .jumpbar {
    display: flex; position: sticky; top: var(--hdr-h); z-index: 50;
    background: rgba(255,255,255,.95);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--rule-soft);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .jumpbar::-webkit-scrollbar { display: none; }
  .jumpbar a {
    flex: 0 0 auto; padding: 13px 18px;
    font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--muted); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent;
  }
  .jumpbar a.is-active { color: var(--ink); border-bottom-color: var(--sage); }

  .book-shell { width: 100%; padding: 0; }
  .book { display: block; }

  /* Pages become stacked cards, not fixed-size leaves */
  .page {
    width: auto !important; height: auto !important;
    position: static !important; transform: none !important;
    display: block !important; visibility: visible !important;
    border-bottom: 1px solid var(--rule);
  }
  .pg { height: auto; padding: 38px 22px 42px; }
  .foot-note { margin-top: 26px; }

  /* Section anchors clear the sticky header + jumpbar */
  .page[id] { scroll-margin-top: calc(var(--hdr-h) + 46px); }

  .page--cover .pg { padding: 66px 22px 72px; }
  .cover-mark { width: 52px; margin-bottom: 24px; }

  .book-controls { display: none !important; }
  .closing { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
