/* ===================================================================
   AXIOM STUDIOS — GLOBAL STYLES v2
   Dark design system · Glass morphism · Animated accents
   =================================================================== */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Backgrounds */
  --bg:         #04060f;
  --bg-2:       #080c1a;
  --bg-3:       #0c1225;
  --bg-card:    rgba(255, 255, 255, 0.035);
  --bg-card-2:  rgba(255, 255, 255, 0.06);

  /* Borders */
  --border:     rgba(255, 255, 255, 0.07);
  --border-2:   rgba(255, 255, 255, 0.12);
  --border-3:   rgba(255, 255, 255, 0.18);

  /* Accent Colors */
  --cyan:       #00d4ff;
  --cyan-dim:   rgba(0, 212, 255, 0.15);
  --violet:     #7c3aed;
  --violet-dim: rgba(124, 58, 237, 0.15);
  --green:      #22c55e;
  --blue:       #3b82f6;

  /* Text */
  --text:       rgba(230, 240, 255, 0.94);
  --muted:      rgba(230, 240, 255, 0.58);
  --faint:      rgba(230, 240, 255, 0.32);

  /* Nav */
  --nav-h: 76px;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-card: 0 0 0 1px var(--border), 0 24px 64px rgba(0,0,0,0.55);
  --glow-cyan:   0 0 40px rgba(0,212,255,0.25);
  --glow-violet: 0 0 40px rgba(124,58,237,0.25);

  /* Font */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain texture over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* ===== GLOBAL ANIMATIONS ===== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(25px, -18px) scale(1.04); }
  66%       { transform: translate(-18px, 12px) scale(0.97); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

/* ===== SCROLL REVEAL ===== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== TEXT HIGHLIGHT (animated gradient) ===== */

.text-highlight {
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--cyan));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 5s ease infinite;
}

/* ===== PAGE MAIN ===== */

.page-main {
  min-height: calc(100vh - var(--nav-h));
}

/* ===== BUTTONS ===== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.9rem;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 4px 24px rgba(0,212,255,0.22), 0 1px 0 rgba(255,255,255,0.12) inset;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,212,255,0.35), 0 1px 0 rgba(255,255,255,0.15) inset;
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.9rem;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(0,212,255,0.4);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.btn-secondary-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.9rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-3);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-secondary-dark:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(0,212,255,0.5);
}

/* ===== NAVBAR ===== */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 1.5rem;
}

.nav-bar {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0.6rem 0.5rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(8, 10, 24, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-logo-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Nav menu — position: relative is required for the pill */
.nav-menu {
  grid-column: 2;
  display: flex;
  align-items: center;
  position: relative;
  padding: 3px;
  gap: 0;
  justify-self: center;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0 0.2rem 0 0.45rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.theme-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.5);
  outline-offset: 2px;
}

.theme-toggle-glyph {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  transform: translateY(-0.5px);
}

html[data-theme="light"] .theme-toggle {
  color: rgba(196, 138, 4, 0.86);
}

/* ── Magic sliding pill ── */
.nav-pill {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 34px;
  width: 80px;              /* overridden by JS */
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;               /* shown by JS once active link is found */
  transition:
    left  0.3s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s ease;
}

.nav-link {
  position: relative;
  z-index: 1;               /* above the pill */
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-btn-login {
  position: relative;
  z-index: 1;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
  white-space: nowrap;
  margin-left: 0.3rem;
}

.nav-btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.35);
}

.nav-btn-login-desktop {
  grid-column: 3;
  justify-self: end;
  margin-left: 0;
}

/* Mobile toggle */
.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 32px;
  height: 22px;
  padding: 0;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-bar {
    display: flex;
    justify-content: space-between;
  }

  .nav-toggle { display: flex; }
  .nav-pill   { display: none; }   /* no pill on stacked mobile menu */

  .theme-toggle {
    width: 30px;
    height: 22px;
    margin-left: 0.15rem;
    align-self: flex-start;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.75rem;
    background: rgba(8, 10, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--r-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.open { display: flex; }

  .nav-link {
    padding: 0.65rem 1rem;
    border-radius: var(--r-sm);
  }

  /* Active indicator on mobile — left-accent instead of pill */
  .nav-link.is-active {
    background: #f1f5f9;
    color: #0f172a;
  }

  .nav-btn-login {
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: var(--r-sm);
    margin-left: 0;
  }

  .nav-btn-login-desktop {
    display: none;
  }
}

/* ===== FOOTER ===== */

.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 4.5rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Subtle footer orb */
.site-footer::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.04), transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.footer-brand-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand-logo span {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 270px;
  margin: 0;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--green);
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  width: fit-content;
}

.footer-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin: 0 0 1.1rem 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--faint);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--muted);
}

/* Footer responsive */
@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
