/* Beverly Hills Polo Club - Editorial Identity Design System */

/* CSS Reset & Variables */
:root {
  /* Colors - from DESIGN.md */
  --color-surface: #fcf9f6; /* Off-white/Bone */
  --color-primary: #061b0e; /* Deep Racing Green */
  --color-primary-container: #1b3022; /* Medium Racing Green */
  --color-secondary: #42636f; /* Soft Slate Blue */
  --color-tertiary: #1b160f; /* Elegant Black/Coffee */
  
  /* Surface Containers */
  --color-container-lowest: #ffffff;
  --color-container-low: #f5f2ee;
  --color-container-mid: #eeebe7;
  --color-container-high: #e5e2df;
  
  /* Text Colors */
  --color-text-primary: #1b160f;
  --color-text-secondary: #42636f;
  --color-text-light: #ffffff;
  --color-text-muted: rgba(27, 22, 15, 0.6);
  
  /* Borders - 15% opacity outline variant */
  --border-ghost: rgba(27, 22, 15, 0.12);
  
  /* Fonts */
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --space-2: 0.5rem;   /* 8px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */
  
  /* Cursor Speed / Inertia */
  --cursor-transition: transform 0.08s ease-out, opacity 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 19px;
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: var(--color-surface);
}

/* Custom Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

/* Hide Default Cursor (Desktop Only) */
@media (pointer: fine) {
  body, a, button, input, select, textarea {
    cursor: none !important;
  }
}

/* Custom Cursor Elements */
.custom-cursor {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.1s ease-out;
}

.cursor-text {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-surface);
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-transform: uppercase;
}

/* Cursor States */
.custom-cursor.active {
  width: 90px;
  height: 90px;
  background-color: rgba(6, 27, 14, 0.9);
  border-color: transparent;
}

.custom-cursor.active .cursor-text {
  display: block;
  opacity: 1;
}

.custom-cursor.link-hover {
  width: 60px;
  height: 60px;
  background-color: rgba(66, 99, 111, 0.15);
  border-color: var(--color-secondary);
}

.custom-cursor.white-hover {
  border-color: var(--color-surface);
}

.custom-cursor.white-hover-fill {
  width: 90px;
  height: 90px;
  background-color: rgba(252, 249, 246, 0.95);
  border-color: transparent;
}

.custom-cursor.white-hover-fill .cursor-text {
  display: block;
  opacity: 1;
  color: var(--color-primary);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-primary);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.preloader-content {
  text-align: center;
  color: var(--color-surface);
}

.preloader-logo-img {
  height: 90px;
  width: auto;
  margin-bottom: 25px;
  mix-blend-mode: screen;
  filter: invert(1);
  opacity: 0;
  transform: translateY(20px);
  animation: preloader-fade-in 1s ease forwards 0.3s;
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background-color: rgba(252, 249, 246, 0.1);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.preloader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  background-color: var(--color-surface);
  animation: preloader-loading 1.5s infinite ease-in-out;
}

@keyframes preloader-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes preloader-loading {
  0% { left: -50%; }
  100% { left: 100%; }
}

/* Typography & Global Components */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-primary);
  font-weight: 400;
}

p {
  line-height: 1.7;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* Section Header Styles */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-12);
  width: 100%;
}

.section-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: 2.8rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
}

/* Global Container */
.section-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* Glassmorphic Translucent Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 990;
  transition: background-color 0.4s ease, backdrop-filter 0.4s, padding 0.4s ease, box-shadow 0.4s ease;
  padding: var(--space-8) 0;
}

.main-header.scrolled {
  background-color: rgba(252, 249, 246, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-4) 0;
  box-shadow: 0 10px 30px rgba(27, 22, 15, 0.02);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
  mix-blend-mode: screen;
  filter: invert(1);
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1), mix-blend-mode 0.4s ease, transform 0.3s ease;
}

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

.main-header.scrolled .logo-img {
  filter: invert(0);
  mix-blend-mode: multiply;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(252, 249, 246, 0.8);
  padding: var(--space-2) 0;
  position: relative;
  transition: color 0.4s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

.main-header.scrolled .nav-link {
  color: var(--color-text-muted);
}

.main-header.scrolled .nav-link:hover {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  gap: var(--space-6);
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-text-light);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.4s ease, transform 0.2s ease;
}

.action-btn:hover {
  transform: scale(1.05);
}

.action-btn .icon {
  width: 18px;
  height: 18px;
}

.main-header.scrolled .action-btn {
  color: var(--color-primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.1s ease-out; /* Smooth mouse shift */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(6, 27, 14, 0.4) 0%, rgba(27, 22, 15, 0.2) 60%, rgba(6, 27, 14, 0.5) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-8);
}

.hero-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-6);
  opacity: 0;
  transform: translateY(20px);
  color: rgba(252, 249, 246, 0.9);
}

.hero-title {
  font-size: 4.8rem;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-10);
  color: var(--color-text-light);
  opacity: 0;
  transform: translateY(30px);
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  opacity: 0;
  transform: translateY(20px);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.8;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(252, 249, 246, 0.8);
}

.mouse-scroll {
  width: 18px;
  height: 30px;
  border: 1px solid rgba(252, 249, 246, 0.6);
  border-radius: 10px;
  position: relative;
}

.mouse-scroll::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background-color: var(--color-surface);
  border-radius: 2px;
  animation: mouse-wheel 1.6s infinite ease-in-out;
}

@keyframes mouse-wheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 8px); opacity: 0; }
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem var(--space-10);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0.25rem;
  border: none;
  background: none;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
  color: var(--color-text-light);
  box-shadow: 0 4px 15px rgba(6, 27, 14, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 27, 14, 0.25);
  background: linear-gradient(135deg, var(--color-primary-container) 0%, var(--color-primary) 100%);
}

.btn-white {
  background-color: var(--color-container-lowest);
  color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(27, 22, 15, 0.05);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 22, 15, 0.1);
  background-color: var(--color-container-low);
}

.btn-secondary {
  border: 1px solid rgba(252, 249, 246, 0.4);
  color: var(--color-text-light);
}

.btn-secondary:hover {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-surface);
  transform: translateY(-2px);
}

.btn-ghost-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: var(--space-2) 0;
  transition: color 0.3s ease;
}

.btn-line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

.btn-ghost-line:hover {
  color: var(--color-primary);
}

.btn-ghost-line:hover .btn-line {
  width: 65px;
  background-color: var(--color-primary);
}

/* Signature CTA (bottom-border text CTA) */
.signature-cta {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 4px;
  transition: border-bottom-color 0.3s, color 0.3s, padding-right 0.3s ease;
  position: relative;
}

.signature-cta:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
  padding-right: 6px;
}

/* Section 2: Launch Selection (Editorial Grid) */
.lanzamiento-section {
  padding: var(--space-32) 0;
  background-color: var(--color-surface);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: repeat(2, 340px);
  gap: 40px;
  width: 100%;
}

.grid-card {
  position: relative;
  border-radius: 0.375rem; /* md roundedness from DESIGN.md */
  overflow: hidden;
  background-color: var(--color-container-lowest);
  transition: transform 0.1s ease-out; /* JavaScript 3D Tilt handles rotation */
  box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
  transform-style: preserve-3d;
  will-change: transform;
}

.grid-card:hover {
  box-shadow: 0 30px 60px rgba(27, 22, 15, 0.04);
}

.card-tall {
  grid-row: span 2;
  height: 100%;
}

.card-square-top {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.card-square-bottom {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

.card-media-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.card-image, .card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.grid-card:hover .card-image,
.grid-card:hover .card-video {
  transform: scale(1.06);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(27, 22, 15, 0.05) 0%, rgba(27, 22, 15, 0.3) 100%);
  z-index: 2;
}

/* Card Text Overlay */
.card-content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-8);
  z-index: 3;
  transform: translateZ(30px); /* 3D layer lift */
}

.card-tall .card-content-overlay {
  padding: var(--space-10);
}

.card-category {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(252, 249, 246, 0.8);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  display: block;
}

.card-tall .card-title {
  font-size: 2.2rem;
  color: var(--color-text-light);
  line-height: 1.1;
  margin-bottom: 6px;
}

.card-square-top .card-title,
.card-square-bottom .card-title {
  font-size: 1.8rem;
  color: var(--color-text-light);
  font-weight: 400;
}

.card-desc {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(252, 249, 246, 0.7);
  text-transform: uppercase;
}

/* Section 3: The Legacy */
.legacy-section {
  padding: var(--space-32) 0;
  background-color: var(--color-container-low); /* Tonal shift instead of border */
}

.legacy-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}

.legacy-text-col {
  padding-right: var(--space-10);
}

.legacy-text-col .section-title {
  margin-bottom: var(--space-8);
}

.legacy-paragraph {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  font-weight: 400;
}

.legacy-ctas {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.legacy-image-col {
  position: relative;
  border-radius: 0.375rem;
  transform-style: preserve-3d;
}

.legacy-image-wrapper {
  width: 100%;
  height: 520px;
  overflow: hidden;
  border-radius: 0.375rem;
}

.legacy-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.legacy-image-col:hover .legacy-image {
  transform: scale(1.04);
}

/* Floating Quote Card */
.quote-overlay-card {
  position: absolute;
  bottom: -40px;
  left: -50px;
  background-color: var(--color-container-lowest);
  padding: var(--space-8) var(--space-10);
  box-shadow: 0 30px 60px rgba(27, 22, 15, 0.05); /* Soft premium ambient shadow */
  border-radius: 0.25rem;
  z-index: 4;
  transform: translateZ(50px);
  pointer-events: none;
  max-width: 320px;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-primary);
  text-align: center;
}

/* Section 4: Brand Showcase (Showcase Banner) */
.banner-section {
  position: relative;
  height: 50vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  overflow: hidden;
}

.banner-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: var(--color-primary);
}

.banner-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25; /* Subtle logo overlay */
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(6, 27, 14, 0.2) 0%, rgba(6, 27, 14, 0.75) 100%);
  z-index: 2;
}

.banner-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--space-8);
}

.banner-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(252, 249, 246, 0.85);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}

.banner-title {
  font-size: 3.8rem;
  font-weight: 300;
  color: var(--color-text-light);
  margin-bottom: var(--space-6);
  letter-spacing: -0.015em;
}

.banner-desc {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(252, 249, 246, 0.8);
}

/* Section 5: Gallery (Showcase) */
.gallery-section {
  padding: var(--space-32) 0;
  background-color: var(--color-surface);
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
  margin-top: var(--space-10);
}

.gallery-item {
  position: relative;
  border-radius: 0.375rem;
  overflow: hidden;
  background-color: var(--color-container-low);
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery-media-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover .gallery-img {
    transform: scale(1.08);
    opacity: 0;
  }

  .gallery-item:hover .gallery-video {
    transform: scale(1.04);
    opacity: 1;
  }
}

/* Asymmetric sizing based on class */
.item-medium {
  grid-column: span 5;
  height: 480px;
}

.item-wide {
  grid-column: span 7;
  height: 480px;
}

.item-vertical {
  grid-column: span 4;
  height: 520px;
}

.item-square {
  grid-column: span 8;
  height: 520px;
}

/* Hover Gallery Details */
.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-6);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(27, 22, 15, 0.4) 0%, rgba(27, 22, 15, 0) 100%);
  opacity: 0;
  transform: translateY(10px) translateZ(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover .gallery-info {
  opacity: 1;
  transform: translateY(0) translateZ(20px);
}

.gallery-num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(252, 249, 246, 0.6);
}

.gallery-caption {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-text-light);
}

/* Footer Section */
.main-footer {
  background-color: var(--color-container-high);
  padding: var(--space-24) 0 var(--space-10) 0;
  color: var(--color-text-primary);
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 80px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-primary);
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-col-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.footer-newsletter-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.newsletter-form {
  position: relative;
  width: 100%;
}

.input-group {
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 1.5px solid var(--color-text-muted); /* bottom-only border from DESIGN.md */
  transition: border-bottom-color 0.3s ease;
}

.input-group:focus-within {
  border-bottom-color: var(--color-primary);
}

.input-group input {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 40px 12px 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
}

.input-group input:focus {
  outline: none;
}

.input-group input::placeholder {
  color: rgba(27, 22, 15, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.newsletter-submit {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.newsletter-submit:hover {
  color: var(--color-primary);
}

.submit-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.newsletter-submit:hover .submit-arrow {
  transform: translateX(4px);
}

.footer-bottom {
  max-width: 1300px;
  margin: var(--space-20) auto 0 auto;
  padding: var(--space-6) var(--space-8) 0 var(--space-8);
  border-top: 1px solid rgba(27, 22, 15, 0.05); /* Ghost border fallback */
  display: flex;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(27, 22, 15, 0.4);
}

/* Animations and Reveal System */
.reveal-text {
  animation: text-reveal-anim 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle.reveal-text { animation-delay: 0.2s; }
.hero-title.reveal-text { animation-delay: 0.4s; }
.hero-ctas.reveal-text { animation-delay: 0.6s; }

@keyframes text-reveal-anim {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Intersection Observer Scroll Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 1100px) {
  .legacy-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .legacy-text-col {
    padding-right: 0;
  }
  .quote-overlay-card {
    left: 20px;
    bottom: -20px;
  }
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-newsletter-col {
    grid-column: span 2;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 30px;
  }
  .card-tall, .card-square-top, .card-square-bottom {
    grid-column: span 1;
    grid-row: auto;
    height: 400px;
  }
  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .gallery-item {
    grid-column: span 1 !important;
    height: 380px !important;
  }
  .hero-title {
    font-size: 3rem;
  }
  .nav-links {
    display: none; /* Hide standard nav on mobile */
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-newsletter-col {
    grid-column: span 1;
  }
  .hero-ctas {
    flex-direction: column;
    gap: var(--space-4);
  }
  .section-title {
    font-size: 2.2rem;
  }
  .banner-title {
    font-size: 2.6rem;
  }
}

/* Page Transition Overlay for Redirection */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-primary);
  z-index: 10005;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
  color: var(--color-surface);
}

.transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

.transition-overlay-content {
  text-align: center;
}

.transition-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 20px;
  mix-blend-mode: screen;
  filter: invert(1);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.transition-overlay.active .transition-logo-img {
  transform: translateY(0);
  opacity: 1;
}

.transition-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--color-secondary);
  text-transform: uppercase;
  transform: translateY(15px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.15s, opacity 0.8s ease 0.15s;
}

.transition-overlay.active .transition-sub {
  transform: translateY(0);
  opacity: 0.9;
}

/* Collaboration Badge in Hero */
.collab-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid rgba(252, 249, 246, 0.15);
  padding: 8px 18px;
  border-radius: 30px;
  margin-bottom: var(--space-6);
  background-color: rgba(6, 27, 14, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.badge-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-secondary);
}

.badge-sep {
  color: rgba(252, 249, 246, 0.3);
  font-size: 0.8rem;
}

.badge-names {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
}

/* Heritage Explorer Tabs styling */
.heritage-explorer {
  margin: var(--space-6) 0 var(--space-8) 0;
  width: 100%;
}

.explorer-tabs {
  display: flex;
  gap: var(--space-6);
  border-bottom: 1px solid rgba(27, 22, 15, 0.1);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-6);
}

.explorer-tab {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
  position: relative;
  transition: color 0.3s ease;
  cursor: none;
}

.explorer-tab.active {
  color: var(--color-primary);
}

.explorer-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.explorer-tab.active::after {
  transform: scaleX(1);
}

.explorer-pane {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.explorer-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.pane-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  font-weight: 400;
}

.pane-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Rotating Heritage Stamp */
.heritage-stamp {
  position: absolute;
  bottom: -60px;
  right: -50px;
  width: 130px;
  height: 130px;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heritage-stamp svg {
  width: 100%;
  height: 100%;
  animation: spin 24s linear infinite;
}

.heritage-stamp text {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  fill: var(--color-primary);
  text-transform: uppercase;
}

.stamp-inner {
  position: absolute;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: var(--color-container-lowest);
  box-shadow: 0 8px 25px rgba(27, 22, 15, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(27, 22, 15, 0.05);
}

.stamp-logo {
  width: 75%;
  height: auto;
  mix-blend-mode: multiply;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile Optimization & Responsiveness Override */
@media (max-width: 768px), (pointer: coarse) {
  /* Hide custom cursors entirely */
  .custom-cursor, .custom-cursor-dot {
    display: none !important;
  }
  body, a, button, input, select, textarea {
    cursor: auto !important;
  }
  
  /* Fallback static backgrounds for video wrappers to save cellular data & CPU */
  .hero-video-bg, .banner-video-bg {
    display: none !important;
  }
  .hero-video-wrapper {
    background-image: url('imagen 5.jpg');
    background-size: cover;
    background-position: center;
  }
  .banner-video-wrapper {
    background-image: url('imagen 1.jpg');
    background-size: cover;
    background-position: center;
  }
  
  /* Section 3 Tab Explorer spacing for mobile screens */
  .heritage-explorer {
    margin-top: 1.5rem;
  }
  .tab-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
