/* =========================================================
   DOGMA TEQUILA — Premium Brand Website
   Where Myth Becomes Spirit
   ========================================================= */

/* ---------------------------------------------------------
   1. Custom Properties
   --------------------------------------------------------- */
:root {
  /* Brand Colors */
  --gold:          #c49a4a;
  --gold-light:    #e0bf7e;
  --gold-dim:      #8a6b30;
  --gold-ghost:    rgba(196, 154, 74, 0.08);
  --gold-border:   rgba(196, 154, 74, 0.18);
  --copper:        #a0703a;
  --amber:         #7a4e1e;

  /* Backgrounds */
  --bg-void:       #080808;
  --bg-deep:       #0c0b09;
  --bg-dark:       #101010;
  --bg-card:       #131210;
  --bg-card-h:     #1a1816;

  /* Text */
  --text-1:        #ede8df;
  --text-2:        #a09278;
  --text-3:        #5a5248;
  --text-4:        #2e2c28;

  /* Borders / Lines */
  --rule:          rgba(196, 154, 74, 0.12);
  --rule-bright:   rgba(196, 154, 74, 0.3);

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

  /* Easing */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.85, 0, 0.15, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container:     1360px;
  --gap:           clamp(16px, 2vw, 32px);
  --section-y:     clamp(50px, 7vw, 90px);
}

/* ---------------------------------------------------------
   2. Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg-void);
  color: var(--text-1);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

*:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* ---------------------------------------------------------
   3. Grain Overlay
   --------------------------------------------------------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.038;
  pointer-events: none;
  z-index: 9000;
  animation: grain-animate 0.4s steps(2) infinite;
}

@keyframes grain-animate {
  0%   { transform: translate(0,    0);    }
  25%  { transform: translate(-3%,  3%);   }
  50%  { transform: translate(3%,  -3%);   }
  75%  { transform: translate(-3%, -3%);   }
  100% { transform: translate(3%,   3%);   }
}

/* ---------------------------------------------------------
   3b. Global helpers
   --------------------------------------------------------- */
.text-gold { color: var(--gold-light); }

/* ---------------------------------------------------------
   3c. Age Gate
   --------------------------------------------------------- */
#age-gate {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 3, 0.97);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.7s var(--ease-out);
}

#age-gate.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.age-gate-content {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: clamp(22px, 2.5vw, 30px) clamp(28px, 3.5vw, 52px);
  background: rgba(10, 8, 6, 0.92);
  border: 1px solid rgba(196, 154, 74, 0.12);
  max-height: 90vh;
  overflow-y: auto;
}

.age-gate-mark {
  display: block;
  width: clamp(48px, 4.5vw, 62px);
  height: auto;
  margin: 0 auto 10px;
}

.age-gate-brand {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.age-gate-question {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-1);
  margin-bottom: 0;
}

.age-gold { color: var(--gold-light); }

.age-gate-rule {
  width: 64px;
  height: 1px;
  background: rgba(196, 154, 74, 0.25);
  margin: 10px auto;
}

.age-gate-disclaimer {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 38ch;
  margin: 0 auto 16px;
}

.age-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.age-yes {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--gold);
  color: #0a0804;
  border: 2px solid var(--gold-light);
  padding: 14px 42px;
  cursor: pointer;
  min-width: 150px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.age-yes:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.age-no {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 36px;
  cursor: pointer;
  min-width: 110px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.age-no:hover {
  color: var(--text-2);
  border-color: rgba(255, 255, 255, 0.2);
}

.age-gate-responsible {
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-4);
}

/* ---------------------------------------------------------
   4. Custom Cursor (desktop only)
   --------------------------------------------------------- */
@media (pointer: fine) {
  body { cursor: none; }

  .cursor {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    will-change: transform;
  }

  .cursor-ring {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(196, 154, 74, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
                opacity 0.3s ease, border-color 0.3s ease;
    will-change: transform;
  }

  .cursor-ring.hovered {
    width: 52px;
    height: 52px;
    border-color: rgba(196, 154, 74, 0.8);
  }
}

/* ---------------------------------------------------------
   5. Page Loader
   --------------------------------------------------------- */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

#loader.is-hidden {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}

.loader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.loader-name {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--text-1);
  opacity: 0;
  animation: loader-fade 0.6s 0.2s ease forwards;
}

.loader-sub {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-dim);
  opacity: 0;
  animation: loader-fade 0.6s 0.5s ease forwards;
}

@keyframes loader-fade {
  to { opacity: 1; }
}

.loader-bar {
  width: 180px;
  height: 1px;
  background: rgba(196, 154, 74, 0.15);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light));
  width: 0;
  animation: loader-fill 1.6s 0.4s var(--ease-out) forwards;
}

@keyframes loader-fill {
  to { width: 100%; }
}

/* ---------------------------------------------------------
   6. Navigation
   --------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  transition: background 0.5s ease, backdrop-filter 0.5s ease,
              box-shadow 0.5s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--rule);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease;
}

#navbar.scrolled .nav-container {
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.logo-main {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--text-1);
  transition: color 0.3s ease;
}

.logo-sub {
  font-family: var(--sans);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.3s ease;
}

/* Nav menu */
.nav-menu {
  display: flex;
  gap: clamp(24px, 3vw, 44px);
}

.nav-link {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover {
  color: var(--gold-light);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text-1);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------
   7. Shared Typographic & Layout Components
   --------------------------------------------------------- */
.section-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-1);
}

.section-intro {
  font-family: var(--serif);
  font-size: clamp(17px, 1.8vw, 22px);
  font-style: italic;
  color: var(--text-2);
  margin-top: 20px;
}

.chapter-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

.chapter-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text-1);
}

.chapter-body {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.85;
  color: var(--text-2);
  max-width: 52ch;
}

.chapter-body + .chapter-body {
  margin-top: 22px;
}

.chapter-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 30px 0;
  transform: scaleX(0);
  transform-origin: left;
}

.chapter-rule.is-visible {
  transform: scaleX(1);
  transition: transform 0.8s var(--ease-out);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  position: relative;
  padding: 16px 38px;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  overflow: hidden;
}

.btn-primary span {
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out);
}

.btn-primary:hover span { color: #080808; }
.btn-primary:hover::before { transform: translateX(0); }

.btn-ghost {
  gap: 12px;
  color: var(--text-3);
  padding: 16px 0;
  transition: color 0.3s ease;
}

.btn-ghost .arrow {
  transition: transform 0.3s ease;
}

.btn-ghost:hover { color: var(--text-2); }
.btn-ghost:hover .arrow { transform: translateX(6px); }

/* ---------------------------------------------------------
   8. Hero Section — full-bleed bottle background
   --------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  will-change: transform;
  transform: scale(1.06);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(6,5,3,0.22) 0%, rgba(6,5,3,0.7) 100%),
    linear-gradient(to bottom, rgba(6,5,3,0.45) 0%, rgba(6,5,3,0.1) 40%, rgba(6,5,3,0.72) 100%);
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
  padding: 130px clamp(24px, 5vw, 60px) 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100svh;
  justify-content: center;
}

.hero-origin {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(80px, 14vw, 175px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: 0.01em;
  color: var(--text-1);
  margin-bottom: 0;
  text-shadow: 0 4px 60px rgba(0,0,0,0.5);
}

/* Gold separator rule between title and tagline */
.hero-sep {
  width: 56px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 22px auto;
}

.hero-tagline {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-body {
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.9;
  color: rgba(237, 232, 223, 0.65);
  max-width: 52ch;
  margin-bottom: 44px;
  text-align: center;
}

.hero-cta {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Gold-filled primary button (hero variant) */
.btn-filled {
  position: relative;
  padding: 17px 40px;
  background: var(--gold);
  border: 2px solid var(--gold-light);
  color: #0a0804;
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.25s ease;
}

.btn-filled span {
  position: relative;
  z-index: 1;
  color: #0a0804;
  font-weight: 500;
}

.btn-filled:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

/* Legacy selectors kept for unused elements, no visual impact */
.hero-visual        { display: none; }
.hero-bottle-wrap   { display: none; }
.hero-bottle        { display: none; }
.bottle-glow        { display: none; }
.bottle-smoke       { display: none; }
.hero-radial        { display: none; }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.45;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1);    }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

.hero-scroll span {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------------------------------------------------------
   9. Marquee Banner
   --------------------------------------------------------- */
.marquee-wrap {
  border-top: 1px solid var(--rule);
  padding: 14px 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.marquee-dot {
  color: var(--gold) !important;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------------------------------------------------------
   10. Portfolio Section
   --------------------------------------------------------- */
#portfolio {
  padding: var(--section-y) 0 calc(var(--section-y) * 0.7);
  background: var(--bg-void);
}

.portfolio-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  margin-bottom: clamp(30px, 4vw, 50px);
}

.portfolio-visual {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.portfolio-visual img {
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,8,8,0.25) 0%, transparent 30%,
                    transparent 60%, rgba(8,8,8,0.6) 100%);
  margin: 0 clamp(20px, 5vw, 80px);
  pointer-events: none;
}

.portfolio-labels {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.portfolio-label-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.p-label-name {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

.p-label-sub {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.portfolio-label-divider {
  width: 1px;
  height: 40px;
  background: var(--rule-bright);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   11. Chapter Base Styles
   --------------------------------------------------------- */
.chapter {
  padding: var(--section-y) clamp(20px, 5vw, 80px);
  max-width: var(--container);
  margin: 0 auto;
}

.chapter-dark {
  max-width: none;
  padding: 0;
  background: var(--bg-deep);
  overflow: hidden;
}

/* ---------------------------------------------------------
   12. Chapter I: Origin
   --------------------------------------------------------- */
#story {
  background: var(--bg-void);
}

.chapter-split {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.chapter-split-text {
  padding: clamp(40px, 5vw, 60px) 0;
}

.chapter-split-text .chapter-title {
  margin-bottom: 0;
  margin-top: 16px;
}

.stats-row {
  display: flex;
  gap: 0;
  margin-top: 50px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  align-items: center;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}

.stat-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.stat-sep {
  width: 1px;
  height: 48px;
  background: var(--rule);
  flex-shrink: 0;
  margin: 0 clamp(20px, 3vw, 40px);
}

.chapter-split-image {
  position: relative;
}

.chapter-split-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.image-border {
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 1px solid var(--rule-bright);
  pointer-events: none;
  z-index: -1;
}

/* ---------------------------------------------------------
   13. Chapter II: Philosophy
   --------------------------------------------------------- */
#philosophy {
  padding: 0;
}

.philosophy-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.philosophy-image {
  position: relative;
  overflow: hidden;
}

.philosophy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s var(--ease-out);
}

.philosophy-image:hover img {
  transform: scale(1.03);
}

.philosophy-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--bg-deep) 100%);
  pointer-events: none;
}

.philosophy-content {
  padding: clamp(60px, 8vw, 100px) clamp(40px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-deep);
}

.philosophy-heading {
  font-size: clamp(34px, 5vw, 64px);
  margin-bottom: 50px;
  margin-top: 16px;
  line-height: 1.1;
}

.philosophy-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.philosophy-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-2);
  line-height: 1.6;
  transition: color 0.3s ease;
}

.philosophy-item:hover {
  color: var(--text-1);
}

.philosophy-line {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 1px;
  background: var(--gold);
  margin-top: 12px;
}

/* ---------------------------------------------------------
   14. Chapter III: Distinct by Design
   --------------------------------------------------------- */
#design {
  background: var(--bg-deep);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.design-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  margin-bottom: clamp(50px, 6vw, 80px);
}

.design-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--rule);
}

.design-card {
  background: var(--bg-deep);
  padding: clamp(32px, 4vw, 52px) clamp(24px, 3vw, 40px);
  grid-column: span 2;
  transition: background 0.4s ease;
  border: 0;
}

.design-card:nth-child(4) { grid-column: span 3; }
.design-card:nth-child(5) { grid-column: span 3; }

.design-card:hover {
  background: var(--bg-card-h);
}

.design-card-num {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

.design-card-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 16px;
}

.design-card-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-3);
}

/* ---------------------------------------------------------
   15. Chapter IV: Collection
   --------------------------------------------------------- */
#collection {
  background: var(--bg-void);
  max-width: none;
  padding: var(--section-y) 0;
}

.collection-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  margin-bottom: clamp(60px, 8vw, 100px);
  text-align: center;
}

.collection-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  transition: border-color 0.4s ease, transform 0.5s var(--ease-out),
              background 0.4s ease;
  background: rgba(255,255,255,0.01);
}

.product-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-8px);
  background: rgba(255,255,255,0.025);
}

.product-featured {
  border-color: var(--gold-border);
  background: var(--gold-ghost);
  position: relative;
}

.product-featured::before {
  content: 'Signature';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: var(--gold);
  padding: 5px 18px;
  white-space: nowrap;
}

.product-img-wrap {
  position: relative;
  padding: 50px 30px 30px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 420px;
}

.product-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 60px;
  filter: blur(28px);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glow-reposado { background: radial-gradient(ellipse, rgba(160, 40, 30, 0.6) 0%, transparent 70%); }
.glow-anejo    { background: radial-gradient(ellipse, rgba(180, 100, 25, 0.65) 0%, transparent 70%); }
.glow-extra    { background: radial-gradient(ellipse, rgba(200, 180, 120, 0.4) 0%, transparent 70%); }

.product-card:hover .product-glow {
  opacity: 1.5;
}

.product-img {
  position: relative;
  z-index: 1;
  max-height: 340px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.7));
}

.product-card:hover .product-img {
  transform: scale(1.04) translateY(-4px);
}

.product-info {
  padding: 28px 28px 36px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-label-tag {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.product-name {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-1);
}

.product-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-3);
  flex: 1;
}

.product-notes {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.notes-heading {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.notes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes-list li {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--rule);
  padding: 4px 12px;
  border-radius: 0;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.product-card:hover .notes-list li {
  border-color: var(--gold-border);
  color: var(--text-1);
}

/* ---------------------------------------------------------
   16. Chapter V: Craft
   --------------------------------------------------------- */
#craft {
  position: relative;
  padding: 0;
  max-width: none;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.craft-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.craft-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.craft-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0.75) 55%, rgba(8,8,8,0.3) 100%);
}

.craft-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-y) clamp(20px, 5vw, 80px);
  width: 100%;
}

.craft-sub-heading {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  margin-top: 16px;
}

.craft-content .chapter-title {
  max-width: 22ch;
  margin-bottom: 60px;
  margin-top: 16px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  max-width: 900px;
}

.process-step {
  background: rgba(8,8,8,0.7);
  backdrop-filter: blur(8px);
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 30px);
  transition: background 0.3s ease;
}

.process-step:hover {
  background: rgba(20,18,16,0.85);
}

.process-num {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: 14px;
}

.process-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 10px;
}

.process-body {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-3);
}

/* ---------------------------------------------------------
   17. Chapter VI: Experience
   --------------------------------------------------------- */
#experience {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  max-width: none;
  padding: 0;
}

.experience-media {
  position: absolute;
  inset: 0;
}

.experience-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experience-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0.6) 40%, rgba(8,8,8,0.2) 100%);
}

.experience-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 80px);
  width: 100%;
}

.experience-title {
  max-width: 12ch;
  margin-top: 16px;
  margin-bottom: 28px;
}

.experience-body {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.85;
  color: var(--text-2);
  max-width: 52ch;
  margin-bottom: 40px;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.exp-tag {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 10px 22px;
  transition: background 0.3s ease, color 0.3s ease;
}

.exp-tag:hover {
  background: var(--gold-ghost);
  color: var(--gold-light);
}

/* ---------------------------------------------------------
   18. Chapter VII: Contact
   --------------------------------------------------------- */
#contact {
  background: var(--bg-deep);
  max-width: none;
  padding: var(--section-y) 0;
}

.contact-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.contact-header {
  margin-bottom: clamp(50px, 7vw, 90px);
  max-width: 600px;
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 82px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-1);
  margin: 16px 0 20px;
}

.contact-intro {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  font-style: italic;
  color: var(--text-3);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.contact-item {
  padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--rule);
}

.contact-item:last-child {
  border-right: none;
}

.contact-rule { display: none; }

.contact-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact-value {
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.4;
  transition: color 0.3s ease;
}

a.contact-value:hover {
  color: var(--gold-light);
}

/* ---------------------------------------------------------
   19. Footer
   --------------------------------------------------------- */
#footer {
  background: var(--bg-void);
  padding: clamp(50px, 7vw, 90px) clamp(20px, 5vw, 80px) 40px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--text-1);
}

.footer-tagline {
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-nav a {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-origin {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.footer-origin span {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer-rule {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--rule);
  margin: 10px 0;
}

.footer-legal {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-4);
  text-align: center;
  padding: 10px 0;
}

/* ---------------------------------------------------------
   20. Scroll-Triggered Animations
   --------------------------------------------------------- */

/* Default hidden state for all animated elements */
[data-animate] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.85s;
  transition-timing-function: var(--ease-out);
  will-change: opacity, transform;
}

[data-animate="fade-up"] {
  transform: translateY(36px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="slide-right"] {
  transform: translateX(50px);
}

[data-animate="scale-in"] {
  transform: scale(0.96);
}

/* Visible state — triggered by IntersectionObserver adding .is-visible */
[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
}

/* ---------------------------------------------------------
   21. Responsive — Tablet  (≤ 1100px)
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .hero-title {
    font-size: clamp(60px, 10vw, 110px);
  }

  .chapter-split {
    grid-template-columns: 1fr 1fr;
  }

  .collection-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-item:nth-child(2) { border-right: none; }
  .contact-item:nth-child(3) { border-top: 1px solid var(--rule); }
  .contact-item:nth-child(4) { border-top: 1px solid var(--rule); border-right: none; }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-nav {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .footer-origin {
    align-items: flex-end;
  }
}

/* ---------------------------------------------------------
   22. Responsive — Mobile  (≤ 768px)
   --------------------------------------------------------- */
@media (max-width: 768px) {
  /* Nav */
  .nav-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 799;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    font-size: 14px;
    letter-spacing: 0.25em;
  }

  .nav-toggle {
    display: flex;
    z-index: 801;
  }

  /* Hero */
  .hero-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: unset;
    gap: 10px;
    text-align: center;
  }

  .hero-text {
    align-items: center;
    order: 2;
  }

  .hero-visual {
    order: 1;
    justify-content: center;
  }

  .hero-bottle-wrap {
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-bottle {
    max-width: 200px;
  }

  .hero-body {
    font-size: 14px;
    max-width: 40ch;
  }

  .hero-cta {
    justify-content: center;
    gap: 20px;
  }

  .hero-scroll {
    display: none;
  }

  /* Portfolio */
  .portfolio-labels {
    flex-direction: column;
    gap: 24px;
  }

  .portfolio-label-divider {
    width: 40px;
    height: 1px;
  }

  /* Chapter split */
  .chapter-split {
    grid-template-columns: 1fr;
  }

  .chapter-split-image {
    order: -1;
  }

  .image-border {
    display: none;
  }

  /* Philosophy */
  .philosophy-wrap {
    grid-template-columns: 1fr;
  }

  .philosophy-image {
    height: 50vw;
  }

  .philosophy-image-overlay {
    background: linear-gradient(to bottom, transparent 60%, var(--bg-deep) 100%);
  }

  /* Design grid */
  .design-grid {
    grid-template-columns: 1fr;
  }

  .design-card,
  .design-card:nth-child(4),
  .design-card:nth-child(5) {
    grid-column: span 1;
  }

  /* Collection */
  .collection-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    gap: 40px;
  }

  /* Process */
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-item {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }

  .contact-item:last-child {
    border-bottom: none;
  }

  .contact-item:nth-child(3),
  .contact-item:nth-child(4) {
    border-top: none;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-origin {
    align-items: center;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Stats */
  .stats-row {
    flex-wrap: wrap;
    gap: 20px;
  }

  .stat-sep {
    display: none;
  }

  .stat {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(56px, 15vw, 80px);
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ---------------------------------------------------------
   23. Reduced-motion preference
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero-bottle-wrap { animation: none; }
  .marquee-track { animation: none; }
  .hero-scroll-line { animation: none; }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .chapter-rule { transform: scaleX(1); }
}
