/* 
 * IMPERIAL ÉLITE STUDIOS 
 * Luxury Design System
 * version 1.0
 */

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

:root {
  /* Color Palette */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-text-main: #fcfcfc;
  --color-text-muted: #888888;
  --color-accent: #d4af37; /* Royal Gold */
  --color-accent-dim: #a6892b;
  --color-border: rgba(212, 175, 55, 0.2);

  /* Typography */
  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Montserrat", sans-serif;

  /* Spacing & Layout */
  --container-width: 1400px;
  --gutter: 2rem;
  --header-height: 100px;
}

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

html {
  scroll-behavior: auto; /* Let Lenis handle smooth scrolling */
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-main);
  letter-spacing: 0.02em;
}

.text-gold {
  color: var(--color-accent);
}
.text-center {
  text-align: center;
}
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.display-1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
}

.display-2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: block;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 120px 0;
  position: relative;
}

/* Navigation - Luxury Sticky */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: #fff; 
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    z-index: 1002; /* Above overlay */
    position: relative;
}

/* Desktop Nav */
.nav-links {
    display: flex;
    gap: 4rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 5px var(--color-accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
}

.bar {
    width: 30px;
    height: 2px;
    background-color: #fff;
    transition: 0.3s;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0a0a0a;
    z-index: 1001; /* Below logo/btn */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
}

.mobile-nav-overlay.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-nav-links a:hover {
    color: var(--color-accent);
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: #fff;
    text-decoration: none;
    display: none; /* Hidden by default, toggle btn handles close usually */
}

/* Responsive Nav Logic */
@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: flex; }
}

@media (min-width: 901px) {
    .mobile-menu-btn { display: none; }
    .mobile-nav-overlay { display: none; } /* Ensures hidden on resize */
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Gradient Overlay for better text readability on video */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.8) 0%,   /* Darker top for navbar visibility */
        rgba(10, 10, 10, 0.4) 30%,
        rgba(10, 10, 10, 0.6) 70%,
        rgba(10, 10, 10, 0.95) 100%
    );
    z-index: -1;
}

@keyframes slowZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

.hero-content {
  text-align: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.5s;
  /* Ensure content is strictly centered */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Buttons */
.btn-gold {
  display: inline-block;
  padding: 1rem 3rem;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  transition: all 0.4s ease;
  margin-top: 2rem;
  background: transparent;
  cursor: pointer;
}

.btn-gold:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

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

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(60px); /* Deeper start for more drama */
  transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1); /* Elegant easing */
  will-change: transform, opacity;
}

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

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  padding: 4rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.social-links a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--color-accent);
}

/* Forms */
.form-group {
  margin-bottom: 2rem;
  position: relative;
}

input,
textarea {
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}

label {
  position: absolute;
  top: 1rem;
  left: 0;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
  pointer-events: none;
}

input:focus ~ label,
input:valid ~ label,
textarea:focus ~ label,
textarea:valid ~ label {
  top: -0.5rem;
  font-size: 0.75rem;
  color: var(--color-accent);
}

/* Cards & Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--color-surface);
  padding: 2rem;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
}

.card-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-bottom: 1.5rem;
  filter: grayscale(20%);
  transition: filter 0.4s;
}

.card:hover .card-image {
  filter: grayscale(0%);
}

/* Utility: Gold Separator */
.separator-gold {
  width: 60px;
  height: 1px;
  background-color: var(--color-accent);
  margin: 2rem auto;
}

/* =========================================
   LUXURY ENHANCEMENTS (v2.0)
   ========================================= */

/* Gold Gradient Text */
.text-gold-gradient {
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Film Grain Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.05;
    background-image: 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");
}

/* Cinematic Marquee */
.marquee-section {
    padding: 4rem 0;
    background: var(--color-surface);
    overflow: hidden;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-family: var(--font-heading);
    font-size: 4rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.05); /* Subtle watermark look */
    -webkit-text-stroke: 1px rgba(212, 175, 55, 0.3); /* Gold stroke */
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: fadePulse 3s infinite;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Process / Artistry Section */
.process-section {
    padding: 0;
    overflow: hidden;
}

.process-row {
    display: flex;
    min-height: 80vh;
}

.process-image, .process-content {
    flex: 1;
}

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

.process-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s linear; /* For JS Parallax */
}

.process-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem;
    background-color: var(--color-bg);
}

.process-number {
    font-family: var(--font-heading);
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.03);
    line-height: 0.8;
    margin-bottom: -2rem;
    z-index: 0;
}

@media (max-width: 900px) {
    .process-row { flex-direction: column; }
    .process-content { padding: 3rem; }
    .process-image { height: 50vh; }
}

/* Refined Reveal */
.reveal-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-text.active span {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE OPTIMIZATIONS (300px - 2000px)
   ========================================= */

/* Large Screens (1600px+) */
@media (min-width: 1600px) {
    :root {
        --container-width: 1600px;
    }
    .display-1 { font-size: 7rem; }
    .display-2 { font-size: 5rem; }
}

/* Tablet / Small Laptop (max 1200px) */
@media (max-width: 1200px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .nav-links { gap: 2rem; }
    .display-1 { font-size: 4rem; } 
}

/* Tablet Portrait (max 900px) */
@media (max-width: 900px) {
    /* Navigation Stack */
    .nav-container {
        flex-direction: row; /* FIX: Keep them side-by-side */
        justify-content: space-between;
        align-items: center;
        gap: 0;
        width: 100%; /* Ensure full width */
    }
    
    .navbar { padding: 1rem 0; background-color: rgba(10,10,10,0.95); }
    
    /* Ensure logo is visible and sized correctly */
    .logo img {
        height: 35px; /* Slightly smaller for mobile */
    }

    /* Process Section Stacking */
    .process-row, 
    .process-row[style] { /* Override inline style */
        flex-direction: column !important; 
        height: auto;
        min-height: auto;
    }
    
    .process-image {
        height: 50vh;
        width: 100%;
    }
    
    .process-content {
        padding: 4rem 2rem;
        width: 100%;
    }
    
    .process-number { font-size: 6rem; }
    
    /* Marquee */
    .marquee-content { font-size: 2.5rem; }
}

/* Mobile (max 600px) */
@media (max-width: 600px) {
    :root {
        --gutter: 1.5rem;
    }

    .display-1 { font-size: 3rem; }
    .display-2 { font-size: 2.5rem; }
    
    /* Hero */
    .hero-content { width: 100%; padding: 0 1rem; }
    .subtitle { letter-spacing: 0.2em; font-size: 0.75rem; }
    
    /* Grid */
    .grid-3 {
        grid-template-columns: 1fr; /* Force single column */
    }
    
    .card-image { aspect-ratio: 16/9; } /* Shorter images on mobile */

    /* Adjust Process Image Height */
    .process-image { height: 40vh; }
    
    .marquee-content { font-size: 1.8rem; }
    
    /* CTA */
    .cta { padding: 100px 0 !important; }
}

/* Small Mobile (max 380px) */
@media (max-width: 380px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link { font-size: 0.7rem; letter-spacing: 0.1em; }
    
    .display-1 { font-size: 2.5rem; }
    
    .btn-gold {
        padding: 0.8rem 2rem;
        width: 100%;
        text-align: center;
    }
    
    .process-content { padding: 3rem 1.5rem; }
    .process-number { font-size: 4rem; margin-bottom: -1rem; }
}

/* =========================================
   ABOUT PAGE SPECIFIC RESPONSIVENESS
   ========================================= */

@media (max-width: 900px) {
    /* Override inline styles for the About Content Grid */
    .about-content .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .about-image {
        order: -1; 
        margin-bottom: 2rem;
    }
    
    .page-header {
        padding-top: 140px !important;
        padding-bottom: 40px !important;
    }
    
    /* Values Section */
    .values .grid-3 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* PORTFOLIO MOBILE FIX */
    /* Hide the intrusive center overlay on touch devices */
    .bento-item .overlay {
        display: none !important;
    }
    
    /* Instead, add a subtle corner indicator via pseudo-element */
    .bento-item::after {
        content: '+';
        position: absolute;
        bottom: 10px;
        right: 15px;
        color: #fff;
        font-family: var(--font-heading);
        font-size: 1.5rem;
        background: rgba(0,0,0,0.5);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255,255,255,0.2);
    }
}
