/* ============================================
   KUBICL.COM — Modern Dark Landing Page
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: #0a0e1a;
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* --- Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #6366f1 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 200% center;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.services-grid .reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.services-grid .reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.services-grid .reveal:nth-child(4) {
  transition-delay: 0.3s;
}
.services-grid .reveal:nth-child(5) {
  transition-delay: 0.4s;
}
.services-grid .reveal:nth-child(6) {
  transition-delay: 0.5s;
}

.about-grid .reveal:nth-child(2) {
  transition-delay: 0.15s;
}
.about-grid .reveal:nth-child(3) {
  transition-delay: 0.3s;
}

.stats-grid .reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.stats-grid .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.35s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fff;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.25s ease;
  position: relative;
}

.nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 2px;
  transition: width 0.25s ease;
}

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

.nav-cta {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff !important;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(99, 102, 241, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 30%,
    transparent 70%
  );
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: glowFloat 8s ease-in-out infinite;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1, transparent);
  top: 10%;
  left: 15%;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent);
  bottom: 15%;
  right: 15%;
  animation-delay: -4s;
}

@keyframes glowFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.6);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.btn-primary svg {
  transition: transform 0.25s ease;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ============================================
   STATS
   ============================================ */
.stats {
  padding: 4rem 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0) 0%,
    rgba(99, 102, 241, 0.04) 50%,
    rgba(10, 14, 26, 0) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, #fff 30%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: 6rem 0;
  background: #0a0e1a;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2.25rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6366f1, #06b6d4, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(6, 182, 212, 0.1)
  );
  margin-bottom: 1.5rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  color: #818cf8;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* ============================================
   ABOUT / WHY US
   ============================================ */
.about {
  padding: 6rem 0;
  background: linear-gradient(
    180deg,
    #0a0e1a 0%,
    #0f1529 50%,
    #0a0e1a 100%
  );
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.35s ease;
}

.about-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateY(-4px);
}

.about-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.12),
    rgba(6, 182, 212, 0.08)
  );
  margin: 0 auto 1.5rem;
}

.about-icon svg {
  width: 28px;
  height: 28px;
  color: #818cf8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.about-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* ============================================
   TECH STACK
   ============================================ */
.tech {
  padding: 6rem 0;
  background: #0a0e1a;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tech-badge {
  padding: 0.6rem 1.35rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--brand, #6366f1);
  transition: all 0.25s ease;
  cursor: default;
}

.tech-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  border-left-color: var(--brand, #6366f1);
  transform: translateY(-2px);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(
    180deg,
    #0a0e1a 0%,
    #0f1529 100%
  );
}

.cta-card {
  text-align: center;
  padding: 4rem 3rem;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(6, 182, 212, 0.05) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.5),
    rgba(6, 182, 212, 0.5),
    transparent
  );
}

.cta-card h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.cta-card > p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-actions {
  margin-bottom: 1.5rem;
}

.cta-email {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
}

.cta-email a {
  color: #818cf8;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cta-email a:hover {
  color: #a5b4fc;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 4rem 0 2rem;
  background: #060912;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid .about-card:last-child {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .nav-link::after {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 7rem 1.5rem 3rem;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-glow-1 {
    width: 300px;
    height: 300px;
  }

  .hero-glow-2 {
    width: 250px;
    height: 250px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-grid .about-card:last-child {
    max-width: none;
  }

  /* CTA */
  .cta-card {
    padding: 3rem 1.5rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links {
    gap: 2.5rem;
  }

  .footer-brand {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-item {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .tech-grid {
    gap: 0.5rem;
  }

  .tech-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}
