/* ════════════════════════════════════════════
   GLOBAL.CSS  —  Shared across all pages

   Breakpoints:
     Desktop  > 1100px   --h-pad: 200px
     Tablet   769–1100px  --h-pad: 48px
     Mobile   ≤ 768px    --h-pad: 24px
     Small    ≤ 480px    further compression
   ════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────── */
:root {
  --bg:     #000005;
  --fg:     #f8f8f8;
  --accent: #4C75FF;
  --muted:  #828282;
  --subtle: #525252;
  --mid:    #bdbdbd;
  --border: rgba(76,117,255,0.12);

  --h-pad:      200px;
  --section-v:  clamp(60px, 8vw, 100px);
  --hero-top:   clamp(90px, 12vw, 160px);
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* must be on html, not body — overflow on body breaks position:fixed */
  background: var(--bg); /* canvas background — blobs at z-index:-1 sit above this */
}
body {
  color: var(--fg);
  font-family: 'Lexend', sans-serif;
  cursor: none;
}

/* ── Custom cursor ──────────────────────── */
#cursor {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(76,117,255,0.9);
  box-shadow: 0 0 12px 4px rgba(76,117,255,0.5);
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width 0.2s, height 0.2s;
}
#cursor.hovered { width: 26px; height: 26px; background: rgba(76,117,255,0.3); }
#cursor-trail {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(76,117,255,0.4);
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: left 0.18s ease, top 0.18s ease;
}

/* ── Navigation ─────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--h-pad);
  transition: background 0.4s, backdrop-filter 0.4s;
}
nav.scrolled {
  background: rgba(0,0,5,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(16px,2vw,22px); color: var(--fg);
  text-decoration: none; letter-spacing: 0.05em; cursor: none;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 15px;
  color: var(--mid); text-decoration: none;
  letter-spacing: 0.08em; transition: color 0.2s; cursor: none;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: none; padding: 4px;
  z-index: 101; /* always above the overlay */
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--fg); border-radius: 2px;
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
              opacity   0.25s ease;
}
/* Hamburger → X animation */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,5,0.97);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu.visible { opacity: 1; }
.nav-mobile-menu a {
  font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 28px;
  color: var(--fg); text-decoration: none; letter-spacing: 0.08em; cursor: none;
}

/* ── Layout utilities ───────────────────── */
.page-padding {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--h-pad);
}
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,117,255,0.22) 30%, rgba(76,117,255,0.22) 70%, transparent);
  max-width: 1280px; margin: 0 auto;
}

/* ── Scroll animations ──────────────────── */
.section-reveal,
.fade-up {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section-reveal.visible,
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Shared section headings ────────────── */
.section-heading {
  font-family: 'Lexend', sans-serif; font-weight: 700;
  font-size: clamp(20px, 2.5vw, 30px); color: var(--fg);
  margin-bottom: 8px;
}
.section-sub {
  font-family: 'Lexend', sans-serif;
  font-size: clamp(13px, 1.4vw, 17px);
  color: var(--muted); margin-bottom: 40px; line-height: 1.6;
}

/* ── CTA Button ─────────────────────────── */
.cta-btn {
  position: relative; overflow: hidden;
  padding: 14px 28px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #2039E2 100%);
  color: #DBEBff; font-family: 'Lexend', sans-serif;
  font-weight: 700; font-size: 15px; text-decoration: none;
  cursor: none; border: none; display: inline-block;
  transition: transform 0.2s, box-shadow 0.3s;
}
.cta-btn::before {
  content: ''; position: absolute;
  top: 50%; left: 50%; width: 0; height: 0;
  background: rgba(255,255,255,0.18); border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width 0.5s, height 0.5s, opacity 0.5s; opacity: 0;
}
.cta-btn:hover::before { width: 280px; height: 280px; opacity: 1; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(76,117,255,0.4); }

/* ── Contact block ──────────────────────── */
.contact-heading {
  font-family: 'Lexend', sans-serif; font-weight: 700;
  font-size: clamp(24px, 3vw, 40px); color: var(--fg); margin-bottom: 14px;
}
.contact-desc {
  font-family: 'Lexend', sans-serif;
  font-size: clamp(14px, 1.5vw, 17px); color: var(--muted);
  margin-bottom: 36px; max-width: 560px;
  margin-left: auto; margin-right: auto; line-height: 1.6;
}
.contact-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Social icons ───────────────────────── */
.footer-social { display: flex; gap: 16px; }
.social-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(76,117,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--mid); text-decoration: none; cursor: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.social-icon:hover {
  background: rgba(76,117,255,0.15); border-color: rgba(76,117,255,0.5);
  color: var(--accent); transform: translateY(-2px);
}

/* ── Footer ─────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner {
  padding: 0 var(--h-pad);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: 'Inter', sans-serif; font-size: 14px;
  color: var(--subtle); text-decoration: none; cursor: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  font-family: 'Inter', sans-serif; font-size: 14px;
  color: var(--subtle); text-align: center;
  margin-top: 20px; padding: 0 var(--h-pad);
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* ── Tablet / narrow desktop (≤ 1100px) ─── */
@media (max-width: 1100px) {
  :root { --h-pad: 48px; }
}

/* ── Touch devices — hide custom cursor ─── */
@media (hover: none) {
  #cursor, #cursor-trail { display: none; }
}

/* ── Mobile (≤ 768px) ───────────────────── */
@media (max-width: 768px) {
  :root { --h-pad: 24px; }

  nav { padding: 16px var(--h-pad); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .footer-inner { flex-direction: column; gap: 20px; align-items: center; }
  .footer-links { display: none; }
}

/* ── Small mobile (≤ 480px) ─────────────── */
@media (max-width: 480px) {
  .nav-mobile-menu a { font-size: 22px; }
  .cta-btn { padding: 12px 20px; font-size: 14px; }
  .contact-buttons { flex-direction: column; align-items: center; }
}

/* ── Scroll progress bar ── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), #a8c8ff);
  z-index: 9997; pointer-events: none;
}

/* ── Page transition overlay ── */
#page-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10001;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

/* ── Top blob layer (shared across all pages) ── */
.blob-wrap {
  /* organisational only — no positioning, so it never breaks position:fixed on children */
  pointer-events: none;
}
.blob {
  position: fixed; /* each blob fixed directly to viewport — no wrapper dependency */
  border-radius: 50%;
  pointer-events: none;
  z-index: -1; /* above html canvas background (#000005), behind all body content */
}
/* b1 — violet, ultra-wide, left anchor */
.b1 {
  width: 120vw; height: 36vh;
  top: -16vh; left: -24vw;
  background: radial-gradient(ellipse at 50% 52%,
    rgba(88, 12, 235, 0.32) 0%,
    rgba(55,  8, 175, 0.10) 45%,
    transparent 72%);
  filter: blur(100px);
}
/* b3 — cobalt blue, tall oval, centre-left */
.b3 {
  width: 98vw; height: 40vh;
  top: -14vh; left: 5vw;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(5,  70, 238, 0.34) 0%,
    rgba(3,  42, 182, 0.11) 45%,
    transparent 72%);
  filter: blur(90px);
}
/* b4 — indigo-violet, centre-right */
.b4 {
  width: 92vw; height: 38vh;
  top: -12vh; left: 33vw;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(62, 10, 210, 0.30) 0%,
    rgba(38,  6, 158, 0.10) 45%,
    transparent 72%);
  filter: blur(92px);
}
/* b2 — royal blue, ultra-wide, right anchor */
.b2 {
  width: 114vw; height: 34vh;
  top: -16vh; right: -22vw;
  background: radial-gradient(ellipse at 50% 52%,
    rgba(8,  58, 218, 0.32) 0%,
    rgba(5,  34, 165, 0.10) 45%,
    transparent 72%);
  filter: blur(96px);
}
