/* =========================================================
   Cognitive Alpha Partners INC - Custom Stylesheet
   Brand system: Navy #0F2B5B | Gold #C8A463 | Azure #2A86C9
   ========================================================= */

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(200, 164, 99, 0.32);
  color: #0F172A;
}

/* ---------------------------------------------------------
   Buttons - restrained, premium micro-interactions
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1;
  border-radius: 0.7rem;
  padding: 0.95rem 1.7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #C8A463; outline-offset: 2px; }

.btn-sm { padding: 0.68rem 1.25rem; font-size: 0.875rem; }

.btn-gold {
  background: linear-gradient(135deg, #D9BC85 0%, #C8A463 48%, #B2914F 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 26px -10px rgba(200, 164, 99, 0.55);
}
.btn-gold:hover { box-shadow: 0 16px 32px -12px rgba(200, 164, 99, 0.65); }

.btn-navy {
  background: #0F2B5B;
  color: #FFFFFF;
  box-shadow: 0 12px 28px -12px rgba(15, 43, 91, 0.5);
}
.btn-navy:hover { background: #123064; box-shadow: 0 18px 34px -14px rgba(15, 43, 91, 0.55); }

.btn-ghost-light {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.8); }

.btn-ghost-navy {
  border: 1.5px solid rgba(15, 43, 91, 0.25);
  color: #0F2B5B;
  background: transparent;
}
.btn-ghost-navy:hover { border-color: rgba(15, 43, 91, 0.55); background: rgba(15, 43, 91, 0.04); }

/* ---------------------------------------------------------
   Eyebrow label + section headings
   --------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C8A463;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(200, 164, 99, 0), #C8A463);
  border-radius: 2px;
}
.eyebrow-center::after {
  content: "";
  width: 2rem;
  height: 1.5px;
  background: linear-gradient(90deg, #C8A463, rgba(200, 164, 99, 0));
  border-radius: 2px;
}

/* ---------------------------------------------------------
   Fixed navbar - frosted glass
   --------------------------------------------------------- */
#siteNav {
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
#siteNav.nav-scrolled {
  background: rgba(255, 255, 255, 0.93);
  border-bottom-color: rgba(15, 23, 42, 0.05);
  box-shadow: 0 12px 34px -20px rgba(15, 23, 42, 0.28);
}

.nav-link {
  position: relative;
  padding: 0.35rem 0;
  color: #1E293B;
  font-weight: 500;
  opacity: 0.82;
  white-space: nowrap;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #C8A463, #D9BC85);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover { opacity: 1; color: #0F2B5B; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { opacity: 1; color: #AA8A4E; font-weight: 600; }
.nav-link.active::after { width: 100%; }

/* Thin vertical separator before the external "About the Founder" link,
   visually grouping the in-site nav from the off-site link. */
.nav-sep {
  width: 1px;
  height: 1.15rem;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.16);
}
.nav-link-external { padding-left: 0.85rem; }

/* Hamburger button - hidden by default, shown only below the xl breakpoint
   (ID specificity wins over Tailwind's .xl:hidden, so we drive visibility
   from this media query instead of a utility class). */
#menuToggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5.5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 0.6rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
@media (max-width: 1279.98px) {
  #menuToggle { display: inline-flex; }
}
#menuToggle:hover { background: #FFFFFF; border-color: rgba(15, 43, 91, 0.3); }
#menuToggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #0F2B5B;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------------------------------------------------------
   Mobile fullscreen menu overlay
   --------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(42, 134, 201, 0.18), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, rgba(200, 164, 99, 0.14), transparent 55%),
    linear-gradient(160deg, #0A1B3A 0%, #0F2B5B 55%, #123064 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s ease, visibility 0.38s ease;
  overflow-y: auto;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

.mobile-link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  color: #FFFFFF;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-link .mnum {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #C8A463;
}
body.menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.12s + var(--i) * 0.055s);
}
.mobile-link:active { color: #D9BC85; }

#menuClose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
#menuClose:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }

/* ---------------------------------------------------------
   Hero entrance animation
   --------------------------------------------------------- */
.hero-fx {
  opacity: 0;
  transform: translateY(26px);
  animation: heroIn 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-fx-1 { animation-delay: 0.05s; }
.hero-fx-2 { animation-delay: 0.2s; }
.hero-fx-3 { animation-delay: 0.35s; }
.hero-fx-4 { animation-delay: 0.5s; }
.hero-fx-5 { animation-delay: 0.65s; }

/* ---------------------------------------------------------
   Scroll reveal (opacity 0 / translateY 24px -> visible)
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease var(--d, 0ms),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------
   Seamless infinite text marquee
   Key rule: spacing comes from margin-right on EVERY item
   (including the last one of each group), so the two
   identical groups join with zero gap. Track translates
   exactly -50% => perfect loop, no blank seam.
   --------------------------------------------------------- */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll var(--marquee-speed, 46s) linear infinite;
  will-change: transform;
}
.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-right: 3.4rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.marquee-item .dot {
  margin-left: 3.4rem;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, #D9BC85, #C8A463);
  transform: rotate(45deg);
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------------------------------------------------------
   Cards & imagery
   --------------------------------------------------------- */
.card-lift {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -20px rgba(15, 43, 91, 0.3);
}

.img-frame {
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 26px 50px -20px rgba(15, 43, 91, 0.3);
}
.img-frame img { transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.img-frame:hover img { transform: scale(1.04); }

/* Icon chip - soft pastel tinted container for linear icons */
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  flex-shrink: 0;
}

/* Decorative grid pattern for dark sections */
.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */
.field {
  width: 100%;
  border-radius: 0.7rem;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: #0F172A;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field::placeholder { color: #94A3B8; }
.field:focus {
  outline: none;
  border-color: #2A86C9;
  box-shadow: 0 0 0 4px rgba(42, 134, 201, 0.12);
}
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.45rem;
}

/* ---------------------------------------------------------
   Misc
   --------------------------------------------------------- */
.footer-link {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.footer-link:hover { color: #D9BC85; }

.text-gradient-gold {
  background: linear-gradient(120deg, #E4CC96, #C8A463 55%, #AA8A4E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------
   Lightbox - click-to-zoom for certificate documents
   --------------------------------------------------------- */
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(7, 13, 28, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(60rem, 100%);
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.open .lightbox-figure { transform: scale(1); }
.lightbox-figure img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7);
}
.lightbox-caption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}
.lightbox-close {
  position: absolute;
  top: -1.1rem;
  right: -1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 43, 91, 0.9);
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.lightbox-close:hover { background: #C8A463; transform: rotate(90deg); }
@media (max-width: 640px) {
  .lightbox { padding: 0.9rem; }
  .lightbox-close { top: -0.7rem; right: -0.4rem; }
}

/* ---------------------------------------------------------
   Back-to-top floating button
   --------------------------------------------------------- */
.to-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #0F2B5B;
  color: #FFFFFF;
  border: 1px solid rgba(200, 164, 99, 0.45);
  box-shadow: 0 14px 30px -12px rgba(15, 43, 91, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
    background-color 0.25s ease, box-shadow 0.25s ease;
}
.to-top-btn svg { width: 1.25rem; height: 1.25rem; }
.to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top-btn:hover { background: #123064; box-shadow: 0 18px 36px -12px rgba(15, 43, 91, 0.65); }
.to-top-btn:focus-visible { outline: 2px solid #C8A463; outline-offset: 3px; }

/* ---------------------------------------------------------
   Toast - lightweight feedback (e.g. email copied)
   --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.15rem;
  border-radius: 0.7rem;
  background: rgba(15, 43, 91, 0.96);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(200, 164, 99, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------------------------------------------------------
   Reduced motion - accessibility
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-fx { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .card-lift, .img-frame img, .btn { transition: none; }
  .card-lift:hover, .btn:hover { transform: none; }
}
