/* ============================================================
   TECSTRYDE – GLOBAL DESIGN SYSTEM
   ============================================================ */

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

/* ── CSS VARIABLES ── */
:root {
  --bg-primary:    #050a14;
  --bg-secondary:  #080e1e;
  --bg-card:       rgba(255,255,255,0.03);
  --accent-blue:   #3b82f6;
  --accent-purple: #7c3aed;
  --accent-cyan:   #06b6d4;
  --accent-grad:   linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
  --accent-grad2:  linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;
  --border:        rgba(255,255,255,0.08);
  --border-accent: rgba(59,130,246,0.3);
  --glass:         rgba(255,255,255,0.05);
  --glass-border:  rgba(255,255,255,0.10);
  --shadow-glow:   0 0 40px rgba(59,130,246,0.2);
  --font-main:     'Outfit', sans-serif;
  --font-alt:      'Space Grotesk', sans-serif;
  --nav-h:         72px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: none; font-family: inherit; border: none; outline: none; }
input, textarea { font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 99px; }

/* ── CUSTOM CURSOR ── */
#cursor-dot {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999;
  width: 8px; height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform 0.1s ease;
}
#cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99998;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(59,130,246,0.6);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform 0.18s ease, width 0.25s, height 0.25s, border-color 0.25s;
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent-purple);
}

/* ── NOISE OVERLAY ── */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9997;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── NAVBAR ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  transition: background 0.4s ease, backdrop-filter 0.4s, box-shadow 0.4s;
}
#navbar.scrolled {
  background: rgba(5,10,20,0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
}
.nav-logo span { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-logo img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  position: relative; padding-bottom: 4px;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent-grad);
  transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  padding: 9px 22px; border-radius: 99px;
  background: var(--accent-grad);
  font-weight: 600; font-size: 0.85rem; color: #fff !important;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { opacity: 0.9; transform: scale(1.04); box-shadow: 0 0 20px rgba(59,130,246,0.4); }
.nav-cta::after { display: none !important; }

/* ── HAMBURGER ── */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: none; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.35s cubic-bezier(.42,0,.58,1); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
#mobile-nav {
  position: fixed; top: 0; right: -100%; bottom: 0; width: 280px; z-index: 8999;
  background: rgba(8,14,30,0.97);
  backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + 1.5rem) 2rem 2rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: right 0.45s cubic-bezier(.42,0,.58,1);
  border-left: 1px solid var(--border);
}
#mobile-nav.open { right: 0; }
#mobile-nav a {
  padding: 0.9rem 0; font-size: 1.1rem; font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary); transition: color 0.3s, padding-left 0.3s;
}
#mobile-nav a:hover { color: var(--text-primary); padding-left: 0.5rem; }
#overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 8998; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
#overlay.show { opacity: 1; pointer-events: all; }

/* ── FOOTER ── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 5rem 5vw 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; margin: 1rem 0 1.5rem; max-width: 280px; }
.footer-socials { display: flex; gap: 0.8rem; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s;
}
.footer-socials a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.footer-socials a:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(59,130,246,0.08); transform: translateY(-3px); }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 1.2rem; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { color: var(--text-secondary); font-size: 0.9rem; transition: color 0.3s, padding-left 0.3s; }
.footer-col ul li a:hover { color: var(--accent-blue); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  color: var(--text-muted); font-size: 0.8rem;
}
.footer-bottom span { color: var(--accent-blue); }

/* ── SECTION COMMONS ── */
section { padding: 7rem 5vw; position: relative; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--accent-blue);
  margin-bottom: 1rem;
}
.section-tag::before { content: ''; display: block; width: 18px; height: 2px; background: var(--accent-blue); }
.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -1px;
}
.section-title span { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.section-sub { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; margin-top: 0.8rem; }
.section-header { margin-bottom: 4rem; }
.section-header.center { text-align: center; }
.section-header.center .section-tag { justify-content: center; }
.section-header.center .section-sub { margin: 0.8rem auto 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 99px;
  font-weight: 700; font-size: 0.95rem;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 0 30px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(59,130,246,0.4); }
.btn-outline {
  border: 1.5px solid var(--border-accent); color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover { background: rgba(59,130,246,0.08); border-color: var(--accent-blue); transform: translateY(-3px); }

/* ── GLASS CARD ── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

/* ── FADE-IN ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.visible { opacity: 1; transform: none; }

/* ── BACK TO TOP ── */
#back-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 8000;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
  opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 20px rgba(59,130,246,0.3);
}
#back-top.show { opacity: 1; pointer-events: all; transform: none; }
#back-top:hover { box-shadow: 0 0 35px rgba(59,130,246,0.5); transform: translateY(-3px); }

/* ── STAT COUNTER ── */
.stat-num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── PAGE HERO COMMON ── */
.page-hero {
  min-height: 45vh;
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 4rem;
  display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(ellipse 60% 80% at 50% -10%, rgba(59,130,246,0.12) 0%, transparent 70%);
}

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }

/* ── TAG CHIP ── */
.chip {
  padding: 5px 14px; border-radius: 99px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid var(--border-accent); color: var(--accent-blue); background: rgba(59,130,246,0.08);
}

/* ── GRADIENT LINE ── */
.grad-line { height: 3px; background: var(--accent-grad); border-radius: 99px; margin: 0.5rem 0; }

/* ── RESPONSIVE ── */
@media (min-width: 1440px) {
  :root { --nav-h: 80px; }
  section { padding: 8rem 8vw; }
  .section-title { font-size: 3.5rem; }
}

@media (max-width: 1200px) {
  section { padding: 6rem 5vw; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); gap: 2.5rem; }
  .section-title { font-size: 2.8rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 4.5rem 5vw; }
  .section-title { font-size: 2.4rem; }
  .section-sub { font-size: 0.95rem; }
  
  /* Mobile optimization for cursor */
  #cursor-dot, #cursor-ring { display: none !important; }
  body { cursor: auto !important; }
  button, a { cursor: pointer !important; }
}

@media (max-width: 480px) {
  .section-title { font-size: 2rem; }
  .btn { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── PARTICLE CANVAS ── */
#particles-canvas {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}

/* ── LOADING SCREEN ── */
#loader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { font-size: 2rem; font-weight: 900; }
.loader-logo span { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.loader-bar { width: 220px; height: 3px; background: var(--border); border-radius: 99px; overflow: hidden; }
.loader-bar-fill { height: 100%; width: 0; background: var(--accent-grad); border-radius: 99px; transition: width 1.8s cubic-bezier(.17,.67,.3,1); }

/* ── GLOW ORBS ── */
.glow-orb {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px); opacity: 0.18;
}
.orb-blue { background: var(--accent-blue); }
.orb-purple { background: var(--accent-purple); }
.orb-cyan { background: var(--accent-cyan); }

/* ── SOCIAL ICONS styling ── */
.footer-socials a svg, .social-bar a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}
.footer-socials a:hover svg, .social-bar a:hover svg {
  transform: translateY(-3px) scale(1.1);
}
.footer-socials a, .social-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}
