/* Metacarve Fabtech - Premium Signage & Fabrication Portfolio CSS Stylesheet */

/* --- Custom Variables & Theme System --- */
:root {
  --font-serif: 'Lora', Georgia, serif;
  
  /* Colors */
  --color-bg-dark: #070708;
  --color-bg-card: rgba(22, 22, 26, 0.45);
  --color-bg-card-hover: rgba(28, 28, 34, 0.7);
  --color-border-subtle: rgba(255, 255, 255, 0.04);
  --color-border-glow: rgba(197, 168, 128, 0.25);
  
  /* Brand Palette */
  --color-gold: #c5a880;
  --color-gold-hover: #b0936b;
  --color-green-brand: #1b5e3a; /* Matching logo green */
  --color-blue-brand: #0a4ba3;  /* Matching logo blue */
  --color-text-white: #ffffff;
  --color-text-gray: #a1a1aa;
  --color-text-muted: #71717a;
}

/* --- Global Elements & Resets --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
  font-family: var(--font-serif);
  background-color: var(--color-bg-dark);
  color: var(--color-text-white);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1e1e24;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* Selection Color */
::selection {
  background: rgba(197, 168, 128, 0.25);
  color: #ffffff;
}

/* --- Layout: Interactive Split Screen Landing Section --- */
.split-landing-container {
  display: flex;
  width: 100%;
  height: calc(100vh - 80px);
  min-height: 650px;
  overflow: hidden;
  position: relative;
  background-color: var(--color-bg-dark);
}

@media (max-width: 1023px) {
  .split-landing-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
}

.split-col {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: flex 0.75s cubic-bezier(0.25, 1, 0.5, 1), filter 0.75s ease;
  padding: 3rem 1.5rem;
  z-index: 10;
}

/* Visual divider line on large displays */
.split-col:first-child::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(197, 168, 128, 0.25) 30%, rgba(197, 168, 128, 0.25) 70%, transparent);
  z-index: 20;
}

@media (max-width: 1023px) {
  .split-col {
    width: 100%;
    min-height: 50vh;
  }
  .split-col:first-child::after {
    display: none;
  }
}

/* Background images with premium zoom effect */
.split-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  opacity: 0.25;
  filter: grayscale(100%) scale(1.02);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 10s linear;
}

/* Hover effects for Desktop split screen */
@media (min-width: 1024px) {
  /* When container is hovered, dim columns by default */
  .split-landing-container:hover .split-col {
    flex: 0.75;
    filter: brightness(0.4) grayscale(50%);
  }
  
  /* Highlight the specifically hovered column */
  .split-landing-container .split-col:hover {
    flex: 1.25;
    filter: brightness(1) grayscale(0%);
    z-index: 15;
  }

  .split-col:hover .split-bg-img {
    opacity: 0.45;
    filter: grayscale(0%) scale(1.05);
  }

  /* Reveal specific actions/text details on hover */
  .split-col .reveal-details {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease 0.1s, max-height 0.6s ease;
  }

  .split-col:hover .reveal-details {
    opacity: 1;
    max-height: 350px;
  }
}

/* Content overlays for columns */
.split-content {
  position: relative;
  z-index: 10;
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Gradients for background legibility */
.split-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(7, 7, 8, 0.4) 0%, rgba(7, 7, 8, 0.95) 100%);
  z-index: 2;
  transition: opacity 0.6s ease;
}

.split-col:hover .split-overlay-gradient {
  background: radial-gradient(circle at center, rgba(7, 7, 8, 0.1) 0%, rgba(7, 7, 8, 0.85) 100%);
}

/* --- Premium Animations & Scroll Reveals --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.active-reveal {
  opacity: 1;
  transform: translateY(0);
}

.delay-75 { transition-delay: 75ms; }
.delay-150 { transition-delay: 150ms; }
.delay-225 { transition-delay: 225ms; }
.delay-300 { transition-delay: 300ms; }
.delay-375 { transition-delay: 375ms; }
.delay-450 { transition-delay: 450ms; }

/* Custom slow expansion for decorative lines */
.line-expand {
  width: 0;
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.line-expand.active-reveal {
  width: 100%;
}

/* Mask Reveal for Text Headers */
.text-reveal-mask {
  overflow: hidden;
  display: inline-block;
}
.text-reveal-mask span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.text-reveal-mask.active-reveal span {
  transform: translateY(0);
}

/* --- Glassmorphism Components --- */
.glass-header {
  background: rgba(7, 7, 8, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.glass-header.scrolled {
  background: rgba(7, 7, 8, 0.95);
  border-bottom: 1px solid rgba(197, 168, 128, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.glass-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.4s ease;
}

.glass-card:hover {
  background-color: var(--color-bg-card-hover);
  border-color: var(--color-border-glow);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

/* --- Premium Elements & Visual Utilities --- */
.gold-gradient-text {
  background: linear-gradient(135deg, #ffffff 15%, var(--color-gold) 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scale-hover-img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.group:hover .scale-hover-img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Custom interactive buttons with gold border trace */
.btn-premium-outline {
  position: relative;
  border: 1px solid rgba(197, 168, 128, 0.3);
  background: transparent;
  color: var(--color-text-white);
  transition: color 0.4s, border-color 0.4s, background-color 0.4s;
  overflow: hidden;
  z-index: 10;
}
.btn-premium-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(197, 168, 128, 0.15), transparent);
  transition: left 0.6s ease;
  z-index: -1;
}
.btn-premium-outline:hover::before {
  left: 100%;
}
.btn-premium-outline:hover {
  border-color: var(--color-gold);
  background-color: rgba(197, 168, 128, 0.05);
  color: var(--color-gold);
}

.btn-premium-solid {
  background-color: var(--color-gold);
  color: var(--color-bg-dark);
  transition: background-color 0.4s, color 0.4s, transform 0.4s, box-shadow 0.4s;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(197, 168, 128, 0.2);
}
.btn-premium-solid:hover {
  background-color: var(--color-text-white);
  color: var(--color-bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

/* Navbar active indicator and line animations */
.active-nav-link {
  color: var(--color-gold) !important;
}
.active-nav-link::after {
  width: 100% !important;
}

/* Mobile drawer scroll lock */
body.nav-open {
  overflow: hidden;
}

/* --- Section Level Elements --- */
.section-gold-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
}

/* Form inputs styling */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text-white) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--color-bg-dark) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
