/* ═══════════════════════════════════════════
   BASE — reset, typography, background, nav, footer
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
ul { list-style: none; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(8, 145, 178, 0.25); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(8, 145, 178, 0.45); }

/* ── Layout helpers ── */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--wrap-pad); }
main { position: relative; z-index: 2; }
section { padding: var(--section-pad) 0; position: relative; }

/* ── Gradient text utility ── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ═══ BACKGROUND LAYERS ═══ */
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bg-aurora {
  position: fixed; inset: -20%;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 32% at 18% 22%, rgba(6, 182, 212, 0.2), transparent 70%),
    radial-gradient(34% 30% at 84% 16%, rgba(59, 130, 246, 0.2), transparent 70%),
    radial-gradient(42% 38% at 74% 84%, rgba(6, 182, 212, 0.16), transparent 70%),
    radial-gradient(30% 30% at 20% 86%, rgba(147, 197, 253, 0.25), transparent 70%);
  filter: blur(70px);
  animation: aurora 18s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-noise {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.mouse-glow {
  position: fixed; z-index: 1; pointer-events: none;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.07), rgba(59, 130, 246, 0.04) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  will-change: left, top;
}

/* ── Custom cursor (desktop only) ── */
.cursor-dot, .cursor-ring {
  position: fixed; z-index: 9999; pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(8, 145, 178, 0.45);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s;
}
.cursor-ring.is-hover { width: 54px; height: 54px; border-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { opacity: 1; }
}

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 300;
  height: 3px; width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
}

/* ═══ NAVIGATION ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 48px;
  transition: padding 0.4s var(--ease-out), background 0.4s, border-color 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  padding: 14px 48px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 10px 40px rgba(29, 78, 216, 0.1);
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img {
  width: 44px; height: 44px;
  border-radius: 50%;
  filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.55));
  transition: transform 0.5s var(--ease-spring), filter 0.3s;
}
.logo:hover .logo-img {
  transform: rotate(12deg) scale(1.08);
  filter: drop-shadow(0 0 22px rgba(6, 182, 212, 0.8));
}
.logo-text { font-weight: 700; font-size: 16px; letter-spacing: 0.4px; }
.logo-text em { font-style: normal; color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 13px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.25s;
}
.nav-link::after {
  content: '';
  position: absolute; left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  background: var(--grad);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 10px;
  padding: 9px 22px !important;
  color: #fff !important;
  background: var(--grad);
  border-radius: 999px;
  font-weight: 700 !important;
  box-shadow: 0 0 20px rgba(8, 145, 178, 0.3);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(8, 145, 178, 0.5); }

.hamburger {
  display: none;
  flex-direction: column; gap: 6px;
  background: none; border: none; cursor: pointer;
  padding: 10px; z-index: 210;
}
.hamburger span {
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ═══ FOOTER ═══ */
footer {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(14, 27, 58, 0.08);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding-top: 30px; padding-bottom: 30px;
  font-size: 13px; color: var(--text-sub);
}
.footer-tag { font-weight: 500; }
.back-top {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--accent);
  background: var(--glass-bg);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.back-top svg { width: 18px; height: 18px; }
.back-top:hover { transform: translateY(-4px); border-color: var(--glass-border-hover); box-shadow: var(--glow-accent); }
