/* ============================================================
   NOIR SLATE MEDIA - Global Styles
   Design: Deep Space / Cinematic / Minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --black:        #000000;
  --white:        #ffffff;
  --purple:       #a855f7;
  --purple-dim:   #7c3aed;
  --purple-glow:  rgba(168, 85, 247, 0.35);
  --purple-subtle: rgba(168, 85, 247, 0.08);
  --surface:      rgba(255, 255, 255, 0.04);
  --border:       rgba(255, 255, 255, 0.08);
  --border-purple: rgba(168, 85, 247, 0.3);
  --text-muted:   rgba(255, 255, 255, 0.45);
  --text-secondary: rgba(255, 255, 255, 0.7);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --ease-circ: cubic-bezier(0.23, 1, 0.32, 1);

  --nav-h: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --content-max: 1200px;
  --radius-sm:  8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img { display: block; max-width: 100%; }

button, [role="button"] { cursor: pointer; border: none; background: none; }

/* ── Canvas Starfield ─────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Loader ───────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  word-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

.loader-logo span {
  color: var(--purple);
  text-shadow: 0 0 20px var(--purple-glow);
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-dim), var(--purple));
  border-radius: 99px;
  animation: loadBar 1.6s var(--ease-circ) forwards;
}

@keyframes loadBar {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── Navbar ───────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 60px);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 2px;
  word-spacing: 0.1em;
}

.nav-logo .accent { color: var(--purple); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple-glow);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-sm);
  color: var(--purple);
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.nav-cta:hover {
  background: var(--purple-subtle);
  box-shadow: 0 0 20px var(--purple-glow);
  color: var(--white);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 32px clamp(24px, 5vw, 60px) 40px;
  z-index: 999;
  flex-direction: column;
  gap: 24px;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nav-mobile a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-mobile a:hover { color: var(--white); }

/* ── Section Scaffold ─────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) clamp(24px, 5vw, 60px);
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

/* ── Typography Utilities ─────────────────────────────────── */
.label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
}

.heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-md {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.body-lg {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-purple { color: var(--purple); }
.text-muted  { color: var(--text-muted); }

/* ── Glow Divider ─────────────────────────────────────────── */
.glow-line {
  width: 60px;
  height: 1px;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple-glow);
  margin-bottom: 20px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 0 0 rgba(168, 85, 247, 0);
}

.btn-primary:hover {
  box-shadow: 0 0 32px var(--purple-glow), 0 0 60px rgba(168, 85, 247, 0.15);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-purple);
  color: var(--purple);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

/* Arrow icon */
.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease-out);
}

.btn:hover .btn-arrow { transform: translateX(4px); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, var(--purple-subtle) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-purple);
  box-shadow: 0 8px 40px rgba(168, 85, 247, 0.12);
  transform: translateY(-4px);
}

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

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  padding: 48px clamp(24px, 5vw, 60px);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  word-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo .accent { color: var(--purple); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.78rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* ── Noise texture overlay ────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.4;
}

/* ── Logo Image ───────────────────────────────────────────── */
.nav-logo img {
  height: 34px;
  width: auto;
}

.footer-logo img {
  height: 26px;
  width: auto;
}

.loader-logo-img {
  height: 72px;
  width: auto;
  display: block;
  margin-bottom: 8px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
