/* ==========================================================================
   Cortexeon Systems — brand layer
   Custom properties, gradients, surfaces, and overrides that sit on top of
   Tailwind utilities. Loaded after the Tailwind CDN build.
   ========================================================================== */

:root {
  --c-ink:     #05070d;
  --c-surface: #0b101b;
  --c-cortex:  #7c8cff;
  --c-pulse:   #22d3ee;
  --c-line:    rgba(148, 163, 184, 0.14);
  --grad-brand: linear-gradient(120deg, var(--c-cortex) 0%, var(--c-pulse) 100%);
}

/* ---- Base ------------------------------------------------------------- */

html {
  color-scheme: dark;
}

body {
  background-color: var(--c-ink);
  font-feature-settings: "cv02", "cv03", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Consistent, visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--c-pulse);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--c-cortex);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---- Typography helpers ------------------------------------------------ */

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* ---- Navigation -------------------------------------------------------- */

#site-header {
  background: transparent;
  border-bottom: 1px solid transparent;
}

/* Applied by js/main.js once the page is scrolled */
#site-header.is-scrolled {
  background: rgba(5, 7, 13, 0.82);
  border-bottom-color: var(--c-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #f8fafc;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.mobile-link {
  display: block;
  padding: 0.7rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.mobile-link:hover,
.mobile-link:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ---- Buttons ------------------------------------------------------------ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.55rem;
  background: var(--grad-brand);
  color: #04060b;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 1px rgba(124, 140, 255, 0.25),
              0 8px 24px -8px rgba(34, 211, 238, 0.35);
  transition: box-shadow 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(124, 140, 255, 0.4),
              0 14px 32px -10px rgba(34, 211, 238, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.55rem;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.02);
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.btn-ghost:hover {
  border-color: rgba(124, 140, 255, 0.5);
  background: rgba(124, 140, 255, 0.06);
}

/* ---- Hero --------------------------------------------------------------- */

.hero-bg {
  background:
    radial-gradient(52rem 30rem at 18% -8%, rgba(124, 140, 255, 0.13), transparent 60%),
    radial-gradient(46rem 28rem at 88% 12%, rgba(34, 211, 238, 0.09), transparent 60%),
    var(--c-ink);
}

/* Faint engineering grid behind the hero */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 35%, transparent 78%);
  pointer-events: none;
}

/* ---- Glass surfaces ------------------------------------------------------ */

.glass-panel {
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.03));
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
}

.panel-glow {
  position: absolute;
  inset: -12%;
  background: radial-gradient(40% 45% at 50% 45%, rgba(124, 140, 255, 0.18), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

.live-dot {
  animation: live-pulse 2.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.75); }
}

/* ---- Trust strip ---------------------------------------------------------- */

.partner-logo {
  height: 1.75rem;
  width: auto;
  color: #64748b;
  opacity: 0.75;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.partner-logo:hover {
  color: #cbd5e1;
  opacity: 1;
}
.logo-text {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  fill: currentColor;
}

/* ---- Feature cards --------------------------------------------------------- */

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--c-line);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.6), rgba(11, 16, 27, 0.4));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(124, 140, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -20px rgba(124, 140, 255, 0.25);
}

/* Top accent line that fades in on hover */
.feature-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 1.5px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(124, 140, 255, 0.3);
  background: rgba(124, 140, 255, 0.08);
  color: var(--c-pulse);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-cortex);
  transition: color 0.2s ease;
}
.card-link:hover {
  color: var(--c-pulse);
}

/* ---- CTA panel --------------------------------------------------------------- */

.cta-panel {
  border: 1px solid var(--c-line);
  background:
    radial-gradient(48rem 22rem at 50% 120%, rgba(124, 140, 255, 0.16), transparent 65%),
    radial-gradient(30rem 16rem at 85% -20%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--c-surface);
}

/* ---- Footer ---------------------------------------------------------------------- */

.footer-link {
  color: #94a3b8;
  transition: color 0.2s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: #f8fafc;
}

/* ---- Motion safety ------------------------------------------------------------------ */
/* GSAP checks this too (js/main.js), but keep CSS animation quiet as well. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
