/* ============================================
   Tandem CRS — Custom Styles
   Bold Editorial | Midnight Blue + Mint
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(64, 224, 208, 0.3);
  color: #f0f4f8;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #2d3a5c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #40E0D0;
}

/* --- Navigation --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #40E0D0;
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: #40E0D0 !important;
}

/* --- Header Scroll State --- */
#site-header.scrolled {
  background: rgba(4, 9, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(45, 58, 92, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#site-header.scrolled .nav-link {
  color: #b8cce0;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

#mobile-menu.open #menu-icon span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

#mobile-menu.open #menu-icon span:nth-child(2) {
  opacity: 0;
}

#mobile-menu.open #menu-icon span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.mobile-nav-link {
  position: relative;
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: #40E0D0;
  transition: width 0.3s ease;
}

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

/* --- Section Labels --- */
.section-label {
  display: inline-block;
}

/* --- Service Cards --- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #40E0D0, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

/* --- CTA Buttons --- */
.cta-primary {
  position: relative;
  overflow: hidden;
}

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

.cta-primary:hover::before {
  left: 100%;
}

/* --- Scroll Reveal Animations --- */
.reveal-section {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-section {
    opacity: 0;
    transform: translateY(30px);
  }

  .reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-section:nth-child(2) { transition-delay: 0.1s; }
  .reveal-section:nth-child(3) { transition-delay: 0.2s; }
  .reveal-section:nth-child(4) { transition-delay: 0.3s; }
  .reveal-section:nth-child(5) { transition-delay: 0.4s; }
  .reveal-section:nth-child(6) { transition-delay: 0.5s; }

  /* Hero animations */
  .hero-eyebrow {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
  }
  .hero-headline {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
  }
  .hero-subhead {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
  }
  .hero-ctas {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
  }
  .hero-scroll {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 1s;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Vertical Text --- */
.writing-mode-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* --- Form Styles --- */
select option {
  background: #0A1628;
  color: #f0f4f8;
}

/* --- Testimonial Cards --- */
.reveal-section:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease;
}

/* --- Responsive Typography --- */
@media (max-width: 640px) {
  .font-serif {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .font-serif {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
}

@media (min-width: 1025px) {
  .font-serif {
    font-size: clamp(3rem, 5vw, 5rem);
  }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #40E0D0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Print Styles --- */
@media print {
  #site-header,
  #mobile-menu,
  .cta-primary,
  .cta-secondary {
    display: none;
  }

  body {
    background: white;
    color: #1a1a1a;
  }

  .font-serif, .font-sans {
    color: #1a1a1a;
  }
}
