/* ==========================================================================
   Don Gibbin Jr. Portfolio - High-End Luxury & Animation Stylesheet
   Typography, Colors, Custom Utilities, 3D Tilt, Marquee & Micro-Interactions
   ========================================================================== */

:root {
  --color-terracotta: #A7472E;
  --color-terracotta-hover: #8E3B24;
  --color-terracotta-light: #C05A3E;
  --color-terracotta-glow: rgba(167, 71, 46, 0.45);
  --color-dark-bg: #111111;
  --color-dark-surface: #171717;
  --color-dark-card: #1C1C1C;
  --color-cream-bg: #FAF8F5;
  --color-cream-surface: #F3EFEA;
  --color-cream-card: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-terracotta);
}

/* Selection Color */
::selection {
  background-color: var(--color-terracotta);
  color: #ffffff;
}

/* Scroll Progress Bar at Top */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-terracotta), #E68A4A, var(--color-terracotta));
  z-index: 100;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(167, 71, 46, 0.8);
}

/* Custom Cursor (Desktop) */
@media (min-width: 1024px) {
  .custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--color-terracotta);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
  }

  .custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(167, 71, 46, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
  }

  .cursor-hover .custom-cursor-dot {
    transform: translate(-50%, -50%) scale(2);
    background-color: #ffffff;
  }

  .cursor-hover .custom-cursor-ring {
    width: 54px;
    height: 54px;
    border-color: rgba(255, 255, 255, 0.8);
    background-color: rgba(167, 71, 46, 0.15);
  }
}

/* Font Families */
.font-serif-display {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-serif-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-sans-body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.font-handwriting {
  font-family: 'Caveat', cursive, serif;
}

/* Glassmorphism Navigation */
.nav-glass {
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-glass.scrolled {
  background: rgba(14, 14, 14, 0.95);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: width 0.3s ease;
}

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

/* Atmospheric Overlays for Hero & Page Banners */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #111111 0%, rgba(17, 17, 17, 0.85) 50%, rgba(17, 17, 17, 0.4) 100%),
              linear-gradient(0deg, #111111 0%, transparent 60%);
  pointer-events: none;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #111111 0%, rgba(17, 17, 17, 0.88) 55%, rgba(17, 17, 17, 0.5) 100%),
              linear-gradient(0deg, #111111 0%, transparent 50%, rgba(17, 17, 17, 0.6) 100%);
  pointer-events: none;
}

/* Ambient Stage Glow */
.ambient-stage-glow {
  position: absolute;
  top: 15%;
  right: 12%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(230, 138, 74, 0.15) 0%, rgba(167, 71, 46, 0.05) 50%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  animation: pulseGlow 9s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.5; }
  100% { transform: scale(1.2) translate(30px, -25px); opacity: 0.95; }
}

/* Buttons */
.btn-terracotta {
  background-color: var(--color-terracotta);
  color: #ffffff;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(167, 71, 46, 0.35);
}

.btn-terracotta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.7s ease;
}

.btn-terracotta:hover::before {
  left: 100%;
}

.btn-terracotta:hover {
  background-color: var(--color-terracotta-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px -4px rgba(167, 71, 46, 0.55);
}

.btn-terracotta:active {
  transform: translateY(-1px) scale(1);
}

.btn-frosted {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f5f5f5;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-frosted:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Animated Scroll Down Line */
.scroll-indicator-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--color-terracotta), transparent);
  animation: scrollDown 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  50.1% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Card Hover Zoom & 3D Lighting */
.card-hover-zoom {
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.card-hover-zoom img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.card-hover-zoom:hover img {
  transform: scale(1.08);
}

.card-hover-zoom:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 71, 46, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px -5px rgba(167, 71, 46, 0.2);
}

/* Light Card Shadows */
.light-card-shadow {
  box-shadow: 0 6px 24px -2px rgba(0, 0, 0, 0.06), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.light-card-shadow:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px -10px rgba(0, 0, 0, 0.15), 0 6px 14px -2px rgba(0, 0, 0, 0.06);
}

/* Approach Section */
.approach-timeline-track {
  position: absolute;
  top: 24px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, rgba(167, 71, 46, 0.2) 0%, rgba(167, 71, 46, 0.8) 50%, rgba(167, 71, 46, 0.2) 100%);
  z-index: 0;
}

.approach-card-v2 {
  background: rgba(22, 22, 22, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 28px 22px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.approach-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-terracotta), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.approach-card-v2:hover {
  transform: translateY(-8px);
  border-color: rgba(167, 71, 46, 0.5);
  box-shadow: 0 22px 45px -15px rgba(0, 0, 0, 0.85), 0 0 30px -8px rgba(167, 71, 46, 0.3);
  background: rgba(28, 28, 28, 0.9);
}

.approach-card-v2:hover::before {
  opacity: 1;
}

.step-beacon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #191919;
  border: 2px solid rgba(167, 71, 46, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.approach-card-v2:hover .step-beacon {
  background: var(--color-terracotta);
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 22px rgba(167, 71, 46, 0.8);
}

.approach-vignette {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.approach-vignette img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.approach-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.approach-card-v2:hover .approach-vignette {
  border-color: var(--color-terracotta);
  transform: scale(1.08);
  box-shadow: 0 16px 36px rgba(167, 71, 46, 0.45);
}

.approach-card-v2:hover .approach-vignette img {
  transform: scale(1.12);
}

.approach-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a3a3a3;
  transition: all 0.25s ease;
}

.approach-card-v2:hover .approach-chip {
  background: rgba(167, 71, 46, 0.15);
  border-color: rgba(167, 71, 46, 0.35);
  color: #f5f5f5;
}

/* Portfolio Filter Tabs */
.portfolio-filter-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-filter-btn.active {
  background-color: var(--color-terracotta);
  color: #ffffff;
  border-color: var(--color-terracotta);
  box-shadow: 0 4px 15px rgba(167, 71, 46, 0.4);
  transform: translateY(-1px);
}

/* Lightbox Modal & Thumbnail Strip */
.lightbox-thumb {
  transition: all 0.25s ease;
  opacity: 0.5;
  border: 2px solid transparent;
}

.lightbox-thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 14px rgba(167, 71, 46, 0.7);
  transform: translateY(-2px) scale(1.05);
}

/* Infinite Marquee Ticker */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

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

/* Floating Back to Top Button */
#back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

#back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top-btn:hover {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 28px rgba(167, 71, 46, 0.5);
}

/* Chalkboard panel 3D hover */
.chalkboard-panel {
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 20px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.chalkboard-panel:hover {
  transform: translateY(-4px) rotate(0deg) scale(1.01);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 28px 50px rgba(0,0,0,0.75);
}
