/* ==========================================================================
   MALDONERO BY PATEGG - Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --gold: #c9a227;
  --gold-light: #d4b84a;
  --dark: #1a1a1a;
  --brown: #2d2320;
  --brown-light: #3d322e;
  --cream: #faf8f5;
  --white: #ffffff;
  --gray-600: #555;
  --gray-500: #666;
  --gray-400: #888;
  --gray-300: #999;

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Montserrat", -apple-system, sans-serif;

  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  cursor: none;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  cursor: none;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Custom Cursor - Mix Blend
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-follower {
  display: none;
}

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-content {
  text-align: center;
}

.preloader-text {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.3em;
  color: var(--white);
}

.preloader-line {
  width: 0;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto 0;
}

/* --------------------------------------------------------------------------
   Page Transition
   -------------------------------------------------------------------------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
}

.page-transition.is-hidden {
  transform: translateY(100%);
}

.page-transition-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0.3em;
  color: var(--white);
  opacity: 0;
}

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

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

address {
  font-style: normal;
}

button {
  cursor: none;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none !important;
  }

  html,
  body,
  a,
  button,
  .btn {
    cursor: auto;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  transition: background var(--transition-fast);
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--white);
  font-weight: 400;
}

.burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: all var(--transition-fast);
}

.burger-menu:hover span {
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Fullscreen Menu
   -------------------------------------------------------------------------- */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 2.5rem;
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color var(--transition-fast);
}

.menu-close span {
  font-size: 1.5rem;
  line-height: 1;
}

.menu-close:hover {
  color: var(--gold);
}

.menu-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  padding: 4rem;
  gap: 4rem;
}

.menu-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 60vh;
}

.menu-nav {
  list-style: none;
}

.menu-nav li {
  overflow: hidden;
}

.menu-link {
  display: block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--cream);
  padding: 0.75rem 0;
  transition: color var(--transition-fast);
}

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

.menu-social {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-social a {
  color: var(--cream);
  opacity: 0.6;
  transition:
    opacity var(--transition-fast),
    color var(--transition-fast);
}

.menu-social a:hover {
  opacity: 1;
  color: var(--gold);
}

.menu-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding-left: 4rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-contact-item {
  /* GSAP handles the animation */
}

.menu-contact-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.menu-contact-link {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--cream);
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-contact-link:hover {
  color: var(--gold);
}

.menu-contact-arrow {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-contact-arrow span {
  transition: transform var(--transition-fast);
}

.menu-contact-arrow:hover span {
  transform: translateX(5px);
}

/* Body lock when menu is open */
body.menu-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Components - Button (with magnetic effect)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--gold);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid var(--gold);
  cursor: none;
  position: relative;
  overflow: hidden;
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--dark);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.4s ease,
    height 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  color: var(--white);
  border-color: var(--dark);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.hero-content h1 .char {
  display: inline-block;
}

.hero-content p {
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 1;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: var(--white);
}

/* --------------------------------------------------------------------------
   Intro Section
   -------------------------------------------------------------------------- */
.intro {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--cream);
}

.intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1rem;
}

.intro p {
  font-size: 0.95rem;
  color: var(--gray-500);
  letter-spacing: 0.1em;
}

.intro .btn {
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Gallery Section - 3x3 Grid with rotating images
   -------------------------------------------------------------------------- */
.gallery {
  padding: 2rem;
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
}

.gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 0.8s ease,
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: grayscale(0);
}

.gallery-cell:hover img {
  transform: scale(1.1);
  filter: grayscale(0);
}

.gallery-cell img.fade-out {
  opacity: 0;
  transform: scale(1.1);
}

.gallery-center {
  background: transparent;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

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

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

.about-content h3 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-content .btn {
  margin-top: 2rem;
  align-self: flex-start;
}

.schedule {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--cream);
  border-left: 3px solid var(--gold);
}

.schedule p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--dark);
}

/* --------------------------------------------------------------------------
   Events Section
   -------------------------------------------------------------------------- */
.events {
  padding: 5rem 2rem;
  background: var(--dark);
  color: var(--white);
  text-align: center;
}

.events h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 3rem;
  letter-spacing: 0.2em;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.event-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.event-card:hover img {
  transform: scale(1.15);
}

.event-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  transform: translateY(20px);
  opacity: 0.8;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.event-card:hover .event-card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.event-card-overlay p {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.events-cta {
  margin-top: 3rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--cream);
}

.contact h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 2rem;
}

.contact-info {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.contact-info p {
  margin: 0.5rem 0;
}

.contact-info a {
  color: var(--gold);
  transition: color var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 3rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.85rem;
  color: var(--gray-400);
  display: block;
  margin: 0.4rem 0;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #333;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .gallery-grid {
    max-width: 600px;
  }

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

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

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .menu-container {
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 3rem;
  }

  .menu-left {
    min-height: auto;
  }

  .menu-right {
    padding-left: 0;
    padding-top: 2rem;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 2rem;
  }

  .menu-contact-link {
    font-size: 1.25rem;
  }

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

  .about-image {
    min-height: 50vh;
  }

  .about-content {
    padding: 2.5rem 1.5rem;
  }

  .about-content h3 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    gap: 0.5rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    letter-spacing: 0.15em;
  }

  .btn {
    padding: 0.875rem 2rem;
    width: 100%;
    text-align: center;
  }
}
