@font-face {
  font-family: 'Cyberiada';
  src: url('../Cyberiada_Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --font-brand: 'Cyberiada', sans-serif;
  --bg-primary: #07050F;
  --bg-secondary: #0D0B1A;
  --bg-card: rgba(255, 255, 255, 0.04);
  --accent-blue: #4F8EF7;
  --accent-violet: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #4F8EF7, #8B5CF6);
  --text-primary: #F8F8FF;
  --text-secondary: #9CA3AF;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glow-blue: rgba(79, 142, 247, 0.15);
  --glow-violet: rgba(139, 92, 246, 0.15);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --container: 1200px;
  --section-padding: clamp(4rem, 10vw, 8rem);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 142, 247, 0.3) var(--bg-primary);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(79, 142, 247, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 142, 247, 0.5); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
}

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

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

/* ---- No-JS Fallback ---- */
.no-js [data-animate],
.no-js .hero h1 .word,
.no-js .hero-tagline,
.no-js .hero-ctas,
.no-js .hero-scroll-hint,
.no-js .hero-s-svg {
  opacity: 1 !important;
  transform: none !important;
}

/* ---- Scroll Progress ---- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 10001;
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
  pointer-events: none;
}

/* ---- Cursor Glow ---- */
#cursorGlow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.07) 0%, rgba(139, 92, 246, 0.04) 40%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

body:hover #cursorGlow {
  opacity: 1;
}

@media (max-width: 768px) {
  #cursorGlow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #cursorGlow { display: none; }
  #scrollProgress { display: none; }
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(7, 5, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo span {
  font-family: var(--font-brand);
  font-weight: 300;
  font-size: 2.5rem;
  letter-spacing: 0.2em;
}
@media (max-width: 768px) {
  .nav-logo span {
    font-size: 1.5rem;
  }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: var(--text-primary);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)),
                    var(--accent-gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.btn-outline:hover {
  box-shadow: 0 0 20px var(--glow-blue), 0 0 40px var(--glow-violet);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    background: rgba(13, 11, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 5rem 2rem 2rem;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border-subtle);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; }
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(79, 142, 247, 0.08) 0%,
    rgba(139, 92, 246, 0.04) 40%,
    transparent 70%);
  pointer-events: none;
  will-change: transform, opacity;
}
.hero-s-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}
.hero-s-svg {
  width: clamp(260px, 55vw, 750px);
  height: auto;
  opacity: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-content {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  opacity: 0;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.15;
}
.hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #e8ecf2 40%, #a8bce0 70%, #7ca4d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  opacity: 0;
}
.hero-scroll-hint span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  position: relative;
}
.hero-scroll-hint span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(10px); }
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.btn-primary:hover {
  box-shadow: 0 0 30px var(--glow-blue), 0 0 60px var(--glow-violet);
  transform: translateY(-1px);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}

.btn-primary,
.btn-outline {
  will-change: transform;
}

/* ---- TRUST BAR ---- */
.trust {
  padding: var(--section-padding) 0;
  border-top: 1px solid var(--border-subtle);
}
.trust-statement {
  text-align: center;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.trust-card:hover {
  border-color: rgba(79, 142, 247, 0.2);
  box-shadow: 0 0 30px var(--glow-blue);
}
.trust-card .stat {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.trust-card .label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- SERVICES — Horizontal Scroll ---- */
.services {
  overflow: hidden;
}
.services-header {
  padding: var(--section-padding) 0 3rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 550px;
}

/* Horizontal scroll track */
.services-track-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
}
.services-track {
  display: flex;
  gap: 3rem;
  padding: 2rem 0 4rem;
  padding-left: max(1.5rem, calc((100vw - var(--container)) / 2 + 1.5rem));
  padding-right: 4rem;
  width: max-content;
  will-change: transform;
  align-items: stretch;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  width: 50vw;
  min-width: 50vw;
  max-width: 700px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-card:hover {
  border-color: rgba(79, 142, 247, 0.15);
  box-shadow: 0 8px 40px var(--glow-blue);
}
.service-card:hover::before {
  opacity: 1;
}
.service-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(79, 142, 247, 0.08);
  color: var(--accent-blue);
}
.service-icon svg {
  width: 32px;
  height: 32px;
}
.service-card h3 {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  font-weight: 600;
  margin-bottom: 1rem;
}
.service-card p {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 540px;
}

/* Service card number indicator */
.service-card .card-number {
  position: absolute;
  top: 1.5rem;
  right: 2.5rem;
  font-family: var(--font-heading);
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 700;
  line-height: 1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.06;
}

/* Scroll progress indicator for services */
.services-progress {
  margin-top: 2rem;
  padding-bottom: var(--section-padding);
}
.services-progress-bar {
  width: 100%;
  max-width: 200px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.services-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  transform-origin: left;
  transform: scaleX(0);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .services-track {
    flex-direction: column;
    width: 100%;
    padding: 1rem 1.5rem 2rem;
    gap: 1.5rem;
  }
  .service-card {
    width: 100%;
    min-width: unset;
    max-width: none;
    padding: 2rem 1.5rem;
  }
  .services-progress {
    display: none;
  }
}

/* ---- PROCESS ---- */
.process {
  padding: var(--section-padding) 0;
  border-top: 1px solid var(--border-subtle);
}
.process .section-title {
  text-align: center;
  margin-bottom: 4rem;
}
.process-steps {
  display: flex;
  gap: 2rem;
  position: relative;
  align-items: flex-start;
}
.process-line {
  position: absolute;
  top: 36px;
  left: calc(16.66% + 36px);
  right: calc(16.66% + 36px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet));
  opacity: 0.3;
  transform: scaleX(0);
  transform-origin: left;
}
.process-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.process-step h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.process-step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
  }
  .process-line {
    top: 36px;
    bottom: 36px;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-violet));
  }
  .process-step {
    max-width: 360px;
  }
}

/* ---- ABOUT / POSITIONING ---- */
.about {
  padding: var(--section-padding) 0;
  border-top: 1px solid var(--border-subtle);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.about-text p:last-child {
  margin-bottom: 0;
}
.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 350px;
}
#synapseCanvas {
  width: 350px;
  height: 350px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-visual {
    order: -1;
    min-height: 250px;
  }
  #synapseCanvas {
    width: 260px;
    height: 260px;
  }
}

/* ---- CTA SECTION ---- */
.cta-section {
  padding: var(--section-padding) 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(79, 142, 247, 0.08) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(79, 142, 247, 0.04) 100%);
  border-top: 1px solid rgba(79, 142, 247, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
.cta-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.1) 0%, rgba(139, 92, 246, 0.06) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(40px);
}
.cta-content {
  position: relative;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1;
}
.cta-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.cta-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-brand span {
  font-family: var(--font-brand);
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.15em;
}
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.footer-links a:hover {
  color: var(--text-primary);
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-copy a {
  color: var(--accent-blue);
}

@media (max-width: 768px) {
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate],
  .hero h1 .word,
  .hero-tagline,
  .hero-ctas,
  .hero-scroll-hint,
  .hero-s-svg {
    opacity: 1 !important;
    transform: none !important;
  }
  .services-track {
    flex-direction: column !important;
    width: 100% !important;
  }
  .service-card {
    width: 100% !important;
    min-width: unset !important;
    max-width: none !important;
  }
}
