@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Syne:wght@400;500;700;800&display=swap');

/* Color Variables and Core Utilities */
:root {
  --bg-color: #0B0B0B;
  --color-ivory: #F5F5F0;
  --color-beige: #C5B49E;
  --color-gold: #D9B48F;
  --color-dark-gray: #171717;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Syne', sans-serif;
  
  --cursor-size: 8px;
  --cursor-outer-size: 40px;
}

/* Custom Scrollbar */
html.lenis {
  height: auto;
}

.lenis-clean {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}
.lenis-clean::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Selection style */
::selection {
  background-color: var(--color-gold);
  color: var(--bg-color);
}

body {
  background-color: var(--bg-color);
  color: var(--color-ivory);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain Noise Overlay */
.grain-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  width: 200%;
  height: 200%;
  background: transparent url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E') repeat;
  opacity: 0.045;
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%, 100% { transform:translate(0, 0); }
  10% { transform:translate(-5%, -10%); }
  20% { transform:translate(-15%, 5%); }
  30% { transform:translate(7%, -25%); }
  40% { transform:translate(-5%, 25%); }
  50% { transform:translate(-15%, 10%); }
  60% { transform:translate(15%, 0%); }
  70% { transform:translate(0%, 15%); }
  80% { transform:translate(3%, 35%); }
  90% { transform:translate(-10%, 10%); }
}

/* Custom Cursor */
.custom-cursor {
  width: var(--cursor-size);
  height: var(--cursor-size);
  background-color: var(--color-gold);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-outer {
  width: var(--cursor-outer-size);
  height: var(--cursor-outer-size);
  border: 1px solid rgba(245, 245, 240, 0.3);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: border-color 0.3s, background-color 0.3s, width 0.3s, height 0.3s;
}

/* Cursor States */
body.hovering-link .custom-cursor {
  width: 0;
  height: 0;
  opacity: 0;
}

body.hovering-link .custom-cursor-outer {
  width: 60px;
  height: 60px;
  border-color: var(--color-gold);
  background-color: rgba(217, 180, 143, 0.1);
}

body.hovering-dark .custom-cursor-outer {
  border-color: var(--bg-color);
}

body.hovering-dark .custom-cursor {
  background-color: var(--bg-color);
}

/* Custom cursor text indicators */
.cursor-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--bg-color);
  text-transform: uppercase;
  pointer-events: none;
  transition: transform 0.2s ease;
  white-space: nowrap;
}

body.hovering-interactive .cursor-label {
  transform: translate(-50%, -50%) scale(1);
}

body.hovering-interactive .custom-cursor-outer {
  width: 70px;
  height: 70px;
  background-color: var(--color-ivory);
  border-color: var(--color-ivory);
}

body.hovering-interactive .custom-cursor {
  opacity: 0;
}

/* Typography styles */
.font-serif-luxury {
  font-family: var(--font-serif);
}

.font-sans-editorial {
  font-family: var(--font-sans);
}

/* Preloader Animation */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 10100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  box-sizing: border-box;
}

.preloader-bg-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212;
  transform: scaleY(0);
  transform-origin: top;
  z-index: -1;
}

/* Glassmorphism Overlays */
.glass-panel {
  background: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 245, 240, 0.08);
}

.glass-panel-light {
  background: rgba(245, 245, 240, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 245, 240, 0.05);
}

/* Editorial Gridlines */
.grid-line-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: rgba(245, 245, 240, 0.03);
  z-index: 0;
  pointer-events: none;
}

.grid-line-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(245, 245, 240, 0.03);
  z-index: 0;
  pointer-events: none;
}

/* Mask reveal effect for text */
.text-mask {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}

/* Custom hover animations for luxury styling */
.magnetic-btn {
  display: inline-block;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link {
  position: relative;
}

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

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

/* Diagonal layout structures (Brutalist aspect) */
.brutalist-border {
  border: 1px solid rgba(245, 245, 240, 0.15);
}

.brutalist-border-gold {
  border: 1px solid rgba(217, 180, 143, 0.3);
}

/* Vertical Text */
.vertical-text {
  writing-mode: vertical-lr;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* Custom horizontal pin container sizing */
.horizontal-scroll-container {
  display: flex;
  flex-wrap: nowrap;
  width: 400vw; /* 4 screens wide */
  height: 100vh;
  will-change: transform;
}

.horizontal-panel {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
}

/* Floating Image follow container for Signature Menu Showcase */
.floating-menu-image {
  position: fixed;
  width: 280px;
  height: 380px;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-menu-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.menu-item:hover .floating-menu-image {
  opacity: 1;
  transform: scale(1);
}

.menu-item:hover .floating-menu-image img {
  transform: scale(1);
}

/* Custom form styles */
.form-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 245, 240, 0.25);
  color: var(--color-ivory);
  font-family: var(--font-sans);
  padding: 1rem 0;
  width: 100%;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--color-gold);
}

.form-label {
  color: var(--color-beige);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  transform: translateY(0);
  transition: transform 0.3s, color 0.3s;
}

/* Masonry grid column heights */
.masonry-col:nth-child(even) {
  transform: translateY(60px);
}

/* Ambient line highlights */
.animated-width {
  width: 0%;
  transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.animated-width.active {
  width: 100%;
}

/* Lightbox styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 11, 11, 0.95);
  z-index: 10200;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

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