/* =========================================================
   PATRICO SCENTS — Global Stylesheet
   Design: White bg · Slate-gray accents · Gold highlights
   ========================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Jost:wght@200;300;400;500&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --white:        #FFFFFF;
  --off-white:    #F8F7F5;
  --slate-900:    #1A1D23;
  --slate-800:    #22262E;
  --slate-700:    #2C3038;
  --slate-600:    #3D434F;
  --slate-400:    #6B7280;
  --slate-200:    #D1D5DB;
  --slate-100:    #EAECEF;
  --gold:         #C9A84C;
  --gold-light:   #E8C87A;
  --gold-dark:    #9E7A2A;
  --gold-muted:   #C9A84C22;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Jost', system-ui, sans-serif;

  /* Sizing */
  --nav-h:        72px;
  --section-pad:  clamp(4rem, 8vw, 9rem);
  --page-gutter:  clamp(1.25rem, 5vw, 4rem);

  /* Transitions */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:       180ms var(--ease);
  --t-med:        350ms var(--ease);
  --t-slow:       600ms var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--slate-800);
  background: var(--white);
  overflow-x: hidden;
}

/* Ensure hidden attribute is respected */
[hidden] {
  display: none !important;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ── Gold Divider ── */
.gold-line {
  display: block;
  width: clamp(2.5rem, 6vw, 5rem);
  height: 1px;
  background: var(--gold);
  margin-block: 1.5rem;
}
.gold-line--center { margin-inline: auto; }

/* ── Typography Helpers ── */
.label {
  font-family: var(--font-sans);
  font-size: clamp(0.6rem, 1vw, 0.7rem);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.serif { font-family: var(--font-serif); }

/* ── ======================================================
       HEADER / NAV
   ====================================================== ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding-inline: var(--page-gutter);
  transition: background var(--t-med), box-shadow var(--t-med), backdrop-filter var(--t-med);
  background: transparent;
}

#site-header.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--slate-100);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}
.logo__name {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 500;
  color: var(--slate-900);
  letter-spacing: 0.04em;
}
.logo__tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.5rem, 0.9vw, 0.62rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.nav-links a {
  font-size: clamp(0.65rem, 1vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-700);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--t-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--t-med);
}
.nav-links a:hover,
.nav-links a.active { color: var(--slate-900); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── Over-dark hero: invert nav colours until scrolled ── */
#site-header.header--over-dark:not(.scrolled) .logo__name {
  color: var(--white);
}
#site-header.header--over-dark:not(.scrolled) .logo__tagline {
  color: var(--gold-light);
}
#site-header.header--over-dark:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.82);
}
#site-header.header--over-dark:not(.scrolled) .nav-links a:hover,
#site-header.header--over-dark:not(.scrolled) .nav-links a.active {
  color: var(--white);
}
#site-header.header--over-dark:not(.scrolled) .hamburger span {
  background: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 110;
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--slate-800);
  transition: transform var(--t-med), opacity var(--t-fast), width var(--t-med);
  transform-origin: center;
}
.hamburger span:nth-child(2) { width: 70%; margin-left: auto; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(10px); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); width: 100%; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-nav a {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 400;
  color: var(--slate-900);
  letter-spacing: 0.06em;
  transition: color var(--t-fast);
}
.mobile-nav a:hover { color: var(--gold); }

/* ── ======================================================
       FOOTER
   ====================================================== ── */
#site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: clamp(3rem, 6vw, 5rem) var(--page-gutter) clamp(1.5rem, 3vw, 2.5rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.footer-logo .logo__name { color: var(--white); }
.footer-logo .logo__tagline { margin-top: 6px; }
.footer-logo p {
  margin-top: 1rem;
  font-size: clamp(0.78rem, 1.2vw, 0.88rem);
  line-height: 1.75;
  color: var(--slate-400);
  max-width: 26ch;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: clamp(0.6rem, 0.9vw, 0.7rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col ul a {
  font-size: clamp(0.8rem, 1.1vw, 0.88rem);
  color: var(--slate-400);
  transition: color var(--t-fast);
}
.footer-col ul a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid var(--slate-700);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: clamp(0.68rem, 0.9vw, 0.76rem);
  color: var(--slate-600);
}
.footer-bottom a { color: var(--gold); }

/* ── ======================================================
       PAGE HERO — shared
   ====================================================== ── */
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  padding: var(--section-pad) var(--page-gutter) clamp(3rem, 5vw, 5rem);
  background: var(--slate-900);
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background: var(--slate-900);
  overflow: hidden;
}
.page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--slate-900) 40%, #2a2316 100%);
  opacity: 0.85;
}
.page-hero__content {
  position: relative;
  z-index: 2;
}
.page-hero .label { color: var(--gold-light); margin-bottom: 0.75rem; }
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
}

/* ── ======================================================
       BUTTONS
   ====================================================== ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9em 2.2em;
  border-radius: 0;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: scale(0.98); }

.btn--gold {
  background: var(--gold);
  color: var(--slate-900);
  border: 1px solid var(--gold);
}
.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn--outline {
  background: transparent;
  color: var(--slate-800);
  border: 1px solid var(--slate-300, #CBD5E1);
}
.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
}
.btn--outline-white:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* Arrow icon in button */
.btn .arrow {
  display: inline-block;
  transition: transform var(--t-fast);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ── ======================================================
       SECTION UTILITY
   ====================================================== ── */
.section {
  padding-block: var(--section-pad);
  padding-inline: var(--page-gutter);
}
.section--dark {
  background: var(--slate-900);
  color: var(--white);
}
.section--slate {
  background: var(--slate-800);
  color: var(--white);
}
.section--off {
  background: var(--off-white);
}

.section-label { /* overline */ }
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
}
.section-sub {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--slate-400);
  max-width: 55ch;
}

/* ── ======================================================
       SCROLL REVEAL
   ====================================================== ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 320ms; }
.reveal-delay-4 { transition-delay: 450ms; }

/* ── ======================================================
       MODAL (Stripe Checkout)
   ====================================================== ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,29,35,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  max-width: 520px;
  width: 100%;
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform var(--t-med);
}
.modal-overlay.open .modal {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-400);
  transition: color var(--t-fast);
  font-size: 1.4rem;
  font-weight: 200;
}
.modal__close:hover { color: var(--slate-900); }

.modal .label { margin-bottom: 0.5rem; }
.modal h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}
.modal__price {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold-dark);
  margin-bottom: 1.5rem;
}
.modal__notes {
  font-size: 0.82rem;
  color: var(--slate-400);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.5rem;
  border: 1px solid var(--slate-200);
  width: fit-content;
}
.qty-control button {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--slate-600);
  transition: background var(--t-fast), color var(--t-fast);
}
.qty-control button:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}
.qty-control span {
  width: 44px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--slate-800);
  border-inline: 1px solid var(--slate-200);
}

.btn--buy {
  width: 100%;
  justify-content: center;
  font-size: 0.75rem;
}

/* Stripe info note */
.stripe-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--slate-400);
  letter-spacing: 0.05em;
}
.stripe-note svg { flex-shrink: 0; }

/* ── ======================================================
       TOAST NOTIFICATION
   ====================================================== ── */
#toast-container {
  position: fixed;
  bottom: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  background: var(--slate-900);
  color: var(--white);
  padding: 0.9rem 1.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-left: 3px solid var(--gold);
  max-width: 320px;
  transform: translateX(120%);
  transition: transform var(--t-med);
}
.toast.show { transform: none; }

/* ── ======================================================
       RESPONSIVE — Mobile
   ====================================================== ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--slate-400); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Selection ── */
::selection { background: var(--gold-muted); color: var(--slate-900); }

/* --- PYRAMID & INGREDIENTS --- */
.pyramid-wrapper { text-align: left; margin: 2rem 0; }
.pyramid-list { list-style: none; padding: 0; margin: 0 0 2rem 0; display: flex; flex-direction: column; gap: 1rem; }
.pyramid-list-item { display: flex; align-items: flex-start; }
.pyramid-icon { 
  width: 0; height: 0; 
  border-left: 10px solid transparent; 
  border-right: 10px solid transparent; 
  border-bottom: 18px solid; 
  margin-right: 1rem; 
  margin-top: 2px;
}
.pyramid-top { border-bottom-color: #E5C158; }
.pyramid-heart { border-bottom-color: #C5A03A; }
.pyramid-base { border-bottom-color: #2a2a2a; }

.pyramid-info { display: flex; flex-direction: column; }
.pyramid-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--slate-400); margin-bottom: 2px; font-weight: 600; }
.pyramid-notes { font-size: 0.9rem; color: var(--slate-800); }

.ingredients-section { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-start; }
.ingredient-card { text-align: center; width: 70px; }
.ingredient-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: var(--slate-100); padding: 5px; margin: 0 auto 5px; border: 1px solid var(--slate-200); }
.ingredient-name { font-size: 0.65rem; color: var(--slate-600); text-transform: capitalize; }
/* LEGAL PAGES */
.legal-wrapper { padding-top: calc(var(--nav-h) + 60px); min-height: 70vh; padding-bottom: 4rem; }
.legal-container { max-width: 800px; margin: 0 auto; padding: 3rem 2.5rem; background: var(--slate-800); border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: 1px solid var(--slate-700); }
.legal-title { font-family: var(--font-serif); font-size: 2.8rem; font-weight: 300; margin-bottom: 3rem; color: var(--gold); text-align: center; }
.legal-section { margin-bottom: 2.5rem; }
.legal-heading { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; color: var(--white); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--slate-700); padding-bottom: 0.5rem; }
.legal-text { font-size: 0.95rem; line-height: 1.7; color: var(--slate-200); }
.legal-text a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
.legal-text a:hover { color: var(--white); }
.legal-text strong { color: var(--white); font-weight: 500; }
@media (max-width: 600px) { .legal-container { padding: 2rem 1.5rem; } .legal-title { font-size: 2.2rem; } }
