/* =========================================================================
   THE BOOZY CUPCAKE SHOP — Design System
   Speakeasy-patisserie: espresso black, cream, tequila-rose, gold.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --ink:        #19100e;   /* warm near-black */
  --ink-2:      #241715;
  --ink-3:      #32201d;
  --wine:       #4a172a;   /* deep boozy wine */
  --wine-2:     #6a2440;
  --cream:      #f7efe2;
  --cream-2:    #ede0cd;
  --paper:      #fbf6ec;
  --rose:       #e07a9f;   /* tequila-rose pink (signature) */
  --rose-deep:  #c2547a;
  --rose-soft:  #f3c4d4;
  --gold:       #c7a24e;
  --gold-2:     #e6cd8f;
  --gold-deep:  #9d7c33;
  --amber:      #b9722e;

  /* semantic */
  --bg:         var(--ink);
  --text:       var(--cream);
  --muted:      rgba(247,239,226,.62);
  --line:       rgba(247,239,226,.14);

  /* type */
  --f-display: "Bodoni Moda", Georgia, serif;
  --f-serif:   "Cormorant Garamond", Georgia, serif;
  --f-script:  "Pinyon Script", cursive;
  --f-sans:    "Manrope", system-ui, -apple-system, sans-serif;

  /* spacing / shape */
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-xl: 36px;
  --shadow: 0 30px 70px -30px rgba(0,0,0,.7);
  --shadow-soft: 0 20px 50px -25px rgba(0,0,0,.55);
  --maxw: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --nav-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }
::selection { background: var(--rose); color: var(--ink); }

/* film-grain / warmth overlay on body */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9998;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
.wrap-wide { width: min(100% - 32px, 1480px); margin-inline: auto; }
.section { padding: clamp(72px, 11vw, 150px) 0; position: relative; }
.center { text-align: center; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.04; letter-spacing: -0.01em; }
.display {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: .98;
  letter-spacing: -0.015em;
}
.italic { font-style: italic; }
.script { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; }

.eyebrow {
  font-family: var(--f-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-2);
  display: inline-flex; align-items: center; gap: 14px;
}
.eyebrow::before, .eyebrow.flank::after {
  content: ""; width: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow.flank::after { background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow.no-line::before { display: none; }

.lede { font-family: var(--f-serif); font-size: clamp(20px, 2.4vw, 27px); line-height: 1.5; color: var(--cream); font-weight: 400; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--rose);
  --fg-btn: var(--ink);
  display: inline-flex; align-items: center; gap: 11px;
  padding: 16px 30px;
  font-family: var(--f-sans);
  font-weight: 700; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--bg-btn); color: var(--fg-btn);
  border-radius: 100px;
  position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s;
  box-shadow: 0 12px 30px -12px rgba(224,122,159,.6);
  isolation: isolate;
  white-space: nowrap;
}
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -14px rgba(224,122,159,.7); }
.btn:hover .arrow { transform: translateX(5px); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, var(--rose), var(--gold-2));
  opacity: 0; transition: opacity .4s;
}
.btn:hover::after { opacity: 1; }

.btn-gold { --bg-btn: var(--gold); box-shadow: 0 12px 30px -12px rgba(199,162,78,.6); }
.btn-gold:hover { box-shadow: 0 20px 40px -14px rgba(199,162,78,.7); }
.btn-gold::after { background: linear-gradient(120deg, var(--gold-2), var(--rose)); }

.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1px solid var(--line); box-shadow: none;
  backdrop-filter: blur(4px);
}
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: rgba(247,239,226,.07); border-color: var(--gold); box-shadow: none; }

.link-underline {
  font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-2); display: inline-flex; align-items: center; gap: 9px;
  padding-bottom: 4px; position: relative; white-space: nowrap;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(.0); transform-origin: left; transition: transform .45s var(--ease);
}
.link-underline:hover::after { transform: scaleX(1); }
.link-underline .arrow { transition: transform .4s var(--ease); }
.link-underline:hover .arrow { transform: translateX(5px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .5s var(--ease), height .4s var(--ease), border-color .5s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(20,12,11,.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
  height: 70px;
}
.nav__inner { width: min(100% - 48px, 1480px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.nav__links { display: flex; gap: 34px; align-items: center; }
.nav__links.right { justify-content: flex-end; }
.nav__link {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cream); position: relative; padding: 6px 0; opacity: .85; transition: opacity .3s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .4s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { opacity: 1; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }

.brand { display: flex; flex-direction: column; align-items: center; line-height: 1; text-align: center; }
.brand__script { font-family: var(--f-script); font-size: 30px; color: var(--rose); margin-bottom: -2px; }
.brand__name { font-family: var(--f-sans); font-size: 10px; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: var(--cream); }
.nav.scrolled .brand__script { font-size: 25px; }

.nav__cta { display: inline-flex; }
.nav__burger { display: none; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 1200; background: var(--ink); transform: translateY(-100%); transition: transform .6s var(--ease); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.drawer.open { transform: translateY(0); }
.drawer a { font-family: var(--f-display); font-size: 38px; padding: 10px; }
.drawer__close { position: absolute; top: 26px; right: 26px; font-size: 30px; }

/* ---------- Age gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 4000;
  background: radial-gradient(120% 120% at 50% 0%, var(--wine) 0%, var(--ink) 55%);
  display: grid; place-items: center; text-align: center; padding: 30px;
  transition: opacity .7s var(--ease), visibility .7s;
}
.gate.hidden { opacity: 0; visibility: hidden; }
.gate__card { max-width: 480px; animation: gateIn 1s var(--ease) both; }
.gate__mark { font-family: var(--f-script); font-size: 56px; color: var(--rose); line-height: 1; }
.gate h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 6vw, 52px); margin: 14px 0 6px; }
.gate p { color: var(--muted); margin-bottom: 30px; font-size: 16px; }
.gate__row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.gate__fine { margin-top: 26px; font-size: 12px; letter-spacing: .04em; color: rgba(247,239,226,.4); }
@keyframes gateIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--ink-2); padding: 20px 0; }
.marquee--gold { background: var(--gold); border-color: transparent; }
.marquee__track { display: flex; gap: 0; width: max-content; animation: scrollX 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { font-family: var(--f-display); font-style: italic; font-size: clamp(20px, 2.6vw, 30px); font-weight: 500; padding: 0 30px; display: inline-flex; align-items: center; gap: 30px; white-space: nowrap; color: var(--cream); }
.marquee--gold .marquee__item { color: var(--ink); }
.marquee__item::after { content: "✦"; font-family: var(--f-sans); font-size: 13px; color: var(--rose); }
.marquee--gold .marquee__item::after { color: var(--wine); }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .1s; }
.reveal[data-d="2"] { transition-delay: .2s; }
.reveal[data-d="3"] { transition-delay: .3s; }
.reveal[data-d="4"] { transition-delay: .4s; }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease); }
.reveal-img.in { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee__track { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink-2); border-top: 1px solid var(--line); padding-top: 90px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; padding-bottom: 64px; }
.footer__brand .brand { align-items: flex-start; text-align: left; }
.footer__brand .brand__script { font-size: 40px; }
.footer h5 { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 18px; }
.footer a.fl { color: var(--muted); display: block; padding: 6px 0; transition: color .3s, transform .3s; }
.footer a.fl:hover { color: var(--cream); transform: translateX(4px); }
.footer__bottom { border-top: 1px solid var(--line); padding: 26px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: rgba(247,239,226,.45); }
.socials { display: flex; gap: 12px; }
.socials a { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: all .35s var(--ease); }
.socials a:hover { background: var(--rose); border-color: var(--rose); color: var(--ink); transform: translateY(-3px); }
.socials svg { width: 17px; height: 17px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.field input, .field textarea, .field select {
  font-family: var(--f-sans); font-size: 15px; color: var(--cream);
  background: rgba(247,239,226,.04); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 16px; transition: border-color .3s, background .3s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--rose); background: rgba(247,239,226,.07); }
.field select option { background: var(--ink-2); }
.field input::placeholder, .field textarea::placeholder { color: rgba(247,239,226,.32); }

/* chip selector */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .25s var(--ease); user-select: none; white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--rose); color: var(--cream); }
.chip.active { background: var(--rose); border-color: var(--rose); color: var(--ink); }

.form-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 160%); background: var(--gold); color: var(--ink); padding: 16px 26px; border-radius: 100px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); z-index: 5000; transition: transform .6s var(--ease), opacity .4s, visibility .4s; display: flex; align-items: center; gap: 10px; opacity: 0; visibility: hidden; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Page header (interior pages) ---------- */
.pagehead { padding: calc(var(--nav-h) + 70px) 0 60px; text-align: center; position: relative; overflow: hidden; }
.pagehead__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 100% at 50% -10%, var(--wine) 0%, var(--ink) 60%); }
.pagehead h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(46px, 9vw, 104px); }
.pagehead .script-accent { font-family: var(--f-script); color: var(--rose); font-size: clamp(40px, 7vw, 80px); display:block; line-height:1; }

/* ---------- Utility ---------- */
.divider-petal { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--gold); }
.divider-petal::before, .divider-petal::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider-petal::after { background: linear-gradient(90deg, var(--gold), transparent); }
.tag-21 { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--gold-deep); border-radius: 100px; padding: 5px 12px; white-space: nowrap; }

@media (max-width: 940px) {
  :root { --nav-h: 70px; }
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .brand { align-items: flex-start; }
  .nav__cta { display: none; }
  .nav__burger { display: inline-grid; place-items: center; justify-self: end; width: 44px; height: 44px; }
  .nav__burger span { width: 24px; height: 2px; background: var(--cream); display: block; position: relative; }
  .nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--cream); }
  .nav__burger span::before { top: -7px; } .nav__burger span::after { top: 7px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 32px, var(--maxw)); }
}
