/* ═══════════════════════════════════════════
   Crestline LLC — Custom Stylesheet
   Complements Tailwind utility classes
   ═══════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
  --navy: #1E3A5F;
  --navy-dark: #152C4A;
  --navy-deeper: #0F2035;
  --accent: #B8960C;
  --accent-light: #D4AF37;
  --warm-white: #FAFBFC;
  --light-gray: #F7F8FA;
  --text-primary: #2D2D2D;
  --text-secondary: rgba(45, 45, 45, 0.65);
  --border-light: rgba(30, 58, 95, 0.08);
  --teal: #1A7A6D;
  --teal-bg: rgba(26, 122, 109, 0.06);
}

/* ─── Base ─── */
html { scroll-behavior: smooth; }

::selection {
  background: rgba(30, 58, 95, 0.12);
  color: var(--navy-dark);
}

/* ─── Grain Texture Overlay ─── */
.grain-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.02;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── Navigation ─── */
.nav-scrolled {
  box-shadow: 0 1px 12px rgba(30, 58, 95, 0.06);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--navy);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ─── Mobile Menu ─── */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Accent Line ─── */
.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--accent));
  border-radius: 2px;
}

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

.animate-fade-in {
  animation: fadeInUp 0.7s ease-out forwards;
}
.delay-1 { animation-delay: 0.08s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.35s; opacity: 0; }
.delay-4 { animation-delay: 0.5s; opacity: 0; }
.delay-5 { animation-delay: 0.65s; opacity: 0; }

/* Scroll-triggered fade — starts hidden, revealed by JS */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Buttons ─── */
.btn-primary-cta {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-primary-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.btn-primary-cta:hover::before {
  left: 100%;
}
.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(30, 58, 95, 0.22);
}

.btn-outline-cta {
  transition: all 0.3s ease;
}
.btn-outline-cta:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(30, 58, 95, 0.03);
}

/* ─── Cards ─── */
.value-card {
  transition: all 0.35s ease;
}
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(30, 58, 95, 0.07);
}

.category-card {
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.category-card:hover::after {
  transform: scaleX(1);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30, 58, 95, 0.06);
  border-color: rgba(30, 58, 95, 0.12);
}

/* ─── Founder Photo ─── */
.founder-photo-frame {
  position: relative;
}
.founder-photo-frame::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px;
  width: 100%; height: 100%;
  border: 2px solid var(--accent);
  border-radius: 12px;
  opacity: 0.3;
  z-index: 0;
}
.founder-photo-frame img,
.founder-photo-frame .placeholder {
  position: relative;
  z-index: 1;
}

/* ─── Credential Chips ─── */
.credential-chip {
  transition: all 0.25s ease;
}
.credential-chip:hover {
  background: rgba(30, 58, 95, 0.06);
  border-color: rgba(30, 58, 95, 0.15);
}

/* ─── Form Inputs ─── */
.form-input {
  transition: all 0.25s ease;
  outline: none;
}
.form-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

/* ─── Trust Bar ─── */
.trust-item {
  position: relative;
}
.trust-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.12);
}

@media (max-width: 768px) {
  .trust-item:not(:last-child)::after {
    display: none;
  }
}

/* ─── Pillar Numbers ─── */
.pillar-num {
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 1px rgba(30, 58, 95, 0.08);
  color: transparent;
}

/* ─── Category Badges ─── */
.badge-active {
  background: rgba(26, 122, 109, 0.08);
  color: var(--teal);
}
.badge-expanding {
  background: rgba(184, 150, 12, 0.08);
  color: var(--accent);
}

/* ─── Honeypot ─── */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* ─── Footer Pattern ─── */
.footer-pattern {
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ─── Responsive Fixes ─── */
@media (max-width: 640px) {
  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
