/* ═══════════════════════════════════════════════════════════════
   3D WEBSITES HACKATHON — Main Stylesheet
   Author: Kiro AI · Full Stack Build
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Colors */
  --clr-bg:          #020408;
  --clr-bg-2:        #060d18;
  --clr-surface:     rgba(255,255,255,0.03);
  --clr-surface-2:   rgba(255,255,255,0.06);
  --clr-border:      rgba(255,255,255,0.08);
  --clr-border-2:    rgba(255,255,255,0.14);

  --clr-accent:      #00f0ff;       /* Cyan */
  --clr-accent-2:    #7b2fff;       /* Purple */
  --clr-accent-3:    #ff2fff;       /* Magenta */
  --clr-gold:        #ffd700;

  --clr-text:        #e8edf5;
  --clr-text-muted:  rgba(232,237,245,0.55);
  --clr-text-faint:  rgba(232,237,245,0.30);

  /* Gradients */
  --grad-hero:       linear-gradient(135deg, #00f0ff 0%, #7b2fff 50%, #ff2fff 100%);
  --grad-glow:       radial-gradient(ellipse at center, rgba(0,240,255,0.15) 0%, transparent 70%);
  --grad-card:       linear-gradient(135deg, rgba(0,240,255,0.04) 0%, rgba(123,47,255,0.04) 100%);

  /* Typography */
  --font-display:    'Orbitron', monospace;
  --font-body:       'Space Grotesk', sans-serif;
  --font-ui:         'Inter', sans-serif;

  /* Spacing */
  --section-pad:     clamp(80px, 10vw, 140px);
  --container-max:   1280px;
  --container-pad:   clamp(24px, 5vw, 80px);

  /* Transitions */
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:          0.2s;
  --t-mid:           0.4s;
  --t-slow:          0.8s;

  /* Z-index layers */
  --z-canvas:        0;
  --z-content:       10;
  --z-nav:           100;
  --z-loader:        1000;
  --z-cursor:        9999;
}

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

html {
  font-size: 16px;
  /* scroll-behavior: smooth removed — GSAP ScrollToPlugin handles
     smooth scrolling. Having both causes double-animation conflicts
     when clicking nav links. */
  overflow-x: hidden;
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* cursor: none only on devices that support hover (i.e. have a mouse).
   On touch devices this falls back to the default cursor so buttons
   remain usable. */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  button { cursor: none; }
}

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

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

button {
  font-family: inherit;
  border: none;
  background: none;
}

ul { list-style: none; }

/* ─── Three.js Canvas ────────────────────────────────────────── */
#threeCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
}

/* ─── Main Content ───────────────────────────────────────────── */
#main-content {
  position: relative;
  z-index: var(--z-content);
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════════════════════ */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
}

.cursor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out-expo),
              width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo);
}

.cursor-ring {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out-expo),
              width 0.4s var(--ease-out-expo),
              height 0.4s var(--ease-out-expo),
              border-color 0.3s ease;
}

body.cursor-hover .cursor-dot {
  width: 10px;
  height: 10px;
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--clr-accent);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  z-index: var(--z-loader);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.loader-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 3s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.loader-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(0,240,255,0.6)); }
  50%       { filter: drop-shadow(0 0 40px rgba(123,47,255,0.8)); }
}

.loader-bracket {
  color: var(--clr-accent);
}

.loader-text {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-title {
  font-family: var(--font-display);
  font-size: clamp(12px, 2vw, 18px);
  letter-spacing: 0.4em;
  color: var(--clr-text-muted);
}

.loader-bar-wrap {
  width: min(400px, 80vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.loader-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--clr-accent);
  /* No CSS transition — JS drives width directly for accurate sync */
}

.loader-percent {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--clr-accent);
  text-align: right;
}

.loader-status {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--clr-text-faint);
  font-family: var(--font-ui);
  min-height: 18px;
}

/* Loader exit animation */
#loader.exit {
  animation: loaderExit 0.8s var(--ease-out-expo) forwards;
}

@keyframes loaderExit {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 20px var(--container-pad);
  display: flex;
  align-items: center;
  gap: 40px;
  transition: background var(--t-mid) ease,
              padding var(--t-mid) ease,
              backdrop-filter var(--t-mid) ease;
}

#navbar.scrolled {
  background: rgba(2, 4, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--clr-border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-bracket {
  color: var(--clr-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--clr-text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color var(--t-fast) ease, background var(--t-fast) ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 28px);
  height: 1px;
  background: var(--clr-accent);
  transition: transform var(--t-fast) var(--ease-out-expo);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-cta {
  flex-shrink: 0;
}

.btn-nav {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 20px;
  border: 1px solid var(--clr-accent);
  border-radius: 6px;
  color: var(--clr-accent);
  transition: background var(--t-fast) ease, color var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}

.btn-nav:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
  box-shadow: 0 0 20px rgba(0,240,255,0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--ease-out-expo),
              opacity var(--t-mid) ease;
}

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

/* ═══════════════════════════════════════════════════════════════
   SECTIONS — Common
   ═══════════════════════════════════════════════════════════════ */
.section {
  min-height: 100vh;
  position: relative;
  padding: var(--section-pad) var(--container-pad);
  display: flex;
  align-items: center;
}

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

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--clr-accent);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(-20px);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
}

.section-title em {
  font-style: normal;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 60px;
  max-width: 640px;
  opacity: 0;
  transform: translateY(20px);
}

.section-lead strong {
  color: var(--clr-text);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--hero {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.section--hero .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 0.4em;
  color: var(--clr-accent);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}

.hero-title-line--accent {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0,240,255,0.3));
}

.hero-sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 560px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(20px);
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: var(--clr-bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out-expo),
              box-shadow var(--t-fast) ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--t-fast) ease;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0,240,255,0.35), 0 0 60px rgba(123,47,255,0.2);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary svg {
  width: 18px;
  height: 18px;
  transition: transform var(--t-fast) var(--ease-out-expo);
}

.btn-primary:hover svg { transform: translate(2px, -2px); }

/* Outline Button */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: 8px;
  background: var(--clr-surface);
  backdrop-filter: blur(10px);
  transition: border-color var(--t-fast) ease,
              background var(--t-fast) ease,
              transform var(--t-fast) var(--ease-out-expo);
}

.btn-outline:hover {
  border-color: var(--clr-accent);
  background: rgba(0,240,255,0.05);
  transform: translateY(-2px);
}

/* Scroll hint */
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.hero-scroll-hint span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--clr-text-faint);
  font-family: var(--font-ui);
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--clr-text-faint);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 3px;
  height: 6px;
  background: var(--clr-accent);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(8px); opacity: 0; }
  61%  { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Floating Badges */
.hero-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.badge {
  position: absolute;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--clr-border-2);
  background: rgba(0,240,255,0.04);
  backdrop-filter: blur(10px);
  color: var(--clr-text-muted);
  white-space: nowrap;
  opacity: 0;
  animation: badgeFade 1s ease forwards;
}

.badge--threejs { top: 18%; left: 8%; }
.badge--gsap    { top: 32%; right: 7%; }
.badge--blender { bottom: 30%; left: 6%; }
.badge--webgl   { top: 55%; right: 9%; }
.badge--r3f     { bottom: 18%; right: 14%; }
.badge--spline  { top: 12%; right: 20%; }

@keyframes badgeFade {
  to { opacity: 1; }
}

[data-float="0"] { animation: float0 6s ease-in-out 2.2s infinite both, badgeFade 0.8s ease 2.2s forwards; }
[data-float="1"] { animation: float1 7s ease-in-out 2.4s infinite both, badgeFade 0.8s ease 2.4s forwards; }
[data-float="2"] { animation: float2 5.5s ease-in-out 2.6s infinite both, badgeFade 0.8s ease 2.6s forwards; }
[data-float="3"] { animation: float0 8s ease-in-out 2.8s infinite both, badgeFade 0.8s ease 2.8s forwards; }
[data-float="4"] { animation: float1 6.5s ease-in-out 3.0s infinite both, badgeFade 0.8s ease 3.0s forwards; }
[data-float="5"] { animation: float2 7.5s ease-in-out 3.2s infinite both, badgeFade 0.8s ease 3.2s forwards; }

@keyframes float0 {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-14px) rotate(1deg); }
}
@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(1deg); }
  50%       { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(-6px) rotate(0deg); }
  50%       { transform: translateY(8px) rotate(2deg); }
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--about {
  background: linear-gradient(180deg, transparent 0%, rgba(0,240,255,0.02) 50%, transparent 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 72px;
}

.about-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid) ease,
              transform var(--t-mid) var(--ease-out-expo),
              background var(--t-mid) ease;
  opacity: 0;
  transform: translateY(40px);
}

.about-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity var(--t-mid) ease;
}

.about-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
  opacity: 0;
  transition: opacity var(--t-mid) ease;
}

.about-card:hover {
  border-color: var(--clr-border-2);
  /* Use filter instead of transform so GSAP's translateY entrance
     isn't overridden by the hover state causing a jump */
  filter: brightness(1.08);
  background: rgba(255,255,255,0.04);
}

.about-card:hover::before,
.about-card:hover::after { opacity: 1; }

.about-card-icon {
  width: 48px;
  height: 48px;
  color: var(--clr-accent);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.about-card h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--clr-text);
  position: relative;
  z-index: 1;
}

.about-card p {
  font-size: 14px;
  color: var(--clr-text-muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* Wow Quote */
.wow-quote {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px 0;
  opacity: 0;
  transform: scale(0.95);
}

.wow-quote-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border-2));
}

.wow-quote-line:last-child {
  background: linear-gradient(270deg, transparent, var(--clr-border-2));
}

blockquote {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--clr-text-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.6;
  max-width: 600px;
  flex-shrink: 0;
}

.wow-word {
  font-style: normal;
  font-size: 1.4em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(0,240,255,0.4));
}

/* ═══════════════════════════════════════════════════════════════
   CHALLENGE SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--challenge {
  background: linear-gradient(180deg, transparent 0%, rgba(123,47,255,0.03) 50%, transparent 100%);
}

.challenge-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  overflow: hidden;
}

.challenge-item {
  display: flex;
  gap: 24px;
  padding: 32px 28px;
  background: var(--clr-surface);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: background var(--t-mid) ease, border-color var(--t-mid) ease;
  opacity: 0;
  transform: translateY(30px);
}

.challenge-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,47,255,0.06) 0%, rgba(0,240,255,0.04) 100%);
  opacity: 0;
  transition: opacity var(--t-mid) ease;
}

.challenge-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--clr-border-2);
  z-index: 1;
}

.challenge-item:hover::before { opacity: 1; }

.challenge-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--clr-border-2);
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--t-mid) ease;
}

.challenge-item:hover .challenge-number {
  color: var(--clr-accent);
}

.challenge-content {
  position: relative;
  z-index: 1;
}

.challenge-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--clr-text);
}

.challenge-content p {
  font-size: 14px;
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.challenge-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0,240,255,0.25);
  color: var(--clr-accent);
  background: rgba(0,240,255,0.06);
}

/* ═══════════════════════════════════════════════════════════════
   TOOLS SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--tools {
  background: linear-gradient(180deg, transparent 0%, rgba(255,47,255,0.02) 50%, transparent 100%);
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

/* Orbit Visualization */
.tools-orbit {
  position: relative;
  width: 500px;
  height: 500px;
  margin: 0 auto 60px;
  opacity: 0;
  max-width: 100%;
  transform-origin: center center;
  /* NOTE: Do not add CSS transform here — GSAP owns the transform
     property for the rotation animation. Mobile sizing is handled
     by capping width/height instead. */
}

@media (max-width: 560px) {
  .tools-orbit {
    /* Shrink via width/height, not transform, to avoid GSAP conflict */
    width: 320px;
    height: 320px;
    margin-bottom: 20px;
  }
}

.tools-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--clr-accent);
  z-index: 2;
}

.tools-center-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0,240,255,0.25);
  animation: ringPulse 3s ease-in-out infinite;
}

.tools-center-ring--2 {
  inset: -15px;
  border-color: rgba(0,240,255,0.1);
  animation-delay: 1.5s;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.1); opacity: 0.5; }
}

/* Orbit ring SVG lines drawn by JS, tool nodes positioned absolutely */
.tool-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform var(--t-fast) var(--ease-out-expo);
}

.tool-node:hover { transform: translate(-50%, -50%) scale(1.15); }

.tool-node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--clr-accent);
  box-shadow: 0 0 14px var(--clr-accent), 0 0 28px rgba(0,240,255,0.3);
  flex-shrink: 0;
}

.tool-node-label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--clr-text);
  white-space: nowrap;
  text-align: center;
}

.tool-node-desc {
  font-size: 9px;
  color: var(--clr-text-faint);
  white-space: nowrap;
  text-align: center;
  display: none;
}

.tool-node:hover .tool-node-desc { display: block; }

/* Tools orbit SVG line */
.orbit-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Tools Grid List */
.tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid) ease,
              transform var(--t-mid) var(--ease-out-expo),
              background var(--t-mid) ease;
  opacity: 0;
  transform: translateY(20px);
}

.tool-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, rgba(0,240,255,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-mid) ease;
}

.tool-card:hover {
  border-color: rgba(0,240,255,0.3);
  transform: translateY(-3px);
  background: rgba(255,255,255,0.04);
}

.tool-card:hover .tool-card-glow { opacity: 1; }

.tool-card-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--clr-text);
  flex-shrink: 0;
  min-width: 120px;
}

.tool-card-desc {
  font-size: 13px;
  color: var(--clr-text-muted);
  flex: 1;
}

.tool-card-arrow {
  font-size: 18px;
  color: var(--clr-accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--ease-out-expo);
  flex-shrink: 0;
}

.tool-card:hover .tool-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════════
   RULES SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--rules {
  background: linear-gradient(180deg, transparent 0%, rgba(0,240,255,0.025) 50%, transparent 100%);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 60px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  transition: border-color var(--t-mid) ease, transform var(--t-mid) var(--ease-out-expo);
  opacity: 0;
  transform: translateX(-20px);
}

.rule-item:hover {
  border-color: var(--clr-border-2);
  /* Avoid transform conflict with GSAP entrance animation.
     Use box-shadow accent instead of translateX. */
  box-shadow: inset 3px 0 0 var(--clr-accent);
}

.rule-icon {
  font-size: 14px;
  color: var(--clr-accent);
  flex-shrink: 0;
  margin-top: 2px;
  animation: iconSpin 8s linear infinite;
}

@keyframes iconSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rule-text {
  font-size: 14px;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* Submission Checklist */
.submission-checklist {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.submission-checklist::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-hero);
}

.checklist-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--clr-accent);
  margin-bottom: 28px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--clr-text-muted);
}

.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--clr-accent);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   JOIN / CTA SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--join {
  text-align: center;
  overflow: hidden;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.section--join .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.join-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 100vw);
  height: min(700px, 100vw);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(123,47,255,0.12) 0%,
    rgba(0,240,255,0.06) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.join-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
}

.join-accent {
  font-style: normal;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.join-sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 56px;
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
}

/* Stats */
.join-stats {
  display: flex;
  gap: 60px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(20px);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--clr-text-faint);
  font-family: var(--font-ui);
  text-transform: uppercase;
}

/* Hero CTA Button */
.join-cta {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 48px;
  background: transparent;
  border: 1px solid rgba(0,240,255,0.4);
  border-radius: 60px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--clr-text);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid) ease,
              transform var(--t-mid) var(--ease-out-expo),
              box-shadow var(--t-mid) ease;
}

.btn-hero-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,240,255,0.1), rgba(123,47,255,0.1));
  opacity: 0;
  transition: opacity var(--t-mid) ease;
}

.btn-hero:hover {
  border-color: var(--clr-accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(0,240,255,0.2), 0 20px 40px rgba(0,0,0,0.3);
}

.btn-hero:hover .btn-hero-glow { opacity: 1; }

.btn-hero-text { position: relative; z-index: 1; }

.btn-hero svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  transition: transform var(--t-fast) var(--ease-out-expo);
}

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

/* Tech list */
.join-tech-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  color: var(--clr-text-faint);
  font-family: var(--font-ui);
  letter-spacing: 0.05em;
  opacity: 0;
}

.dot {
  color: var(--clr-accent);
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#footer {
  position: relative;
  z-index: var(--z-content);
  padding: 40px var(--container-pad);
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.footer-tagline {
  font-size: 14px;
  color: var(--clr-text-muted);
  font-style: italic;
}

.footer-line {
  width: 60px;
  height: 1px;
  background: var(--clr-border-2);
}

.footer-copy {
  font-size: 12px;
  color: var(--clr-text-faint);
  font-family: var(--font-ui);
}

/* ═══════════════════════════════════════════════════════════════
   GSAP ANIMATION STATES
   (Initial hidden states — GSAP will reveal them)
   ═══════════════════════════════════════════════════════════════ */
[data-anim] {
  will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  #navbar { justify-content: space-between; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(2, 4, 8, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px var(--container-pad);
    border-bottom: 1px solid var(--clr-border);
    gap: 4px;
  }

  .nav-links.open + .nav-cta {
    display: block;
    position: fixed;
    top: calc(64px + 260px);
    left: var(--container-pad);
    right: var(--container-pad);
  }

  .tools-orbit { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .challenge-showcase { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .join-stats { gap: 32px; }
  .wow-quote { flex-direction: column; text-align: center; }
  .wow-quote-line { width: 60px; height: 1px; }
  .hero-badges { display: none; }
}

@media (max-width: 600px) {
  .hero-title { letter-spacing: -0.02em; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .section--hero { padding-top: 100px; }
  .submission-checklist { padding: 28px 20px; }
  .tools-list { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY & MISC
   ═══════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Selection */
::selection {
  background: rgba(0,240,255,0.25);
  color: var(--clr-text);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
