/* -------------------------------
   ENTIM LABS — Futuristic Theme
   ------------------------------- */

:root {
  --bg: #0b0f14;
  --panel: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.07);
  --text: #e6f0ff;
  --muted: #9fb3c8;
  --primary: #22d3ee; /* cyan */
  --secondary: #a855f7; /* violet */
  --accent: #67e8f9; /* light cyan */
  --danger: #ff6b6b;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.03);
  --glow: 0 0 20px rgba(34, 211, 238, 0.45), 0 0 40px rgba(168, 85, 247, 0.35);

  --container: clamp(1024px, 80vw, 1200px);
  --gutter: clamp(16px, 3vw, 28px);

  --speed: 0.6s;
}

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

html, body { height: 100%; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(168,85,247,0.18), transparent 60%),
              radial-gradient(1000px 600px at 10% 0%, rgba(34,211,238,0.16), transparent 60%),
              var(--bg);
  overflow-x: hidden;
}

/* Utility */
.container { width: min(var(--container), 100% - 2*var(--gutter)); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }

.no-js .reveal { opacity: 1; transform: none; }

/* Aurora blobs */
.aurora {
  position: fixed;
  filter: blur(60px);
  width: 60vmax; height: 60vmax;
  z-index: -1; pointer-events: none; opacity: 0.28;
  background: radial-gradient(circle at 30% 30%, var(--secondary), transparent 60%),
              radial-gradient(circle at 70% 70%, var(--primary), transparent 60%);
  mix-blend-mode: screen;
}
.aurora.a1 { top: -20vmax; left: -10vmax; animation: float1 18s ease-in-out infinite alternate; }
.aurora.a2 { bottom: -25vmax; right: -15vmax; animation: float2 22s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(6vmax, 4vmax) rotate(10deg); } }
@keyframes float2 { to { transform: translate(-5vmax, -3vmax) rotate(-8deg); } }

/* Scroll progress */
#progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 9999;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 16px rgba(34,211,238,0.6);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(140%) blur(10px);
  background: linear-gradient(to bottom, rgba(8,12,17,0.75), rgba(8,12,17,0.35));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo { color: var(--primary); }
.brand-text { font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.25rem; letter-spacing: 0.3px; }

.nav { position: relative; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow); cursor: pointer;
}
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: #d7e6ff; margin: 5px auto; transition: transform .2s ease; }

.nav-menu { display: flex; gap: 18px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 12px; }
.nav-menu a:hover { background: var(--panel); }
.nav-cta a { box-shadow: var(--glow); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    position: absolute; right: 0; top: calc(100% + 12px);
    background: rgba(10,14,20,0.85);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow);
    padding: 12px; border-radius: 16px;
    display: none; flex-direction: column; min-width: 220px;
  }
  .nav-menu.open { display: flex; }
}

/* Hero */
.hero { padding: clamp(64px, 10vw, 140px) 0 clamp(24px, 6vw, 64px); position: relative; }
.hero-content { max-width: 840px; }
h1 { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; line-height: 1.1; font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 16px; }
.glow { text-shadow: 0 6px 60px rgba(168, 85, 247, 0.25); }
.gradient-text { background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-badge { background: linear-gradient(90deg, var(--secondary), var(--primary)); padding: 3px 10px; border-radius: 999px; font-size: 0.6em; letter-spacing: 0.3px; }

.lead { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem); max-width: 60ch; }
.cta-row { display: flex; gap: 12px; margin-top: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.10);
  background: var(--glass); color: var(--text); text-decoration: none; font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.2); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(90deg, rgba(34,211,238,0.15), rgba(168,85,247,0.15)); border-color: rgba(168,85,247,0.25); box-shadow: var(--glow); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.12); }
.btn-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 28px; }
.stat { background: var(--panel); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 14px; text-align: center; }
.stat .num { font-family: "Space Grotesk"; font-weight: 700; font-size: clamp(1.1rem, 3vw, 1.6rem); display: block; }
.stat .label { color: var(--muted); font-size: 0.9rem; }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.marquee-track { display: inline-flex; gap: 36px; padding: 12px var(--gutter); animation: marquee 28s linear infinite; white-space: nowrap; }
.marquee span { opacity: 0.8; letter-spacing: 0.3px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Section headers */
.section-head { margin-bottom: 20px; }
.section-title { font-family: "Space Grotesk"; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 4px; }
.section-sub { color: var(--muted); margin: 0; }

/* Cards */
.grid.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; align-items: stretch;
}
.card {
  position: relative; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow); transform-style: preserve-3d; will-change: transform;
}
.card h3 { margin: 6px 0 8px; font-family: "Space Grotesk"; }
.card p { color: var(--muted); }
.card .chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0; list-style: none; }
.chip-list li { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; }
.card .card-decor {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 140deg, rgba(34,211,238,0.25), rgba(168,85,247,0.25), transparent 30%, transparent 70%, rgba(34,211,238,0.25));
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px; opacity: 0.55;
}

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.work-card {
  background: var(--glass); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.work-card .thumb { height: 180px; }
.gradient-1 { background: linear-gradient(135deg, #0ea5e9, #a855f7); }
.gradient-2 { background: linear-gradient(135deg, #22c55e, #22d3ee); }
.gradient-3 { background: linear-gradient(135deg, #f97316, #a855f7); }
.work-meta { padding: 18px; }
.work-meta h3 { margin: 0 0 6px; font-family: "Space Grotesk"; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.timeline li {
  background: var(--glass); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius);
  padding: 18px; position: relative;
}
.timeline .step {
  position: absolute; top: -10px; left: -10px; background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #061016; font-weight: 700; font-family: "Space Grotesk"; padding: 6px 10px; border-radius: 999px;
}

/* Contact form */
.contact-form { max-width: 760px; margin-inline: auto; }
.form-row { display: grid; gap: 8px; margin: 10px 0; }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); color: var(--text);
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus { border-color: rgba(168,85,247,0.55); box-shadow: 0 0 0 3px rgba(168,85,247,0.25); }
input:invalid:focus, textarea:invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,107,107,0.25); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.form-status { color: var(--muted); min-height: 1.2em; }

/* Footer */
.site-footer { padding: 42px 0; border-top: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
.footer-inner nav { display: flex; gap: 14px; }
.small { color: var(--muted); font-size: 0.9rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--speed) ease, transform var(--speed) ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Tilt base (JS adds transform) */
.tilt { transform: perspective(900px) rotateX(0deg) rotateY(0deg); transition: transform 0.15s ease; }

/* Canvas background */
#bg-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block;
}

/* Responsive */
@media (max-width: 1200px) {
  .grid.cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .work-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .grid.cards, .work-grid { grid-template-columns: 1fr; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  #bg-canvas { display: none; }
  .aurora { display: none; }
}
