/* ==========================================
   GLOBAL ARCHITECTURAL AESTHETICS
   ========================================== */
:root {
  --clr-bg: #121212;
  --clr-surface: #1A1A1A;
  --clr-surface-2: #242424;
  --clr-border: #3A3224;
  --clr-bg-rgb: 18 18 18;
  --clr-surface-rgb: 26 26 26;
  --clr-surface-2-rgb: 36 36 36;
  --clr-border-rgb: 58 50 36;

  --clr-text: #FFFFFF;
  --clr-text-dim: #D0D0D0;
  --clr-text-rgb: 255 255 255;
  --clr-text-dim-rgb: 208 208 208;

  --clr-accent: #D4AF37;
  --clr-accent-2: #F2C94C;
  --clr-accent-rgb: 212 175 55;
  --clr-accent-2-rgb: 242 201 76;

  --clr-accent-glow: rgba(212, 175, 55, 0.18);

  --ff-sans: 'Inter', sans-serif;
  --ff-heading: 'Outfit', sans-serif;
  --footer-text-light: #FFFFFF;
}



/* Light mode overrides for first :root block */
[data-theme="light"] {
  --clr-bg: #F8F8F5;
  --clr-surface: #FFFFFF;
  --clr-surface-2: #F2F2EE;
  --clr-border: #DDD6C8;
  --clr-bg-rgb: 248 248 245;
  --clr-surface-rgb: 255 255 255;
  --clr-surface-2-rgb: 242 242 238;
  --clr-border-rgb: 221 214 200;

  --clr-text: #222222;
  --clr-text-dim: #666666;
  --clr-text-rgb: 34 34 34;
  --clr-text-dim-rgb: 102 102 102;

  --clr-accent: #D4AF37;
  --clr-accent-2: #B8860B;
  --clr-accent-rgb: 212 175 55;
  --clr-accent-2-rgb: 184 134 11;

  --clr-accent-glow: rgba(212, 175, 55, 0.12);
}


/* Film Grain Overlay */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
}

/* Custom Magnetic Cursor */
#custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--clr-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #000;
  text-transform: uppercase;
  opacity: 0;
}

#custom-cursor.active {
  width: 80px;
  height: 80px;
  opacity: 1;
}

#custom-cursor.hidden {
  opacity: 0;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Palette — Premium Black & Gold Theme */
  --clr-bg: #121212;
  --clr-surface: #1A1A1A;
  --clr-surface-2: #242424;
  --clr-border: #3A3224;
  --clr-bg-rgb: 18 18 18;
  --clr-surface-rgb: 26 26 26;
  --clr-surface-2-rgb: 36 36 36;
  --clr-border-rgb: 58 50 36;
  --clr-text: #FFFFFF;
  --clr-text-dim: #D0D0D0;
  --clr-text-rgb: 255 255 255;
  --clr-text-dim-rgb: 208 208 208;
  --clr-accent: #D4AF37;
  --clr-accent-2: #F2C94C;
  --clr-accent-rgb: 212 175 55;
  --clr-accent-2-rgb: 242 201 76;
  --clr-accent-glow: rgba(212, 175, 55, 0.18);

  /* Typography */
  --ff-heading: 'Outfit', sans-serif;
  --ff-body: 'Inter', sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 8rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   LIGHT MODE — Premium Black & Gold Theme
   ============================================================ */
[data-theme="light"] {
  --clr-bg: #F8F8F5;
  --clr-surface: #FFFFFF;
  --clr-surface-2: #F2F2EE;
  --clr-border: #DDD6C8;
  --clr-bg-rgb: 248 248 245;
  --clr-surface-rgb: 255 255 255;
  --clr-surface-2-rgb: 242 242 238;
  --clr-border-rgb: 221 214 200;
  --clr-text: #222222;
  --clr-text-dim: #666666;
  --clr-text-rgb: 34 34 34;
  --clr-text-dim-rgb: 102 102 102;
  --clr-accent: #D4AF37;
  --clr-accent-2: #B8860B;
  --clr-accent-rgb: 212 175 55;
  --clr-accent-2-rgb: 184 134 11;
  --clr-accent-glow: rgba(212, 175, 55, 0.12);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: clip;
  overscroll-behavior: none;
  /* Prevent bounce jitter */
  cursor: default;
  /* Native cursor as fallback */
  padding-top:0;
  /* Account for fixed navbar */
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
    /* Reduced navbar height on mobile */
  }
}

::selection {
  background: var(--clr-accent);
  color: #121212;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-surface-2);
  border-radius: 10px;
  border: 2px solid var(--clr-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-accent);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-family: var(--ff-heading);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--clr-text);
}

.loader-logo span {
  color: var(--clr-accent);
}

.loader-tagline {
  font-family: var(--ff-heading);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--clr-text-dim);
  margin-top: 0.25rem;
}

.loader-bar-track {
  width: 200px;
  height: 3px;
  background: var(--clr-surface-2);
  border-radius: 4px;
  margin: 2rem auto 0;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: 4px;
}

.loader-percent {
  font-size: 0.8rem;
  color: var(--clr-text-dim);
  margin-top: 1rem;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  transition: background 0.3s;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #121212;
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 8px;
}

.brand-accent {
  color: var(--clr-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text);
  /* Improved visibility */
  transition: color 0.3s;
  position: relative;
  display: inline-block;
  opacity: 0;
  /* For falling effect */
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--clr-accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--clr-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta-btn {
  padding: 0.55rem 1.4rem !important;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #121212 !important;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: transform 0.3s, box-shadow 0.3s !important;
}

.nav-cta-btn::after {
  display: none !important;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--clr-accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2000;
  background: transparent;
}

#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  transition: width 0.1s linear;
}

/* ============================================================
   HERO SECTION — Scroll-Driven Animation (Layered)
   ============================================================ */
#hero-section {
  position: relative;
}

.hero-scroll-space {
  /* Tall scrollable area — animation maps to this height */
  height: 400vh;
  position: relative;
  /* This is the positioning context for the overlay */
}

/* ── Sticky layer: canvas + HUD pinned to viewport ── */
.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

#canvas3d {
  position: absolute;
  /* Stick to the parent instead of the screen */
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: auto;
}

/* Background overlay adjustments - light mode */
.hero-gradient-overlay {
  position: absolute;
  /* Stick to the parent instead of the screen */
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0.7) 100%);
  z-index: 2;
  pointer-events: none;
}

/* ── Scrolling content layer: flows OVER the sticky canvas ── */
.hero-overlay {
  position: relative;
  z-index: 3;
  pointer-events: none;
  /* Let scroll pass through empty areas */
}

.hero-overlay>* {
  pointer-events: none;
  /* Text and layout won't block 3D rotation */
}

/* Re-enable interaction ONLY for actual buttons and interactive links */
.hero-actions,
.btn-primary,
.btn-secondary,
.nav-link,
#btn-explore,
#btn-contact {
  pointer-events: auto;
}

/* ── Section blocks: each screen of scrolling content ── */
.section-block {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  position: relative;
}

.section-block--hero {
  justify-content: center;
  max-width: 100%;
}

.section-block--caption {
  padding: clamp(2rem, 6vw, 6rem);
}

.section-block--empty {
  /* Pure scroll space for the final animation frames */
}

/* ── Block content cards (captions that scroll over animation) ── */
.block-content {
  max-width: 440px;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  /* Adjusted for light mode glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  pointer-events: none;
  /* Let 3D rotation pass through cards */
}

.block-content>* {
  pointer-events: auto;
  /* Buttons inside cards still work */
}

.block-content--left {
  margin-right: auto;
  margin-left: 0;
  text-align: left;
}

.block-content--right {
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

.block-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.6rem;
}

.block-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 2px;
  background: var(--clr-accent);
  transform: translateY(-50%);
}

.block-content--right .block-label {
  padding-left: 0;
  padding-right: 1.6rem;
}

.block-content--right .block-label::before {
  left: auto;
  right: 0;
}

.block-title {
  font-family: var(--ff-heading);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.block-text {
  font-size: 0.95rem;
  color: var(--clr-text-dim);
  line-height: 1.7;
}

/* ── Hero content (inside first section-block) ── */
.hero-content {
  text-align: center;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3rem;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  background: var(--clr-accent-glow);
  border: 1px solid var(--clr-accent);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.hero-title {
  font-family: var(--ff-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 80px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

[data-theme="light"] .hero-title {
  color: #222222;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.8), 0 0 80px rgba(255, 255, 255, 0.4);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.8vw, 1.6rem);
  color: #e5e5e5;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .hero-subtitle {
  color: #666666;
  text-shadow: 0 4px 12px rgba(255, 255, 255, 0.9);
}


.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #121212;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--clr-accent-glow);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--clr-text);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Frame counter (hidden for Spline) */
.frame-counter {
  display: none;
}

#current-frame {
  color: var(--clr-accent);
  font-size: 1.1rem;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 1;
  transition: opacity 0.6s;
}

.scroll-indicator.hidden {
  opacity: 0;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 4px;
  animation: scroll-pulse 1.8s infinite;
}

@keyframes scroll-pulse {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* Build progress ring */
.build-progress {
  position: absolute;
  bottom: 2rem;
  left: clamp(1.5rem, 5vw, 4rem);
  width: 64px;
  height: 64px;
  z-index: 3;
}

.build-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.progress-ring {
  fill: none;
  stroke: var(--clr-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.15s linear;
}

.progress-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--ff-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--clr-accent);
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content-section {
  position: relative;
  padding: var(--section-pad) 0;
}

.section-dark {
  background: var(--clr-surface);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.8rem;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.2rem;
  height: 2px;
  background: var(--clr-accent);
  transform: translateY(-50%);
}

.section-title {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--clr-text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.4s var(--ease-out-expo), border-color 0.3s;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--clr-accent);
}

.stat-value {
  font-family: var(--ff-heading);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--clr-accent);
  display: inline;
}

.stat-suffix {
  font-family: var(--ff-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-accent-2);
  display: inline;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--clr-text-dim);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ============================================================
   CURVE SWIPE REVEAL
   ============================================================ */
.section--swipe-dark {
  position: relative;
  overflow: hidden;
  background-color: var(--clr-bg);
  transition: color 0.6s var(--ease-out-expo);
}

.swipe-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.swipe-reveal svg {
  width: 100%;
  height: 100%;
  display: block;
}

.swipe-path {
  fill: var(--clr-border);
}

.section--swipe-dark.is-swiped {
  color: var(--clr-text) !important;
}

.section--swipe-dark.is-swiped .section-subtitle,
.section--swipe-dark.is-swiped .stat-label {
  color: var(--clr-text-dim);
}

.section--swipe-dark.is-swiped .stat-card {
  background: var(--clr-surface);
  border-color: var(--clr-border);
}

.section--swipe-dark .container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SERVICES HORIZONTAL LAYOUT
   ============================================================ */
.services-horizontal-section {
  padding: var(--section-pad) 0;
  overflow: visible;
  display: block;
  height: auto;
}

/* GSAP ScrollTrigger pin-spacer background fix */
.pin-spacer {
  background: var(--clr-bg);
}

.section-header-container {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.services-track-container {
  display: block;
  width: 100%;
}

.services-track {
  display: block;
  width: 100%;
  height: auto;
}

.service-slide {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3rem clamp(2rem, 5vw, 6rem);
  gap: 2rem;
}

.service-slide-col-4,
.service-slide-col-8 {
  width: 100%;
  flex: 1 1 100%;
  padding-left: 0;
}

.service-slide-col-4 {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.service-slide-col-8 {
  padding-left: 0;
}

.service-icon {
  font-size: clamp(6rem, 12vw, 12rem);
  width: 100%; /* Take up the entire column width */
  height: clamp(550px, 85vh, 900px); /* Even taller massive height */
  max-width: 750px; /* Cap width on ultra-wides */
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--clr-bg); /* Restored Beige Color */
  border-radius: 40px; /* Restored rounded corners */
  box-shadow: inset 0 10px 20px rgba(0,0,0,0.05),
              0 15px 30px rgba(0,0,0,0.08); /* Restored shadows */
  position: relative;
  overflow: visible; /* KEPT VISIBLE so models can gracefully bleed out! */
}

/* Globally scale up the 3D canvas so the models fill the containers nicely on all devices */
/* (Removed in favor of native Three.js scaling) */

.service-title {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.service-desc {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--clr-text-dim);
  max-width: 600px;
  line-height: 1.6;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-container {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-cta {
  font-family: var(--ff-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact-text {
  font-size: 1rem;
  color: var(--clr-text-dim);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  transition: border-color 0.3s;
}

.contact-item:hover {
  border-color: var(--clr-accent);
}

.contact-item-icon {
  font-size: 1.4rem;
}

.contact-item-text {
  text-align: left;
}

.contact-item-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text-dim);
}

.contact-item-value {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
#main-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--clr-border);
  font-size: 0.8rem;
  color: var(--clr-text-dim);
}

#main-footer span {
  color: var(--footer-text-light);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--clr-text-dim);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--clr-accent);
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  will-change: transform, opacity;
  transition: none !important;
  /* Prevent conflicts with GSAP */
}



/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 991px) {

  /* Services Section Mobile Overrides */
  .services-horizontal-section {
    height: auto !important;
    overflow: visible !important;
    padding: 6rem 0 !important;
    display: block !important;
  }

  .services-track-container {
    height: auto !important;
    display: block !important;
  }

  .services-track {
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .service-slide {
    width: 100vw !important;
    height: auto !important;
    min-height: unset !important; /* Removed massive 100vh gap */
    padding: 3rem 1rem !important; /* Tighter padding */
    display: flex !important;
    border-bottom: 1px solid var(--clr-border);
  }

  .service-slide:last-child {
    border-bottom: none;
  }

  .service-slide-col-4,
  .service-slide-col-8 {
    width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    text-align: center;
  }

  .service-slide-col-4 {
    order: -1;
    margin-bottom: 2rem;
  }

  .service-icon {
    width: 90% !important;
    max-width: unset !important;
    aspect-ratio: 1 / 1 !important; /* Perfect square */
    height: auto !important;
    min-height: unset !important;
    font-size: 6rem !important;
    margin: 0 auto;
    background: var(--clr-bg) !important;
    border-radius: 48px !important;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.05), 0 15px 30px rgba(0,0,0,0.08) !important;
    overflow: visible !important;
  }

  /* Make the 3D canvas scale up visually to fill the space better */
  /* (Moved to global scope above) */

  .service-title {
    font-size: 2.2rem !important;
    margin-bottom: 1.2rem;
    line-height: 1.3 !important;
    font-weight: 900 !important;
    color: var(--clr-text);
  }

  .service-desc {
    margin: 0 auto;
    font-size: 1.15rem !important;
    line-height: 1.7 !important;
    max-width: 95% !important;
    color: var(--clr-text-muted, rgba(0,0,0,0.7));
  }
}

@media (max-width: 600px) {
  /* Ensure global body text is easily readable without eye strain on very small phones */
  body {
    font-size: 1.1rem !important;
  }
  
  p, .description {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--clr-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }

  .frame-counter {
    display: none;
  }

  .build-progress {
    width: 48px;
    height: 48px;
    bottom: 1.5rem;
    left: 1.5rem;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  #main-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-scroll-space {
    height: 400vh;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* Global Nav Swipe Reveal */
.nav-swipe {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.nav-swipe svg {
  width: 100%;
  height: 100%;
  display: block;
}

#nav-swipe-path {
  fill: var(--clr-accent);
}

/* ====================================
   CAROUSEL OVERLAY
=================================== */
.overlay-slider-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 2rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  overflow: hidden;
  border-radius: 12px;
}

.overlay-slider {
  position: relative;
  width: 100%;
  height: 100%;
  list-style: none;
}

.overlay-slider .item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: calc(50% - 150px);
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
  transition: left 0.75s, top 0.75s, width 0.75s, height 0.75s, border-radius 0.75s;
}

.overlay-slider .item:nth-child(1), 
.overlay-slider .item:nth-child(2) {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}

.overlay-slider .item:nth-child(3) { left: 50%; }
.overlay-slider .item:nth-child(4) { left: calc(50% + 220px); }
.overlay-slider .item:nth-child(5) { left: calc(50% + 440px); }
.overlay-slider .item:nth-child(6) { left: calc(50% + 660px); opacity: 0; }
.overlay-slider .item:nth-child(n+7) { left: calc(50% + 880px); opacity: 0; }

.overlay-slider .content {
  width: clamp(280px, 85vw, 900px);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  
  background: rgba(18, 18, 18, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-left: 4px solid var(--clr-accent);
  border-radius: 0 24px 24px 0;
  padding: clamp(1.2rem, 4vw, 3.5rem);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.6);
  
  font: 400 0.85rem helvetica,sans-serif;
  color: white;
  opacity: 0;
  display: none;
  text-align: left;
}

.overlay-slider .content .title {
  font-family: 'arial-black', sans-serif;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.overlay-slider .content .description {
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  font-size: 0.8rem;
}

.overlay-slider .content button {
  width: fit-content;
  background-color: rgba(0,0,0,0.1);
  color: white;
  border: 2px solid white;
  border-radius: 0.25rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.overlay-slider .content button:hover {
  background-color: rgba(255,255,255,0.2);
}

.overlay-slider .item:nth-of-type(2) .content {
  display: block;
  animation: showContent 0.75s ease-in-out 0.3s forwards;
}

@keyframes showContent {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-50%);
  }
}

.slider-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  padding-right: 2rem;
  pointer-events: none;
}

.slider-nav .btn {
  pointer-events: auto;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.slider-nav .btn.prev {
  transform: translateX(calc(-100% - 20px));
}
.slider-nav .btn.prev:hover {
  transform: translateX(calc(-100% - 20px)) translateY(-2px);
}

.slider-nav .btn:hover {
  background-color: var(--clr-accent);
  color: #121212;
  transform: translateY(-2px);
  border-color: var(--clr-accent);
}

@media (min-width: 651px) and (max-width: 900px) {
  .overlay-slider .content .title        { font-size: 1rem; }
  .overlay-slider .content .description  { font-size: 0.7rem; }
  .overlay-slider .content button        { font-size: 0.7rem; }
  
  .overlay-slider .item {
    width: 160px;
    height: 270px;
    top: calc(50% - 135px);
  }
  .overlay-slider .item:nth-child(3) { left: 50%; }
  .overlay-slider .item:nth-child(4) { left: calc(50% + 170px); }
  .overlay-slider .item:nth-child(5) { left: calc(50% + 340px); }
  .overlay-slider .item:nth-child(6) { left: calc(50% + 510px); opacity: 0; }
}

@media (max-width: 650px) {
  .overlay-slider-container {
    height: 480px;
  }
  .overlay-slider .content {
    width: 100%;
    top: 0;
    transform: translateY(0);
    padding: 1.5rem 1.25rem;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-bottom: 4px solid var(--clr-accent);
    background: rgba(18, 18, 18, 0.95);
  }
  .overlay-slider .content .title        { font-size: 1.1rem; }
  .overlay-slider .content .description  { font-size: 0.8rem; margin: 0.5rem 0 1rem; }
  .overlay-slider .content button        { font-size: 0.75rem; padding: 0.6rem 1rem; }
  
  .overlay-slider .item {
    width: 90px;
    height: 140px;
    border-radius: 8px;
    top: auto;
    bottom: 15px;
    transform: translateY(0);
  }
  
  /* Make sure first 2 items still fill the container */
  .overlay-slider .item:nth-child(1), 
  .overlay-slider .item:nth-child(2) {
    top: 0;
    height: 100%;
    width: 100%;
  }

  .overlay-slider .item:nth-child(3) { left: 15px; }
  .overlay-slider .item:nth-child(4) { left: 115px; }
  .overlay-slider .item:nth-child(5) { left: 215px; }
  .overlay-slider .item:nth-child(6) { left: 315px; opacity: 0; }
  
  .slider-nav {
    top: 50%;
    bottom: auto;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    padding: 0 1rem;
  }
}
