/* ==========================================================================
   J Labs — modern theme
   ========================================================================== */

:root {
  --bg: #07090a;
  --bg-elev: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ee;
  --muted: #9aa49c;
  --brand: #47ad0b;
  --brand-2: #a3e635;
  --brand-3: #2dd4bf;
  --radius: 20px;
  --container: 1160px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  margin: 0;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Ambient background ---------- */

.bg-aurora,
.bg-grid,
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: var(--brand);
  top: -160px;
  left: -120px;
  animation: drift 22s var(--ease) infinite alternate;
}

.orb-2 {
  width: 440px;
  height: 440px;
  background: var(--brand-3);
  top: 10%;
  right: -160px;
  opacity: 0.25;
  animation: drift 28s var(--ease) infinite alternate-reverse;
}

.orb-3 {
  width: 380px;
  height: 380px;
  background: var(--brand-2);
  bottom: -180px;
  left: 30%;
  opacity: 0.18;
  animation: drift 32s var(--ease) infinite alternate;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.1); }
  100% { transform: translate(-40px, 120px) scale(0.95); }
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

.bg-noise {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s;
}

.btn i {
  transition: transform 0.3s var(--ease);
}

.btn:hover i.fa-arrow-right {
  transform: translateX(4px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #07130a;
  box-shadow: 0 8px 30px -8px rgba(71, 173, 11, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(163, 230, 53, 0.55);
}

.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 16px;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.nav.scrolled .nav-inner {
  background: rgba(10, 13, 12, 0.7);
  border-color: var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}

.nav-logo img {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:not(.btn) {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:not(.btn):hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }

.nav.open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  padding: 180px 0 80px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

.hero-title {
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.98;
  font-weight: 700;
  margin: 28px 0 24px;
  letter-spacing: -0.045em;
}

.gradient-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 45%, var(--brand-3) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  margin: 72px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  backdrop-filter: blur(10px);
}

.stat {
  padding: 22px 12px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat dt {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
}

.stat dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Logo marquee */
.marquee {
  margin-top: 88px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track img {
  height: 56px;
  width: auto;
  border-radius: 12px;
  opacity: 0.6;
  filter: grayscale(1);
  transition: opacity 0.3s, filter 0.3s;
}

.marquee-track img:hover {
  opacity: 1;
  filter: none;
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 14px)); }
}

/* ---------- Sections ---------- */

.section {
  padding: 110px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 700;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
  margin: 18px 0 0;
}

/* ---------- Cards (spotlight border) ---------- */

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease), border-color 0.3s;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(163, 230, 53, 0.7), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(71, 173, 11, 0.1), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-4px);
}

/* ---------- Work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.work-card {
  padding: 14px;
}

.work-logo {
  aspect-ratio: 3.4 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Round the image itself (like the marquee) so the logo's own background gets the curve */
.work-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  transition: transform 0.6s var(--ease);
}

.work-logo-light img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 6px;
}

.work-card:hover .work-logo img {
  transform: scale(1.05);
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px 4px;
}

.work-meta h3 {
  font-size: 18px;
  font-weight: 600;
}

.work-links {
  display: flex;
  gap: 8px;
}

.work-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.work-links a:hover {
  color: #07130a;
  background: var(--brand-2);
  border-color: var(--brand-2);
  transform: rotate(-8deg) scale(1.08);
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.member {
  padding: 28px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--brand), var(--brand-2), var(--brand-3), var(--brand));
  margin-bottom: 20px;
  transition: transform 0.5s var(--ease);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 3px solid var(--bg);
}

.member:hover .avatar {
  transform: scale(1.06) rotate(-3deg);
}

.member h3 {
  font-size: 19px;
  font-weight: 600;
}

.handle {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.member:hover .handle {
  color: var(--brand-2);
}

/* ---------- Testimonials ---------- */

.quotes {
  columns: 2;
  column-gap: 20px;
}

.quote {
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 32px;
}

.quote-mark {
  font-size: 28px;
  color: var(--brand-2);
  opacity: 0.8;
}

.quote blockquote {
  margin: 18px 0 28px;
  font-size: 16.5px;
  color: #d4dad5;
}

.quote blockquote p {
  margin: 0 0 14px;
}

.quote blockquote p:last-child {
  margin-bottom: 0;
}

.quote blockquote a {
  color: var(--brand-2);
  text-decoration: underline;
  text-decoration-color: rgba(163, 230, 53, 0.4);
  text-underline-offset: 4px;
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.quote figcaption img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}

.quote figcaption strong {
  display: block;
  font-weight: 600;
}

.quote figcaption span {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 80px 24px;
  border-radius: 32px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px circle at 50% 120%, rgba(71, 173, 11, 0.45), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.cta h2 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
}

.cta p {
  color: var(--muted);
  font-size: 18px;
  margin: 16px 0 32px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.footer-brand img {
  height: 24px;
  width: auto;
}

.footer-brand i {
  margin-right: 4px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.socials a:hover {
  color: #07130a;
  background: var(--brand-2);
  border-color: var(--brand-2);
  transform: translateY(-3px);
}

.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(10, 13, 12, 0.92);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav.open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav.open .nav-inner {
    background: rgba(10, 13, 12, 0.7);
    border-color: var(--border);
    backdrop-filter: blur(16px);
  }

  .nav-links a:not(.btn) {
    padding: 12px 16px;
  }

  .nav-cta {
    margin: 8px 0 0;
    justify-content: center;
  }

  .hero {
    padding: 140px 0 60px;
  }

  .section {
    padding: 80px 0;
  }

  .quotes {
    columns: 1;
  }

  .quote {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .team-grid {
    gap: 12px;
  }

  .avatar {
    width: 88px;
    height: 88px;
  }

  .member h3 {
    font-size: 16px;
  }

  .handle {
    font-size: 12px;
    word-break: break-all;
  }

  .stat dd {
    font-size: 12px;
  }

  .marquee-track img {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
