:root {
  --primary: #00f0ff;
  --secondary: #7000df;
  --accent: #ff0099;
  --bg-dark: #050505;
  --surface: #0a0a0f;
  --glass: rgba(255, 255, 255, 0.08);
  --luau-keyword: #c586c0;
  --luau-string: #ce9178;
  --luau-number: #b5cea8;
  --luau-comment: #6a9955;
  --luau-func: #dcdcaa;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bg-cyber-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  perspective: 800px;
}

.bg-cyber-base {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(0, 240, 255, 0.06) 0%, transparent 45%),
              radial-gradient(ellipse 80% 50% at 80% 80%, rgba(255, 0, 153, 0.05) 0%, transparent 45%),
              radial-gradient(ellipse 80% 50% at 20% 70%, rgba(112, 0, 223, 0.06) 0%, transparent 45%),
              #030306;
}

.bg-cyber-grid-layer {
  position: absolute;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  transform-origin: 50% 50%;
  animation: grid-fly 8s linear infinite;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 0%, transparent 65%);
}

@keyframes grid-fly {
  0% { transform: perspective(800px) rotateX(72deg) translateY(0) scale(1.2); }
  100% { transform: perspective(800px) rotateX(72deg) translateY(36px) scale(1.2); }
}

.bg-cyber-grid-layer-2 {
  position: absolute;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(255, 0, 153, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 153, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  transform-origin: 50% 50%;
  animation: grid-fly-2 6s linear infinite;
  mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 0%, transparent 60%);
}

@keyframes grid-fly-2 {
  0% { transform: perspective(900px) rotateX(75deg) translateY(0) scale(1.1); }
  100% { transform: perspective(900px) rotateX(75deg) translateY(48px) scale(1.1); }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orb-breathe 4s ease-in-out infinite;
}

.bg-orb-1 {
  width: min(70vw, 560px);
  height: min(70vw, 560px);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.35) 0%, transparent 60%);
  top: -30%;
  left: -20%;
  animation-duration: 5s;
  animation-delay: 0s;
  box-shadow: 0 0 120px 40px rgba(0, 240, 255, 0.15);
}

.bg-orb-2 {
  width: min(60vw, 480px);
  height: min(60vw, 480px);
  background: radial-gradient(circle, rgba(255, 0, 153, 0.28) 0%, transparent 60%);
  top: 30%;
  right: -25%;
  animation-duration: 6s;
  animation-delay: -1.5s;
  box-shadow: 0 0 100px 35px rgba(255, 0, 153, 0.12);
}

.bg-orb-3 {
  width: min(50vw, 400px);
  height: min(50vw, 400px);
  background: radial-gradient(circle, rgba(112, 0, 223, 0.3) 0%, transparent 60%);
  bottom: -20%;
  left: 20%;
  animation-duration: 5.5s;
  animation-delay: -0.8s;
  box-shadow: 0 0 90px 30px rgba(112, 0, 223, 0.12);
}

@keyframes orb-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); filter: blur(60px); }
  50% { opacity: 0.85; transform: scale(1.15); filter: blur(70px); }
}


.bg-scanline-static {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  pointer-events: none;
  opacity: 0.6;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

body {
  font-feature-settings: "ss01", "ss02";
  min-height: max(100vh, 600px);
  transition: background-color 0.5s var(--ease-smooth);
}

.font-display {
  letter-spacing: 0.02em;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 6px var(--primary)); }
  50% { opacity: 1; filter: drop-shadow(0 0 14px var(--primary)); }
}

@keyframes border-flow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes code-line-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.luau-code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.35;
  background: linear-gradient(135deg, rgba(10, 10, 20, 0.95) 0%, rgba(5, 5, 15, 0.98) 100%);
  border: 1px solid var(--glass);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  position: relative;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.1), inset 0 1px 0 rgba(255,255,255,0.03);
}

.luau-code::before {
  content: "Luau";
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary);
  opacity: 0.7;
}

.luau-code .line {
  display: block;
  line-height: 1.35;
  animation: code-line-in 0.4s ease-out backwards;
}

.luau-code .line:nth-child(1) { animation-delay: 0.1s; }
.luau-code .line:nth-child(2) { animation-delay: 0.2s; }
.luau-code .line:nth-child(3) { animation-delay: 0.3s; }
.luau-code .line:nth-child(4) { animation-delay: 0.4s; }
.luau-code .line:nth-child(5) { animation-delay: 0.5s; }
.luau-code .line:nth-child(6) { animation-delay: 0.6s; }
.luau-code .line:nth-child(7) { animation-delay: 0.7s; }
.luau-code .line:nth-child(8) { animation-delay: 0.8s; }
.luau-code .line:nth-child(9) { animation-delay: 0.9s; }
.luau-code .line:nth-child(10) { animation-delay: 1s; }

.luau-code .kw { color: var(--luau-keyword); }
.luau-code .str { color: var(--luau-string); }
.luau-code .num { color: var(--luau-number); }
.luau-code .cm { color: var(--luau-comment); font-style: italic; }
.luau-code .fn { color: var(--luau-func); }

.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.12), transparent);
  animation: scanline 12s var(--ease-out-smooth) infinite;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.hero-card-live {
  position: relative;
  isolation: isolate;
}

.hero-card-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: hero-grid-move 8s linear infinite;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 65%);
}

@keyframes hero-grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(28px, 28px); }
}

.hero-card-glow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(50px);
  animation: hero-glow-breathe 5s ease-in-out infinite;
}

.hero-card-glow-1 {
  width: 55%;
  height: 55%;
  min-width: 220px;
  min-height: 220px;
  top: -15%;
  left: -15%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.4) 0%, transparent 60%);
  animation-delay: 0s;
}

.hero-card-glow-2 {
  width: 45%;
  height: 45%;
  min-width: 180px;
  min-height: 180px;
  bottom: -10%;
  right: -10%;
  background: radial-gradient(circle, rgba(255, 0, 153, 0.35) 0%, transparent 60%);
  animation-delay: -1.5s;
}

@keyframes hero-glow-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

.hero-card-grid-2 {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 0, 153, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 153, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  animation: hero-grid-move-2 10s linear infinite;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
}

@keyframes hero-grid-move-2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-36px, -36px); }
}

.hero-card-dots {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(0, 240, 255, 0.5) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 0, 153, 0.4) 1px, transparent 1px);
  background-size: 60px 50px, 80px 60px;
  background-position: 0 0, 20px 30px;
  animation: hero-dots-float 12s linear infinite;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, black 0%, transparent 70%);
}

@keyframes hero-dots-float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, -20px); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-smooth), transform 0.7s var(--ease-out-smooth);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.card-lift {
  transition: transform 0.45s var(--ease-out-smooth), box-shadow 0.45s var(--ease-out-smooth), border-color 0.35s var(--ease-smooth);
}

.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -16px rgba(0, 240, 255, 0.18), 0 0 0 1px rgba(0, 240, 255, 0.08);
}

.badge-bounty {
  background: linear-gradient(135deg, rgba(255, 0, 153, 0.15), rgba(112, 0, 223, 0.15));
  border: 1px solid rgba(255, 0, 153, 0.3);
  box-shadow: 0 0 20px rgba(255, 0, 153, 0.1);
}

.nav-bar {
  transition: background-color 0.4s var(--ease-smooth), border-color 0.4s var(--ease-smooth), backdrop-filter 0.4s var(--ease-smooth);
}

.nav-scrolled {
  background: rgba(5, 5, 8, 0.88);
  border-bottom-color: rgba(0, 240, 255, 0.12);
}

.btn-slant {
  position: relative;
  overflow: hidden;
}

.btn-slant .btn-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transform: translateX(-100%);
  transition: transform 0.35s ease-out;
  z-index: 0;
}

.btn-slant:hover .btn-fill {
  transform: translateX(0);
}

.btn-slant span {
  position: relative;
  z-index: 1;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

.stat-number {
  font-variant-numeric: tabular-nums;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  opacity: 0.4;
}

.page-flow {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .page-flow { padding-left: 2rem; padding-right: 2rem; }
}

.hero-art {
  position: relative;
  min-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 3rem;
}
@media (min-width: 768px) {
  .hero-art {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 3rem 0 4rem;
  }
  .hero-art .hero-content { text-align: left; align-items: flex-start; max-width: 52%; }
  .hero-art .hero-accent {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38%;
    max-width: 420px;
    height: 280px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(255, 0, 153, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%, 0 20%);
  }
}

.section-editorial {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  .section-editorial {
    grid-template-columns: 120px 1fr;
    gap: 2.5rem;
  }
  .section-editorial .section-label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--primary);
    opacity: 0.9;
    padding-top: 0.25rem;
    position: sticky;
    top: 6rem;
  }
}

.bento {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(100px, auto);
}
@media (min-width: 480px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .bento-span-2 { grid-column: span 2; }
}
@media (min-width: 640px) {
  .bento {
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
  }
  .bento .bento-span-2 { grid-column: span 2; }
  .bento .bento-row-2 { grid-row: span 2; }
  .bento .bento-tall { grid-row: span 2; }
}

.split-art {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .split-art {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
  .split-art .split-main { order: 1; }
  .split-art .split-aside { order: 2; margin-top: 2rem; }
}
@media (min-width: 1024px) {
  .split-art .split-aside { margin-top: 3rem; margin-left: -2rem; }
}

.card-diagonal {
  clip-path: polygon(0 0, 100% 0, 100% 92%, 98% 100%, 0 100%);
  overflow: hidden;
}

.panel-bleed {
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 2rem 1rem;
}
@media (min-width: 768px) {
  .panel-bleed { margin-left: -2rem; margin-right: -2rem; padding: 3rem 2rem; }
  .panel-bleed .panel-inset { max-width: 720px; margin-left: auto; margin-right: auto; }
}

.services-stack .service-card:nth-child(odd) { margin-left: 0; }
@media (min-width: 768px) {
  .services-stack .service-card:nth-child(odd) { margin-left: 0; margin-right: 8%; }
  .services-stack .service-card:nth-child(even) { margin-left: 8%; margin-right: 0; }
}

.typo-accent {
  font-family: var(--font-display, Orbitron), sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  user-select: none;
}

.showcase-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}
.showcase-bg {
  aspect-ratio: 21/9;
  min-height: 200px;
  background-size: cover;
  background-position: center;
}
.showcase-card {
  position: relative;
  margin: -3rem 1.5rem 1.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
}
@media (min-width: 768px) {
  .showcase-card { margin: -4rem 3rem 2rem; padding: 2rem; max-width: 480px; }
}

.cta-art {
  display: grid;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .cta-art {
    grid-template-columns: 1fr auto 1fr;
    text-align: left;
    align-items: center;
    gap: 3rem;
  }
  .cta-art .cta-visual {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(0, 240, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .cta-art .cta-text { order: 1; }
  .cta-art .cta-visual { order: 2; }
  .cta-art .cta-action { order: 3; text-align: right; }
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-smooth), opacity 0.3s var(--ease-smooth);
}

.mobile-menu.open {
  max-height: 320px;
}

a, button {
  transition: color 0.25s var(--ease-smooth), background-color 0.3s var(--ease-smooth), border-color 0.25s var(--ease-smooth), transform 0.3s var(--ease-out-smooth), box-shadow 0.3s var(--ease-smooth);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
