/* ══════════════════════════════════════════════
   Z3CONNECT — MASTER STYLESHEET
   Design system: dark premium, blue/violet palette
══════════════════════════════════════════════ */

/* ── RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: clip; }

body {
  background: #050508;
  color: #FFFFFF;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  overflow-x: clip;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; height: 100vh; }

/* ── DESIGN TOKENS ───────────────────────────── */
:root {
  --blue:       #3B82F6;
  --blue-light: #60A5FA;
  --violet:     #7C3AED;
  --violet-light:#A78BFA;
  --cyan:       #06B6D4;
  --bg:         #050508;
  --bg-2:       #0A0A12;
  --bg-3:       #0F0F1A;
  --surface:    rgba(255,255,255,0.03);
  --border:     rgba(255,255,255,0.08);
  --text-muted: rgba(255,255,255,0.5);
  --radius-lg:  24px;
  --radius-xl:  40px;
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── TYPOGRAPHY ──────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--red {
  background: linear-gradient(135deg, #EF4444, #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── BACKGROUND CANVAS ───────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── PRESENTATION OVERLAY ────────────────────── */
.presentation-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, #0D0A1F 0%, #050508 100%);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), visibility 0.8s;
}

.presentation-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pres-logo { animation: pulse-glow 3s ease-in-out infinite; }

.pres-brand {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pres-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pres-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s cubic-bezier(0.16,1,0.3,1);
  margin-top: 16px;
}

.pres-btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: white;
  box-shadow: 0 0 40px rgba(59,130,246,0.4), 0 0 80px rgba(124,58,237,0.2);
}

.pres-btn--primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(59,130,246,0.6), 0 0 100px rgba(124,58,237,0.3);
}

.pres-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
}

/* ── SCENE NAV ───────────────────────────────── */
.scene-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.scene-dot.active {
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
  transform: scale(1.4);
}

/* ── PLAYBACK CONTROLS ───────────────────────── */
.playback-controls {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 500;
  display: flex;
  gap: 10px;
}

.ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

.ctrl-btn:hover {
  background: rgba(59,130,246,0.2);
  border-color: var(--blue);
  color: white;
}

/* ── EXPERIENCE ──────────────────────────────── */
.experience { position: relative; z-index: 10; }

.scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scene-inner {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ── ORBS ────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-drift 8s ease-in-out infinite alternate;
}

.orb--blue   { background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%); }
.orb--violet { background: radial-gradient(circle, rgba(124,58,237,0.4), transparent 70%); }
.orb--red    { background: radial-gradient(circle, rgba(239,68,68,0.3), transparent 70%); }

.orb--1 { width: 400px; height: 400px; top: -10%; left: -15%; animation-duration: 9s; }
.orb--2 { width: 350px; height: 350px; bottom: -5%; right: -10%; animation-duration: 11s; animation-delay: -3s; }
.orb--3 { width: 300px; height: 300px; top: 20%; right: -5%; animation-duration: 7s; }
.orb--4 { width: 400px; height: 400px; top: -15%; right: -10%; animation-duration: 10s; }
.orb--5 { width: 350px; height: 350px; bottom: -10%; left: -10%; animation-duration: 8s; animation-delay: -4s; }
.orb--6 { width: 500px; height: 500px; top: 20%; left: 50%; transform: translateX(-50%); animation-duration: 12s; }
.orb--7 { width: 300px; height: 300px; bottom: 10%; right: 5%; animation-duration: 9s; }
.orb--8 { width: 600px; height: 600px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-duration: 14s; opacity: 0.6; }

/* ═══════════════════════════════════════════════
   SCENE 01
═══════════════════════════════════════════════ */
.grid-perspective {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(55deg) translateY(40%) scaleX(2.5);
  transform-origin: 50% 100%;
  opacity: 0.6;
  pointer-events: none;
}

.s01-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.s01-logo {
  opacity: 0;
  transform: scale(0.5);
}

.s01-brand-name {
  display: flex;
  gap: 1px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.char {
  opacity: 0;
  transform: translateY(20px);
}

.headline-line {
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.mask-wrap { overflow: hidden; }
.mask-text { display: block; transform: translateY(110%); }

.s01-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

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

/* ═══════════════════════════════════════════════
   SCENE 02
═══════════════════════════════════════════════ */
.s02-label, .s03-label, .s04-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  width: 100%;
  justify-content: center;
}

.s02-headline {
  font-size: clamp(2.5rem, 9vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
}

.problem-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.problem-node {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.12);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  opacity: 0;
  transform: translateX(-30px);
  text-align: left;
}

.pnode-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(239,68,68,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chaos-lines {
  width: 100%;
  max-width: 400px;
  opacity: 0;
}

/* ═══════════════════════════════════════════════
   SCENE 03
═══════════════════════════════════════════════ */
.s03-headline {
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.ecosystem {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eco-center {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: scale(0.5);
}

.eco-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: eco-spin 20s linear infinite;
}

.eco-nodes { position: absolute; inset: 0; }

.eco-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateX(130px) rotate(calc(-1 * var(--angle)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
}

.eco-node-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.eco-node span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   SCENE 04
═══════════════════════════════════════════════ */
.s04-headline {
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
}

.capabilities-list {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.cap-item {
  position: relative;
  padding: 24px 0;
  opacity: 0;
  transform: translateY(20px);
}

.cap-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
}

.cap-number {
  position: absolute;
  top: 24px;
  right: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.15);
}

.cap-content {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.cap-icon-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.cap-item:hover .cap-icon-wrap {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.3);
  transform: scale(1.05);
}

.cap-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.95);
}

.cap-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   SCENE 05
═══════════════════════════════════════════════ */
.s05-logo-mega {
  opacity: 0;
  transform: scale(0.6);
}

.mega-logo-svg {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 0 40px rgba(59,130,246,0.5)) drop-shadow(0 0 80px rgba(124,58,237,0.3));
}

.s05-statement { display: flex; flex-direction: column; gap: 2px; }

.statement-line {
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.float-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  opacity: 0;
}

.ftag {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  animation: tag-float 4s ease-in-out infinite alternate;
  animation-delay: calc(var(--dx, 0) * 0.5s);
}

/* ═══════════════════════════════════════════════
   SCENE 06
═══════════════════════════════════════════════ */
.cta-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(124,58,237,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent);
}

.cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.cta-headline { display: flex; flex-direction: column; gap: 2px; }

.cta-headline .mask-wrap {
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.cta-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
}

.cta-brand {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 30%, var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-url { opacity: 0; transform: translateY(20px); }

.url-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--blue-light);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(96,165,250,0.4);
  padding-bottom: 2px;
}

.cta-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(20px);
}

.cta-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  border: 1px solid rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.08);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  opacity: 0;
  transform: translateY(20px);
}

.contact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: blink 1.5s ease-in-out infinite;
}

.particle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  animation: particle-rise var(--dur, 3s) ease-out var(--delay, 0s) infinite;
}

/* ── UTILS ───────────────────────────────────── */
.hidden { display: none !important; }

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--d, 0s);
}

/* ══════════════════════════════════════════════
   ACTIVE SCENE REVEAL STATES (.is-active)
══════════════════════════════════════════════ */
.scene.is-active .mask-text {
  transform: translateY(0);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene.is-active .mask-wrap.delay-1 .mask-text { transition-delay: 0.18s; }
.scene.is-active .mask-wrap.delay-2 .mask-text { transition-delay: 0.32s; }

.scene.is-active .fade-in-up {
  opacity: 1;
  transform: translateY(0);
}

.scene.is-active .s02-label,
.scene.is-active .s03-label,
.scene.is-active .s04-label {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scene 01 */
.scene-01.is-active .s01-logo {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scene-01.is-active .char {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(0.35s + var(--d, 0) * 0.05s);
}

.scene-01.is-active .s01-sub {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

/* Scene 02 */
.scene-02.is-active .s02-headline {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.scene-02.is-active .problem-node {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene-02.is-active .problem-node:nth-child(1) { transition-delay: 0.25s; }
.scene-02.is-active .problem-node:nth-child(2) { transition-delay: 0.38s; }
.scene-02.is-active .problem-node:nth-child(3) { transition-delay: 0.51s; }
.scene-02.is-active .problem-node:nth-child(4) { transition-delay: 0.64s; }
.scene-02.is-active .problem-node:nth-child(5) { transition-delay: 0.77s; }

.scene-02.is-active .chaos-lines {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s;
}

.scene-02.is-active .chaos-path {
  animation: drawLine 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scene 03 */
.scene-03.is-active .eco-center {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

.scene-03.is-active .eco-node {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene-03.is-active .eco-node:nth-child(1) { transition-delay: 0.45s; }
.scene-03.is-active .eco-node:nth-child(2) { transition-delay: 0.55s; }
.scene-03.is-active .eco-node:nth-child(3) { transition-delay: 0.65s; }
.scene-03.is-active .eco-node:nth-child(4) { transition-delay: 0.75s; }
.scene-03.is-active .eco-node:nth-child(5) { transition-delay: 0.85s; }
.scene-03.is-active .eco-node:nth-child(6) { transition-delay: 0.95s; }

/* Scene 04 */
.scene-04.is-active .s04-headline {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.scene-04.is-active .cap-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}
.scene-04.is-active .cap-item:nth-child(1) { transition-delay: 0.15s; }
.scene-04.is-active .cap-item:nth-child(2) { transition-delay: 0.25s; }
.scene-04.is-active .cap-item:nth-child(3) { transition-delay: 0.35s; }
.scene-04.is-active .cap-item:nth-child(4) { transition-delay: 0.45s; }
.scene-04.is-active .cap-item:nth-child(5) { transition-delay: 0.55s; }
.scene-04.is-active .cap-item:nth-child(6) { transition-delay: 0.65s; }

.scene-04.is-active .cap-line {
  transform: scaleX(1);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

/* Scene 05 */
.scene-05.is-active .s05-logo-mega {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scene-05.is-active .float-tags {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}
