/* ============================================
   FC App Studio — Design System & Styles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --color-bg:        #0a0a0f;
  --color-bg-alt:    #111118;
  --color-surface:   rgba(255, 255, 255, 0.04);
  --color-glass:     rgba(255, 255, 255, 0.06);
  --color-glass-border: rgba(255, 255, 255, 0.08);
  --color-text:      #e4e4e7;
  --color-text-muted:#71717a;
  --color-accent:    #a78bfa;
  --color-accent-2:  #38bdf8;
  --color-accent-3:  #f472b6;
  --color-accent-4:  #34d399;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --blur:        12px;
  --blur-heavy:  20px;
  --transition:  0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.logo,
.section-title,
.hero h1 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* ---------- Radial Gradient Background ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(167, 139, 250, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(56, 189, 248, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(244, 114, 182, 0.06) 0%, transparent 50%),
    var(--color-bg);
}

/* ---------- Floating Background Shapes ---------- */
#floating-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  will-change: transform;
  filter: blur(1px);
}

.floating-shape.square {
  border-radius: var(--radius-sm);
}

.floating-shape.triangle {
  border-radius: 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--color-glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--color-glass-border);
}

.glass-heavy {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--blur-heavy));
  -webkit-backdrop-filter: blur(var(--blur-heavy));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  transition: var(--transition);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s;
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Sections ---------- */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 8rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e4e4e7 40%,
    var(--color-accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ---------- CTA Button ---------- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), #7c3aed);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.25);
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed, var(--color-accent-2));
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: inherit;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(167, 139, 250, 0.4);
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn span {
  position: relative;
  z-index: 1;
}

.cta-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.cta-btn:hover svg {
  transform: translateX(4px);
}

/* ---------- Section Headers ---------- */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}

/* ---------- Bento Grid Portfolio ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bento-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.bento-card .card-visual {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.85) saturate(1.1);
}

.bento-card:hover .card-visual img {
  transform: scale(1.08);
  filter: brightness(1) saturate(1.2);
}

.card-visual .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.card-info {
  padding: 1.25rem 1.5rem;
}

.card-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.card-info .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--color-accent);
}

/* Hover lift effect */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(167, 139, 250, 0.08);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

/* Animated glow border */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-2),
    var(--color-accent-3),
    var(--color-accent)
  );
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: glowShift 4s ease-in-out infinite;
  opacity: 0.5;
  transition: opacity 0.4s;
}

.glow-border:hover::before {
  opacity: 1;
}

@keyframes glowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.service-icon.mobile {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(167, 139, 250, 0.05));
  color: var(--color-accent);
}

.service-icon.ai {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.05));
  color: var(--color-accent-2);
}

.service-icon.uiux {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.15), rgba(244, 114, 182, 0.05));
  color: var(--color-accent-3);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- About Us ---------- */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content .about-text {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-md);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.about-visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.1);
}

.about-visual-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(56,189,248,0.1));
  pointer-events: none;
}

/* ---------- Page Loader ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(167, 139, 250, 0.15);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2), var(--color-accent-3));
  z-index: 200;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ---------- Cursor Glow ---------- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

.cursor-glow.visible {
  opacity: 1;
}

/* ---------- Noise Texture ---------- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  padding: 2rem;
  border-radius: var(--radius-md);
  position: relative;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-style: italic;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--color-accent);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-glass-border);
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

/* ---------- Tech Stack Marquee ---------- */
.marquee-section {
  padding: 3rem 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.marquee-label {
  text-align: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  margin: 0 0.75rem;
  border-radius: 100px;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s;
}

.marquee-item:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.15);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  border: none;
  color: var(--color-text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  transition: color 0.25s, transform 0.25s;
  text-decoration: none;
}

.footer-socials a:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* ---------- CTA floating animation ---------- */
@keyframes float-btn {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.cta-float {
  animation: float-btn 3s ease-in-out infinite;
}

.cta-float:hover {
  animation-play-state: paused;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero p {
    font-size: 1rem;
  }

  section {
    padding: 4rem 1.25rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cursor-glow {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .cta-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
  }

  .navbar {
    padding: 0.5rem 1rem;
  }
}
