/* ============================================================
   NexForce AI — styles
   Palette: deep space dark + violet→cyan gradient accent
   ============================================================ */

:root {
  --bg:        #16171b;   /* graphite grey */
  --bg-soft:   #1d1e23;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.10);
  --text:      #f5f5f4;
  --muted:     #a1a1aa;   /* grey */
  --ink:       #16171b;   /* dark text, for use on yellow */
  --accent:    #ffd60a;   /* bright yellow */
  --accent-2:  #ffe14d;   /* lighter yellow */
  --grad:      linear-gradient(120deg, #ffe14d 0%, #ffd60a 45%, #ffb800 100%);
  --radius:    18px;
  --maxw:      1120px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav__logo { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

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

.accent { color: var(--accent-2); }

.gradient-text {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ============================================================
   Animated background
   ============================================================ */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, #23242a 0%, var(--bg) 60%); }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.38;
  will-change: transform;
}
.orb--1 { width: 520px; height: 520px; background: #ffd60a; top: -140px; left: -80px;  animation: float1 18s var(--ease) infinite; }
.orb--2 { width: 460px; height: 460px; background: #8a8a94; top: 30%;    right: -120px; animation: float2 22s var(--ease) infinite; }
.orb--3 { width: 400px; height: 400px; background: #ffb800; bottom: -160px; left: 35%;  animation: float3 20s var(--ease) infinite; }

@keyframes float1 { 50% { transform: translate(120px, 80px) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(-100px, 60px) scale(0.9); } }
@keyframes float3 { 50% { transform: translate(60px, -90px) scale(1.1); } }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(100% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(100% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* Mouse-follow spotlight */
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%),
              rgba(255, 214, 10, 0.10), transparent 45%);
  transition: background 0.2s ease;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.4s var(--ease);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav.scrolled {
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav.scrolled .nav__inner { padding: 14px 28px; }

.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.nav__logo-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--grad); box-shadow: 0 0 18px rgba(255, 214, 10, 0.55);
}

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.25s; position: relative; }
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }

.nav__cta {
  padding: 9px 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text) !important; transition: all 0.3s var(--ease);
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--ink) !important; box-shadow: 0 8px 24px rgba(255,214,10,0.30); transform: translateY(-1px); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s var(--ease); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  cursor: pointer; transition: all 0.3s var(--ease); border: 1px solid transparent;
}
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.btn--primary {
  background: var(--grad); color: var(--ink);
  background-size: 160% auto;
  box-shadow: 0 10px 30px rgba(255, 214, 10, 0.28);
}
.btn--primary:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 214, 10, 0.45); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 28px 80px; position: relative;
}
.hero__content { max-width: 860px; }
.hero__eyebrow {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; font-weight: 500; margin-bottom: 26px;
}
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; line-height: 1.05; }
.hero__title span { display: block; }
.hero__subtitle { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); margin: 26px auto 0; max-width: 620px; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

.hero__stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; margin-top: 64px; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat__num, .stat__plus { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__plus { display: inline; }
.stat__label { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

/* group num + plus on one line */
.stat { position: relative; }
.stat__num + .stat__plus { margin-left: 0; }

.scroll-hint { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); opacity: 0.6; transition: opacity 0.3s; }
.scroll-hint:hover { opacity: 1; }
.scroll-hint__mouse { display: block; width: 24px; height: 40px; border: 2px solid var(--muted); border-radius: 14px; position: relative; }
.scroll-hint__mouse span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--muted); border-radius: 2px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; } }

/* ============================================================
   Sections
   ============================================================ */
.section { max-width: var(--maxw); margin: 0 auto; padding: 110px 28px; }
.section__head { margin-bottom: 56px; }
.section__tag { color: var(--accent-2); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.section__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; margin-top: 12px; }

/* About */
.about { max-width: 720px; display: flex; flex-direction: column; gap: 20px; font-size: 1.12rem; color: var(--muted); }
.about__lead { font-size: 1.4rem; color: var(--text); line-height: 1.5; }
.about strong { color: var(--text); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
  position: relative; overflow: hidden; transform-style: preserve-3d;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity 0.4s;
}
.card:hover { transform: translateY(-8px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card__icon { font-size: 2rem; margin-bottom: 16px; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s;
}
.project:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); }
.project__media { height: 190px; position: relative; overflow: hidden; }
.project__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(22,23,27,0.45)); }
.project__media--1 { background: linear-gradient(135deg, #ffd60a, #ffb800); }
.project__media--2 { background: linear-gradient(135deg, #3f4046, #26272d); }
.project__media--3 { background: linear-gradient(135deg, #ffe14d, #6b6b73); }
.project__media { transition: transform 0.6s var(--ease); }
.project:hover .project__media { transform: scale(1.06); }
.project__body { padding: 24px 26px 28px; }
.project__cat { color: var(--accent-2); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.project__body h3 { font-size: 1.3rem; margin: 10px 0; }
.project__body p { color: var(--muted); font-size: 0.96rem; }
.project__link { display: inline-block; margin-top: 16px; color: var(--text); font-weight: 600; font-size: 0.92rem; transition: color 0.3s; }
.project:hover .project__link { color: var(--accent-2); }

/* Contact */
.contact { text-align: center; }
.contact__inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.contact__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; margin: 14px 0 18px; line-height: 1.1; }
.contact__text { color: var(--muted); font-size: 1.12rem; margin-bottom: 34px; }
.contact__socials { display: flex; gap: 28px; margin-top: 34px; }
.contact__socials a { color: var(--muted); font-weight: 500; transition: color 0.3s; position: relative; }
.contact__socials a:hover { color: var(--text); }

/* Hero logo */
.hero__logo {
  display: block; width: min(380px, 76vw); height: auto; margin: 0 auto 30px;
  border-radius: 18px; border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

/* Footer */
.footer { text-align: center; padding: 40px 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }

/* ============================================================
   Clients marquee
   ============================================================ */
.clients { max-width: var(--maxw); margin: 0 auto; padding: 8px 28px 30px; }
.clients__label { text-align: center; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 30px; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 62px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img {
  height: 30px; width: auto; object-fit: contain; flex: none;
  opacity: 0.6; filter: brightness(0) invert(1); transition: opacity 0.3s ease;
}
.marquee__track img:hover { opacity: 1; }
.marquee__track .txt-logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.35rem;
  color: #fff; opacity: 0.6; white-space: nowrap; transition: opacity 0.3s ease; flex: none;
}
.marquee__track .txt-logo:hover { opacity: 1; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px; padding: 40px; background: rgba(13, 13, 22, 0.96);
    backdrop-filter: blur(16px); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.2rem; }
  .nav__toggle { display: flex; z-index: 101; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero__stats { gap: 32px; }
  .section { padding: 80px 24px; }
}

/* ============================================================
   Respect reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
