/* ════════════════════════════════════════
   HELIX FRAMES — styles.css
   Dark sci-fi aesthetic
   ════════════════════════════════════════ */

:root {
  --bg:           #02020a;
  --accent:       #00d4ff;
  --accent-2:     #7b35ff;
  --accent-green: #00ffa3;
  --accent-gold:  #ffc840;
  --text:         #ffffff;
  --text-muted:   #8892a4;
  --glass:        rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.10);
  --glow-c:       rgba(0,212,255,0.35);
  --glow-p:       rgba(123,53,255,0.25);
  --radius:       16px;
  --blur:         16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ── THREE.JS CANVAS (fixed backdrop) ── */
#three-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

/* ── NAVBAR ───────────────────────────── */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1200px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2,2,10,0.6);
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  z-index: 100;
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(2,2,10,0.85);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-hex { width: 28px; height: 28px; }

.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

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

/* Nav links */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.25s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

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

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

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-muted);
  transition: all 0.3s;
}

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

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2,2,10,0.97);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.77,0,0.175,1);
}

.mobile-menu.open { transform: translateY(0); }

.mobile-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.25s;
}

.mobile-link:hover { color: var(--accent); }

/* ── SHARED SECTION STYLES ─────────────── */
.section {
  position: relative;
  min-height: 100vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 48px;
}

.title-accent { color: var(--accent); }

/* ── HOME SECTION ───────────────────────── */
.section-home {
  padding: 0 8vw;
  padding-top: 80px;
}

.home-content {
  max-width: 520px;
}

.home-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.home-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.home-sub {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 360px;
  margin-bottom: 40px;
}

.home-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  background: var(--accent);
  color: #000;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 40px;
  transition: box-shadow 0.3s, transform 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0,212,255,0.5), 0 0 60px rgba(0,212,255,0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  transition: border-color 0.3s, color 0.3s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 8vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  opacity: 0.5;
}

.scroll-hint span {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* ── SERVICES SECTION ──────────────────── */
.section-services {
  padding-top: 80px;
}

.services-inner {
  padding: 0 8vw;
  max-width: 60%;
}

.section-header { margin-bottom: 60px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 220px);
  gap: 48px 56px;
}

/* Service node (sci-fi circle) */
.service-node {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Orbit rings container */
.node-rings {
  position: absolute;
  inset: -48px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* r1: cyan  r2: purple  r3: gold */
.ring.r1 { border-color: rgba(0,200,255,0.70);  animation: ring-orbit-1 5s linear infinite paused; }
.ring.r2 { border-color: rgba(153,0,238,0.60);  animation: ring-orbit-2 7s linear infinite reverse paused; }
.ring.r3 { border-color: rgba(255,200,64,0.65); animation: ring-orbit-3 9s linear infinite paused; }

.service-node:hover .ring { opacity: 1; animation-play-state: running; }

@keyframes ring-orbit-1 {
  from { transform: rotateX(72deg) rotateZ(0deg); }
  to   { transform: rotateX(72deg) rotateZ(360deg); }
}
@keyframes ring-orbit-2 {
  from { transform: rotateX(65deg) rotateZ(40deg); }
  to   { transform: rotateX(65deg) rotateZ(400deg); }
}
@keyframes ring-orbit-3 {
  from { transform: rotateX(48deg) rotateZ(110deg); }
  to   { transform: rotateX(48deg) rotateZ(470deg); }
}

/* Circle face */
.node-face {
  width: 182px;
  height: 182px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,200,255,0.30);
  background: radial-gradient(
    circle at 38% 38%,
    rgba(0,150,255,0.14),
    rgba(120,0,220,0.09) 50%,
    rgba(255,200,64,0.04) 75%,
    transparent
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 2;
  transition: border-color 0.4s ease;
  animation: node-breathe 3.5s ease-in-out infinite;
}

@keyframes node-breathe {
  0%, 100% {
    box-shadow:
      0 0 22px rgba(0,150,255,0.18),
      0 0 44px rgba(0,150,255,0.08),
      inset 0 0 22px rgba(0,150,255,0.06);
    border-color: rgba(0,200,255,0.28);
  }
  50% {
    box-shadow:
      0 0 38px rgba(0,150,255,0.32),
      0 0 70px rgba(0,150,255,0.14),
      inset 0 0 38px rgba(0,150,255,0.12);
    border-color: rgba(0,200,255,0.50);
  }
}

.service-node:hover .node-face {
  border-color: rgba(0,212,255,0.95);
  animation: none;
  box-shadow:
    0 0 28px  rgba(0,212,255,0.70),
    0 0 55px  rgba(0,212,255,0.40),
    0 0 90px  rgba(0,212,255,0.18),
    0 0 130px rgba(153,0,238,0.14),
    inset 0 0 40px rgba(0,150,255,0.18);
}

.node-icon {
  font-size: 1.8rem;
  color: var(--accent);
  display: block;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--accent)) drop-shadow(0 0 16px var(--accent));
  transition: filter 0.4s;
}

.service-node:hover .node-icon {
  filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px var(--accent)) drop-shadow(0 0 40px var(--accent));
}

.node-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* Entrance animation for service nodes */
.service-node {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.service-node.visible {
  opacity: 1;
  transform: translateY(0);
}
.service-node[data-delay="1"] { transition-delay: 0.1s; }
.service-node[data-delay="2"] { transition-delay: 0.2s; }
.service-node[data-delay="3"] { transition-delay: 0.3s; }

/* ── PROJECTS SECTION ──────────────────── */
.section-projects {
  align-items: center;
  text-align: center;
  padding-top: 80px;
}

.projects-header {
  margin-bottom: 64px;
}

.projects-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: -32px auto 0;
  line-height: 1.6;
}

/* Project labels around the 3D canvas area */
.project-labels {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.project-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: default;
}

.project-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-label:nth-child(2) { transition-delay: 0.1s; }
.project-label:nth-child(3) { transition-delay: 0.2s; }
.project-label:nth-child(4) { transition-delay: 0.3s; }

.label-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.label-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── CONTACT SECTION ───────────────────── */
.section-contact {
  align-items: center;
  text-align: center;
  padding-top: 80px;
  background: linear-gradient(to bottom, transparent, rgba(2,2,10,0.7) 30%, rgba(2,2,10,0.85) 60%, var(--bg));
}

.contact-container {
  max-width: 740px;
  padding: 0 24px;
}

.contact-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 52px;
  line-height: 1.65;
}

.contact-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  min-width: 160px;
}

.contact-card:hover {
  border-color: rgba(0,212,255,0.5);
  box-shadow: 0 0 28px rgba(0,212,255,0.15);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.card-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 900px) {
  .services-inner { max-width: 100%; }
  .services-grid { grid-template-columns: repeat(2, 185px); gap: 36px 40px; }
  .service-node { width: 185px; height: 185px; }
  .node-face { width: 152px; height: 152px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .section-home { padding: 0 6vw; padding-top: 100px; align-items: center; text-align: center; }
  .home-content { max-width: 100%; }
  .home-cta { justify-content: center; }
  .scroll-hint { left: 50%; transform: translateX(-50%); align-items: center; }

  .services-inner { padding: 0 6vw; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .section-header { text-align: center; }
  .services-grid { grid-template-columns: repeat(2, 160px); gap: 28px 32px; }
  .service-node { width: 160px; height: 160px; }
  .node-face { width: 132px; height: 132px; }
  .node-name { font-size: 0.72rem; }
  .node-icon { font-size: 1.5rem; }

  .contact-cards { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: repeat(2, 138px); gap: 22px; }
  .service-node { width: 138px; height: 138px; }
  .node-face { width: 114px; height: 114px; }
  .node-rings { inset: -30px; }
}

/* ── SELECTION HIGHLIGHT ──────────────── */
::selection { background: rgba(0,212,255,0.25); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.4); }
