:root {
  --bg: #030816;
  --bg-2: #071330;
  --text: #eef3ff;
  --muted: #8b9cc0;
  --blue: #2f6bff;
  --blue-2: #5b8cff;
  --glow: #3d7bff;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);
  --radius: 22px;
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; letter-spacing: -0.02em; }
.muted { color: var(--muted); }

/* Ambient background glow */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 18%, rgba(47, 107, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 0% 60%, rgba(47, 107, 255, 0.10), transparent 70%),
    radial-gradient(40% 40% at 100% 60%, rgba(47, 107, 255, 0.10), transparent 70%);
}

/* Glass primitives */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(180deg, #4a82ff, #1f55e6);
  font-family: var(--font-head); font-size: 14px; font-weight: 500;
  box-shadow: 0 0 24px rgba(47, 107, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 36px rgba(47, 107, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-primary.big { padding: 14px 28px; font-size: 16px; margin-top: 8px; }

/* Nav */
.nav-wrap { position: fixed; top: 18px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 16px; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 760px; padding: 8px 8px 8px 22px; border-radius: 999px;
  background: rgba(8, 16, 38, 0.55);
}
.logo { font-family: var(--font-head); font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links a, .nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-btn:hover, .nav-btn[aria-expanded="true"] { color: var(--text); background: var(--glass-2); }
.has-drop { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 190px;
  padding: 6px; border-radius: 16px; background: rgba(8, 16, 38, 0.82);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown button {
  display: flex; align-items: center; justify-content: space-between;
  text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--muted);
}
.dropdown button:hover { color: var(--text); background: rgba(47, 107, 255, 0.18); }
.drop-sub { position: relative; }
.drop-sub > button { width: 100%; }
.dropdown.sub { top: -6px; left: calc(100% + 8px); }
.drop-sub:hover > .dropdown.sub { opacity: 1; transform: none; pointer-events: auto; }

/* Hero */
.hero { padding: 110px 16px 30px; text-align: center; overflow-x: clip; }
.carousel { overflow-x: clip; overflow-y: visible; touch-action: pan-y; }

/* Mobile menu (hidden on desktop) */
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; place-items: center; background: var(--glass-2); border: 1px solid var(--line); }
.mobile-menu {
  position: absolute; top: calc(100% + 10px); left: 16px; right: 16px;
  padding: 10px; border-radius: 22px; background: rgba(8, 16, 38, 0.92);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  max-height: calc(100svh - 110px); overflow-y: auto;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu .mm-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-2); padding: 10px 12px 4px; }
.mobile-menu button, .mobile-menu a { text-align: left; padding: 12px; border-radius: 12px; font-size: 16px; color: var(--text); }
.mobile-menu button:active, .mobile-menu a:active { background: rgba(47, 107, 255, 0.18); }
.mobile-menu .mm-sub { padding-left: 28px; font-size: 15px; color: var(--muted); }
.mobile-menu .btn-primary { margin-top: 8px; justify-content: center; }
.eyebrow { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.05; }
.grad {
  background: linear-gradient(90deg, #ffffff, #8fb2ff 60%, #4d7dff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); margin-top: 14px; }

/* Carousel */
.carousel {
  --sw: clamp(200px, calc((100svh - 300px) * 0.5625), 320px);
  position: relative; height: calc(var(--sw) * 16 / 9 + 24px); margin: 28px auto 0; max-width: 1100px;
}
.track { position: relative; height: 100%; }
.track.no-anim .slide { transition: none; }
.slide {
  position: absolute; top: 50%; left: 50%;
  width: var(--sw); height: calc(var(--sw) * 16 / 9); aspect-ratio: 9 / 16;
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s, opacity 0.8s;
  cursor: pointer;
}
.slide.active { border-color: rgba(91, 140, 255, 0.7); box-shadow: 0 0 60px rgba(47, 107, 255, 0.45); cursor: default; }
.slide .ph { position: absolute; inset: 0; }
.slide iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slide-cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  padding: 10px 14px; border-radius: 14px; text-align: left;
  background: rgba(3, 8, 22, 0.55); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.slide-cap strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: 14px; }
.slide-cap span { font-size: 12px; color: var(--muted); }
.progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--blue-2); z-index: 3; }
.slide.active .progress { animation: prog var(--dur, 7s) linear forwards; }
@keyframes prog { to { width: 100%; } }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  transition: background 0.2s;
}
.car-arrow:hover { background: var(--glass-2); }
.car-arrow.prev { left: 8px; }
.car-arrow.next { right: 8px; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.dots button { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); transition: width 0.3s, background 0.3s; }
.dots button.on { width: 40px; background: #fff; }

/* Placeholder media */
.ph {
  background:
    radial-gradient(80% 60% at 30% 20%, hsla(var(--h), 90%, 60%, 0.55), transparent 70%),
    radial-gradient(70% 60% at 80% 90%, hsla(calc(var(--h) + 30), 90%, 50%, 0.45), transparent 70%),
    linear-gradient(160deg, #0b1d45, #050b1a);
  display: grid; place-items: center;
}
.ph .play {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ph .ph-label { position: absolute; top: 14px; left: 14px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }

/* Sections */
.section { max-width: 1160px; margin: 0 auto; padding: 90px 16px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { margin-top: 6px; }

/* Brands */
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 8px; gap: 8px; }
.brand {
  height: 84px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 15px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent; transition: all 0.25s;
}
.brand img { max-height: 36px; max-width: 70%; opacity: 0.6; filter: grayscale(1) brightness(2); transition: all 0.25s; }
.brand:hover, .brand.on { color: #fff; background: rgba(47, 107, 255, 0.14); border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 30px rgba(47, 107, 255, 0.25); }
.brand:hover img, .brand.on img { opacity: 1; }

/* Category cards */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat {
  position: relative; height: 170px; padding: 20px; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.cat::before {
  content: ""; position: absolute; inset: auto -30% -60% -30%; height: 120%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(47, 107, 255, 0.35), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.cat:hover { transform: translateY(-3px); border-color: rgba(91, 140, 255, 0.45); }
.cat:hover::before, .cat.on::before { opacity: 1; }
.cat.on { border-color: rgba(91, 140, 255, 0.9); background: rgba(47, 107, 255, 0.12); }
.cat h3 { font-size: 20px; position: relative; }
.cat span { font-size: 13px; color: var(--muted); position: relative; }
.cat .arrow { position: absolute; top: 18px; right: 18px; opacity: 0.6; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; min-height: 8px; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); background: var(--glass); transition: all 0.2s;
}
.chip:hover { color: var(--text); }
.chip.on { color: #fff; background: rgba(47, 107, 255, 0.85); border-color: var(--blue-2); }
.chip.clear { display: inline-flex; gap: 6px; align-items: center; }

/* Project grid */
.grid { columns: 3 280px; column-gap: 14px; margin-top: 18px; }
.grid.vertical { columns: 4 200px; }
.section, .contact { scroll-margin-top: 70px; }
.card {
  break-inside: avoid; margin-bottom: 14px; padding: 10px; width: 100%; text-align: left;
  display: block; transition: transform 0.25s, border-color 0.25s;
  animation: fadeUp 0.5s both;
}
.card:hover { transform: translateY(-3px); border-color: rgba(91, 140, 255, 0.5); }
.card .ph { position: relative; border-radius: 14px; overflow: hidden; }
.card .ph.r169 { aspect-ratio: 16 / 9; }
.card .ph.r916 { aspect-ratio: 9 / 16; }
.card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 6px 6px; }
.card-body h4 { font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.card-body p { font-size: 12px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: rgba(47, 107, 255, 0.14); border: 1px solid rgba(91, 140, 255, 0.55); color: #bcd2ff;
}
.empty { color: var(--muted); padding: 30px 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.role { padding: 24px; }
.role-n { font-family: var(--font-head); color: var(--blue-2); font-size: 13px; }
.role h3 { font-size: 20px; margin: 30px 0 6px; }
.role p { font-size: 14px; color: var(--muted); }

/* Contact */
.contact { position: relative; padding: 140px 16px 40px; margin-top: 60px; overflow: hidden; text-align: center; }
.arc {
  position: absolute; left: 50%; top: 200px; width: 1400px; height: 1400px; transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(160, 190, 255, 0.9);
  box-shadow: 0 0 40px 6px rgba(61, 123, 255, 0.8), 0 0 140px 30px rgba(47, 107, 255, 0.45), inset 0 0 120px 20px rgba(47, 107, 255, 0.25);
  pointer-events: none;
}
.contact-card { position: relative; max-width: 620px; margin: 0 auto; padding: 46px 30px; background: rgba(8, 16, 38, 0.6); }
.contact-card h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.contact-card .muted { margin-bottom: 18px; }
.socials { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }
.social { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: background 0.2s, box-shadow 0.2s; }
.social:hover { background: rgba(47, 107, 255, 0.3); box-shadow: 0 0 24px rgba(47, 107, 255, 0.5); }
.footer { position: relative; margin-top: 60px; font-size: 13px; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 6, 18, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { position: relative; width: min(960px, 100%); max-height: 92vh; overflow: auto; padding: 14px; background: rgba(8, 16, 38, 0.85); }
.modal-box.tall { width: min(440px, 100%); }
.modal-media { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; }
.modal-box.tall .modal-media { aspect-ratio: 9 / 16; max-height: 72vh; margin: 0 auto; }
.modal-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-media .ph { position: absolute; inset: 0; }
.modal-info { padding: 16px 6px 6px; }
.modal-info h3 { font-size: 22px; }
.modal-x { position: absolute; top: 22px; right: 22px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }

/* Responsive */
@media (max-width: 900px) {
  .cats, .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav-wrap { top: 12px; }
  .nav { padding: 6px 6px 6px 18px; gap: 8px; }
  .logo { font-size: 14px; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
  .hero { padding-top: 96px; }
  .section { padding-top: 64px; }
  .grid { columns: 1; }
  .grid.vertical { columns: 2; column-gap: 10px; }
  .grid.vertical .card { margin-bottom: 10px; padding: 8px; }
  .roles { grid-template-columns: 1fr; }
  .role h3 { margin-top: 14px; }
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { height: 70px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .contact { padding-top: 100px; }
  .contact-card { padding: 36px 20px; }
  .btn-primary.big { font-size: 15px; padding: 13px 22px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .carousel { --sw: clamp(190px, 58vw, 240px); }
  .car-arrow { display: none; }
  .cat { height: 130px; padding: 16px; }
  .cat h3 { font-size: 17px; }
  .dropdown.sub { left: 0; top: 100%; }
  .arc { width: 900px; height: 900px; top: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
