/* ==========================================================================
   A.N CAPITAL — LUXURY FINANCIAL DIGITAL PRESENCE
   Shared Design Tokens, Utilities & Core Stylesheet
   ========================================================================== */

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

:root {
  --color-primary: #d4af37;
  --color-primary-light: #f2ca50;
  --color-primary-fixed: #ffe088;
  --color-background: #111111;
  --color-surface-dim: #131313;
  --color-surface: #1a1a1a;
  --color-surface-high: #242424;
  --color-surface-highest: #303030;
  --color-on-surface: #e5e2e1;
  --color-on-surface-variant: #b5ada0;
  --color-border: rgba(212, 175, 55, 0.2);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-background);
  color: var(--color-on-surface);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Universal responsive media & canvas safeguards */
img, svg, video {
  max-width: 100%;
  height: auto;
}

canvas {
  display: block;
  max-width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .font-display {
  font-family: 'Libre Caslon Text', serif;
}

/* Custom Selection */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #ffe088;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #111111;
}
::-webkit-scrollbar-thumb {
  background: #353534;
  border-radius: 4px;
  border: 2px solid #111111;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}

/* ==========================================================================
   Luxury Gradients & Visual Effects
   ========================================================================== */

.gold-text-gradient {
  background: linear-gradient(135deg, #fcebc0 0%, #d4af37 50%, #997818 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.btn-primary-metallic {
  background: linear-gradient(135deg, #d4af37 0%, #f2ca50 50%, #d4af37 100%);
  background-size: 200% auto;
  color: #111111 !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  padding: 0.9rem 1.5rem;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.btn-primary-metallic:hover {
  background-position: right center;
  box-shadow: 0 0 28px rgba(212, 175, 55, 0.45);
  transform: translateY(-2px);
}

.btn-secondary-glass {
  background: rgba(32, 31, 31, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #e5e2e1 !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  padding: 0.9rem 1.5rem;
  gap: 0.5rem;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.btn-secondary-glass:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.12);
  color: #f2ca50 !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.glass-panel {
  background: rgba(26, 26, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.18);
}

.gold-glow {
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.18);
}

.gold-glow-focus:focus-within {
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.32);
  border-color: #d4af37 !important;
}

.bg-architectural {
  background-image: 
    linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Top-Class Interactive Cards with Mouse Spotlight & Luxury Elevation */
.service-card {
  position: relative;
  transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: #161616;
  background-image: radial-gradient(650px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212, 175, 55, 0.12), transparent 45%);
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, transparent 40%, transparent 60%, rgba(242, 202, 80, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.88), 0 0 35px rgba(212, 175, 55, 0.26);
}

.service-card:hover::after {
  opacity: 1;
}

/* Timeline Icons & Glowing Ambient Radiance */
.timeline-icon-glow {
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.45);
  animation: icon-radiance-pulse 3.5s infinite ease-in-out;
}

@keyframes icon-radiance-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 36px rgba(212, 175, 55, 0.75); }
}

/* ==========================================================================
   Navigation & Mobile Drawer
   ========================================================================== */

.nav-link {
  color: #b5ada0;
  font-weight: 600;
  font-size: 0.825rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: #f2ca50;
  background: rgba(212, 175, 55, 0.1);
}

.nav-link.active {
  border-bottom: 2px solid #d4af37;
}

/* Mobile Drawer Backdrop */
#mobile-drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-drawer.open {
  transform: translateX(0);
}

/* ==========================================================================
   Modals & Toast Notifications
   ========================================================================== */

.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#toast-notification {
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#toast-notification.show {
  transform: translateY(0);
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Accordion Marker Hidden */
details > summary {
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* ==========================================================================
 * STITCH MCP PREMIUM SCROLL & 3D ANIMATION STYLES (PROCESS PAGE)
 * ========================================================================== */
#threejs-process-scroll-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.timeline-step-card {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(22, 22, 22, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.timeline-step-card.active-step-card {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(212, 175, 55, 0.85);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.28);
  background: rgba(28, 28, 28, 0.92);
}

.timeline-step-card.active-step-card .step-number-badge {
  background: linear-gradient(135deg, #f2ca50 0%, #d4af37 100%);
  color: #111111;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.timeline-icon-glow {
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.55);
}

/* ==========================================================================
 * TOP-CLASS SCROLL REVEAL & NATIVE VIEW-TIMELINE ARCHITECTURE
 * ========================================================================== */
.clean-hidden {
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.clean-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes modern-card-reveal {
      0% {
        opacity: 0;
        transform: translateY(45px) scale(0.94);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .clean-hidden {
      animation: modern-card-reveal auto cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-timeline: view(block);
      animation-range: entry 3% cover 25%;
      transition: none;
    }
  }
}

/* Ambient Metallic Button Breathing Glow */
@keyframes gold-ambient-pulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.22);
  }
  50% {
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.52);
  }
}

.btn-primary-metallic {
  animation: gold-ambient-pulse 4s infinite ease-in-out;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 76px;
  }
}
