/* --- BASE STYLES --- */
:root {
  --bg: #050505;
  --card: rgba(255, 255, 255, 0.03);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --border: rgba(255, 255, 255, 0.08);
  --radius-lg: 32px;
  --radius-md: 20px;
  --max-width: 1200px;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-blur: 40px;
  --shadow-lg: 0 40px 100px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; background-color: var(--bg); color: var(--text); 
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif; 
  -webkit-font-smoothing: antialiased; line-height: 1.6; overflow-x: hidden;
}

h1, h2, h3, h4 { letter-spacing: -0.03em; font-weight: 800; line-height: 1.1; margin: 0; }
p { font-size: 1.125rem; color: var(--muted); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* TEXT GRADIENT */
.text-gradient {
  background: linear-gradient(to bottom right, #fff 30%, rgba(255,255,255,0.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* INTRO */
.intro { 
  position: fixed; inset: 0; z-index: 10000; background: var(--bg); 
  display: flex; align-items: center; justify-content: center; 
  transition: all 1s cubic-bezier(0.85, 0, 0.15, 1);
  overflow: hidden;
}
.intro.hide { 
  opacity: 0; visibility: hidden; pointer-events: none; 
  transform: scale(1.2);
  filter: blur(20px);
}
.intro-logo { 
  width: clamp(150px, 30vw, 300px); height: auto; 
  /* Use a static shadow or simpler filter */
  filter: drop-shadow(0 0 30px var(--accent-glow));
  animation: logoPulse 4s ease-in-out infinite;
  transition: transform 1s var(--easing);
  will-change: transform;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* LIQUID BACKGROUND SYSTEM (Subtle CSS Blobs) */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(circle at 50% 50%, #111 0%, #050505 100%);
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 80vw;
  height: 80vw;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  animation: blobFloat 20s infinite alternate ease-in-out;
  will-change: transform;
}
.blob-1 { 
  top: -20%; left: -10%; 
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%); 
}
.blob-2 { 
  bottom: -20%; right: -10%; 
  background: radial-gradient(circle, #7cf2ff 0%, transparent 70%); 
  animation-delay: -10s; 
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10vw, 10vh) scale(1.1); }
}

.color-bends-container {
  display: none;
}

/* NAV */
header.nav { 
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; 
  background: rgba(15, 17, 21, 0.4); backdrop-filter: blur(20px); 
  border-bottom: 1px solid var(--border); padding: 20px 0; 
  transition: all 0.4s var(--easing); 
}
header.nav.shrink { padding: 12px 0; border-bottom-color: rgba(255,255,255,0.12); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand-left { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 1.25rem; font-weight: 800; }
#headerLogo { width: 40px; height: 40px; border-radius: 10px; }

nav.primary { display: flex; gap: 32px; align-items: center; }
nav.primary a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.3s; }
nav.primary a:hover { color: #fff; }

/* BUTTONS */
.btn { 
  display: inline-flex; align-items: center; justify-content: center; 
  padding: 18px 40px; border-radius: 100px; font-weight: 600; 
  cursor: pointer; border: none; transition: all 0.4s var(--easing); 
  text-decoration: none; font-size: 1.05rem; 
}
.btn-primary { 
  background: #fff; color: #000; 
  box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}
.btn-primary:hover { 
  transform: translateY(-4px) scale(1.02); 
  background: var(--accent); color: #fff; 
  box-shadow: 0 15px 40px var(--accent-glow); 
}
.btn-ghost { 
  background: rgba(255,255,255,0.03); 
  color: #fff; 
  border: 1px solid var(--border); 
  backdrop-filter: blur(10px); 
}
.btn-ghost:hover { 
  transform: translateY(-4px);
  background: rgba(255,255,255,0.08); 
  border-color: rgba(255,255,255,0.2); 
}

/* LIQUID GLASS CARDS */
.liquid-glass, .project-card, .faq-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255,255,255,0.1);
  transition: all 0.5s var(--easing);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.liquid-glass::after, .project-card::after, .faq-card::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02; pointer-events: none;
}

/* HERO */
.hero { padding: 180px 0 100px; min-height: 90vh; display: flex; align-items: center; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title { 
  font-size: clamp(3.5rem, 7vw, 6.5rem); 
  margin-bottom: 24px; 
  line-height: 0.95;
  letter-spacing: -0.04em;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 540px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

.hero-CTAs {
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.6s;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.shuffle-wrap { min-height: 1.2em; display: inline-block; position: relative; }
.type-cursor { display: inline-block; width: 1ch; color: var(--accent); animation: blink-cursor 1s steps(1) infinite; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* PORTFOLIO */
.projects-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); justify-content: center; margin-top: 60px; position: relative; z-index: 2; }
.project-card { 
  padding: 24px; display: flex; flex-direction: column; gap: 20px; 
  max-width: 450px; margin: 0 auto; cursor: pointer;
  pointer-events: auto;
}
.project-card:hover { transform: translateY(-10px) scale(1.02); border-color: rgba(255,255,255,0.2); box-shadow: var(--shadow-lg); }
.project-thumb { width: 100%; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; transform: translateZ(30px); pointer-events: none; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--easing); }
.project-card:hover .project-thumb img { transform: scale(1.1); }
.project-info { display: flex; flex-direction: column; gap: 12px; transform: translateZ(20px); pointer-events: none; }
.project-info h3 { font-size: 1.6rem; margin: 0; color: #fff; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { background: rgba(59, 130, 246, 0.1); color: var(--accent); padding: 6px 14px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; }

/* FOOTER */
footer { padding: 100px 0 40px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; }
.footer-col h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 24px; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { text-decoration: none; color: var(--muted); transition: color 0.3s; font-size: 1rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.9rem; }

/* MOBILE NAVIGATION */
.hamburger { display: none; width: 32px; height: 32px; position: relative; border: none; background: transparent; cursor: pointer; z-index: 3000; }
.hamburger span { display: block; position: absolute; height: 2px; width: 24px; background: #fff; border-radius: 2px; left: 4px; transition: .3s var(--easing); }
.hamburger span:nth-child(1) { top: 10px; }
.hamburger span:nth-child(2) { top: 18px; }
.hamburger span:nth-child(3) { top: 26px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(20px); z-index: 2500;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 32px; opacity: 0; visibility: hidden; transition: all 0.5s var(--easing);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a { font-size: 2rem; font-weight: 800; text-decoration: none; color: #fff; transition: transform 0.4s var(--easing); transform: translateY(20px); }
.mobile-menu.is-open a { transform: translateY(0); }

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  nav.primary { display: none; }
  .hamburger { display: block; }
}

[data-reveal] { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--easing); }
[data-reveal].show { opacity: 1; transform: translateY(0); }

/* HERO GENERATING EFFECT */
.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: auto;
  font-family: "SF Pro Display", sans-serif;
  font-size: 1.2em;
  font-weight: 800;
  user-select: none;
  color: #fff;
  z-index: 2;
  letter-spacing: -0.02em;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-color: transparent;
  mask: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 6px,
    black 7px,
    black 8px
  );
}

.loader::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 50% 50%, #fff 0%, transparent 50%),
    radial-gradient(circle at 45% 45%, var(--accent) 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, #7cf2ff 0%, transparent 45%),
    radial-gradient(circle at 45% 55%, var(--accent) 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, #fff 0%, transparent 45%);
  mask: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent 10%,
    black 25%
  );
  animation:
    transform-animation 1s infinite alternate,
    opacity-animation 2s infinite;
  animation-timing-function: cubic-bezier(0.6, 0.8, 0.5, 1);
}

@keyframes transform-animation {
  0% { transform: translate(-55%); }
  100% { transform: translate(55%); }
}

@keyframes opacity-animation {
  0%, 100% { opacity: 0; }
  15% { opacity: 1; }
  65% { opacity: 0; }
}

.loader-letter {
  display: inline-block;
  opacity: 0;
  animation: loader-letter-anim 2s infinite linear;
  z-index: 2;
  white-space: pre; /* Preserve spaces */
}

@keyframes loader-letter-anim {
  0% { opacity: 0; }
  5% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    transform: scale(1.1) translateY(-2px);
  }
  20% { opacity: 0.2; }
  100% { opacity: 0; }
}

/* SPOTLIGHT GLOBAL */
[data-spotlight] { position: relative; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.08), transparent 40%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none; z-index: 1;
}
[data-spotlight]:hover::before { opacity: 1; }
/* MOBILE OPTIMIZATIONS */
@media (max-width: 767px) {
  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-inner { gap: 40px; }
  .hero-title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .hero-description { font-size: 1rem; margin-bottom: 30px; }
  .hero-CTAs { display: flex; flex-direction: column; gap: 15px; width: 100%; }
  .hero-CTAs .btn { width: 100%; padding: 15px 20px; font-size: 1rem; }
  
  #services { padding: 60px 0 !important; }
  #services .section-head h2 { font-size: 2rem !important; }
  #services .project-card { padding: 20px; }
  
  #pricing { padding: 60px 0 !important; }
  #pricing .section-head h2 { font-size: 2rem !important; }
  
  .contact-section { padding: 60px 0 !important; }
  .liquid-glass { padding: 40px 20px !important; }
  .contact-email { font-size: clamp(1.2rem, 6vw, 1.8rem) !important; flex-wrap: wrap; justify-content: center; }
  .contact-CTAs { flex-direction: column; width: 100%; gap: 15px !important; }
  .contact-CTAs .btn { width: 100%; padding: 15px 20px !important; }
  
  footer { padding: 60px 0 30px; }
  .footer-grid { gap: 40px; }
  .footer-col { text-align: center; }
  .footer-col h3 { margin-bottom: 16px; }
  .footer-bottom { margin-top: 40px; flex-direction: column; gap: 20px; }
}
