:root {
  --red: #df2531;
  --red-dim: rgba(223,37,49,0.12);
  --red-glow: rgba(223,37,49,0.4);
  --white: #ffffff;
  --gray: #777;
  --dark: #0a0a0a;
  --card: #111;
  --border: rgba(255,255,255,0.07);
  --radius: 16px;
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.25);
  --t: 0.5s var(--spring);
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: auto; }
body {
  background: var(--dark);
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

/* ============================================
   MESH GRADIENT BACKGROUND
   ============================================ */
.mesh-gradient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: #000;
}
.mesh-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223,37,49,0.15) 0%, rgba(0,0,0,0) 70%);
  transform: translate(-50%, -50%);
  filter: blur(60px);
  will-change: transform;
}

.en-font { font-family: 'Open Sans', sans-serif; }
.mono-font { font-family: 'JetBrains Mono', monospace; }
a { text-decoration: none; color: inherit; cursor: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 5%; position: relative; z-index: 2; }

/* --- Typography & Neon Glow --- */
h1, h2, h3 { font-weight: 900; line-height: 1.05; letter-spacing: -2px; }
h2 { font-size: clamp(2.8rem, 5vw, 5rem); margin-bottom: 1rem; }

.mokoto-glow {
  text-shadow: 0 0 10px rgba(223,37,49,0.6), 0 0 20px rgba(223,37,49,0.3);
  animation: neonFlicker 3s infinite alternate;
}

@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 10px rgba(223,37,49,0.6), 0 0 20px rgba(223,37,49,0.3);
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.8;
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor-caret {
  width: 2px;
  height: 28px;
  background: var(--red);
  border-radius: 1px;
  animation: blink 1s step-end infinite;
  transition: width 0.3s var(--spring), height 0.3s var(--spring), border-radius 0.3s var(--spring), opacity 0.3s ease;
}

.custom-cursor.is-button .cursor-caret {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--red);
  animation: none;
}

.custom-cursor.is-text .cursor-caret {
  animation: blink 0.7s step-end infinite;
  background: var(--red);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: var(--white);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--t);
  border: 2px solid var(--red);
}
.btn-primary:hover {
  background: transparent;
  color: var(--red);
  box-shadow: 0 0 40px var(--red-glow);
  transform: scale(1.05);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--t);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--white);
  transform: scale(1.05);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 8px 8px 8px 20px;
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--white);
  padding-left: 0.5rem;
}
.nav-logo .blink {
  color: var(--red);
  animation: blink 1s step-end infinite;
}

.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  transition: var(--t);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.05); }

.nav-btn {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 100px;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  transition: var(--t);
}
.nav-btn:hover { box-shadow: 0 0 24px var(--red-glow); transform: scale(1.05); }

.mobile-menu-btn { display: none; font-size: 1.1rem; cursor: none; color: var(--gray); padding: 0.5rem 0.8rem; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 140px 0 80px;
}

/* Noise texture overlay */
.hero-noise {
  position: fixed;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' 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;
  z-index: 100;
}

.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Code block border wrapper for Canvas */
#hero-glass-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  background: rgba(17,17,17,0.3);
  backdrop-filter: blur(10px);
  z-index: 1;
  min-height: 380px;
  overflow: hidden;
}

.hero-text-content {
  padding: 3rem;
  position: relative;
  z-index: 2;
}

#pixi-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
#pixi-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  mix-blend-mode: screen;
}

.code-label {
  position: absolute;
  top: 10px;
  right: 24px;
  background: transparent;
  padding: 0 10px;
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 1px;
}

.hero-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.hero-line {
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -3px;
  color: var(--white);
}
.hero-red { color: var(--red); }

/* Stagger animations */
.stagger-1, .stagger-2, .stagger-3, .stagger-4, .stagger-5 {
  opacity: 0;
  transform: translateY(50px);
  animation: slideUp 1s var(--spring) forwards;
}
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.22s; }
.stagger-3 { animation-delay: 0.34s; }
.stagger-4 { animation-delay: 0.5s; }
.stagger-5 { animation-delay: 0.65s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  max-width: 640px;
}
.hero-sub p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--red);
  display: block;
  letter-spacing: -1px;
}
.hero-stat-label { font-size: 0.85rem; color: var(--gray); }
.hero-stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ============================================
   MARQUEE TICKER
   ============================================ */
.marquee-strip {
  background: var(--red);
  overflow: hidden;
  padding: 12px 0;
  position: relative;
  z-index: 10;
}
.marquee-track {
  display: flex;
  width: max-content;
}
.marquee-block {
  display: flex;
  flex-shrink: 0;
  animation: marqueeLoop 20s linear infinite;
  will-change: transform;
}
.marquee-item {
  padding: 0 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
@keyframes marqueeLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================
   SECTIONS
   ============================================ */
section { padding: 8rem 0; position: relative; }
.section-header { margin-bottom: 4rem; }

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

/* ============================================
   BENTO GRID — Services
   ============================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.bento-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s var(--ease);
}
.bento-card:hover {
  border-color: rgba(223,37,49,0.3);
  transform: translateY(-4px);
}
.bento-wide {
  grid-column: span 2;
}

/* Spotlight glow effect */
.spotlight {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.bento-card:hover .spotlight { opacity: 1; }

.bento-num {
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.bento-icon {
  font-size: 2rem;
  color: rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
  transition: color 0.4s ease;
  position: relative;
  z-index: 1;
}
.bento-card:hover .bento-icon { color: var(--red); }

.bento-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}
.bento-card p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ============================================
   FOUNDER
   ============================================ */
.founder-section { background: #0d0d0d; }
.founder-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}

.founder-quote {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -1px;
}
.founder-quote span { color: var(--red); }

.founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red-dim);
  border: 1px solid rgba(223,37,49,0.25);
  color: var(--red);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.founder-bio {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  border-right: 3px solid var(--red);
  padding-right: 1.5rem;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio { background: #080808; }

.portfolio-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.portfolio-label h3 { font-size: 1.5rem; letter-spacing: -1px; }
.count-badge {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

/* Horizontal gallery marquee */
.gallery-marquee {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  direction: ltr;
}
.gallery-track {
  display: flex;
  gap: 0.8rem;
  animation: galleryScroll 40s linear infinite;
  width: max-content;
  will-change: transform;
}
.gallery-track img {
  height: 220px;
  width: auto;
  min-width: 180px;
  border-radius: 12px;
  cursor: none;
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
  flex-shrink: 0;
  display: block;
}
.gallery-track img:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px var(--red), 0 12px 40px rgba(0,0,0,0.5);
  z-index: 2;
  position: relative;
}
@keyframes galleryScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Pause on hover */
.gallery-marquee:hover .gallery-track {
  animation-play-state: paused;
}

/* Browser frame */
.browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.browser-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: border-color 0.4s ease, transform 0.4s var(--ease), box-shadow 0.4s ease;
}
.browser-frame:hover {
  border-color: var(--red);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(223,37,49,0.15);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 10px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-url {
  font-size: 0.7rem;
  color: var(--gray);
  background: rgba(255,255,255,0.04);
  padding: 3px 12px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
  letter-spacing: 0.5px;
}

.browser-viewport {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.browser-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease);
}
.browser-frame:hover .browser-viewport img {
  transform: scale(1.05);
}

/* ============================================
   TEAM — IDE Style
   ============================================ */
.team-section { background: #0d0d0d; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s var(--ease);
}
.team-card:hover {
  border-color: rgba(223,37,49,0.3);
  transform: translateY(-4px);
}

.team-role-tag {
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  color: var(--red);
  background: var(--red-dim);
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.team-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.team-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}
.team-tags span {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  transition: var(--t);
}
.team-card:hover .team-tags span {
  border-color: rgba(223,37,49,0.3);
  color: rgba(255,255,255,0.7);
}

/* ============================================
   CTA
   ============================================ */
.cta-section { background: #080808; position: relative; overflow: hidden; padding: 10rem 0; }

.cta-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(10rem, 20vw, 22rem);
  font-weight: 900;
  color: rgba(255,255,255,0.02);
  letter-spacing: -8px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(4rem, 10vw, 9rem);
  letter-spacing: -5px;
  margin-bottom: 1.5rem;
  line-height: 0.85;
}
.cta-title span { color: var(--red); }

.cta-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.45);
  max-width: 480px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #060606;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--white);
}
.footer-logo span { color: var(--red); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 1.2rem;
  color: var(--gray);
  transition: var(--t);
}
.footer-links a:hover { color: var(--white); }

.footer-copy {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 2px;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.lightbox.active { display: flex; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transition: opacity 0.2s ease;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.2rem;
  color: rgba(255,255,255,0.5);
  cursor: none;
  z-index: 2;
  transition: var(--t);
  line-height: 1;
}
.lightbox-close:hover { color: var(--red); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: span 2; }
  .founder-grid { grid-template-columns: 1fr; gap: 3rem; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .custom-cursor { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
  .hero-stats { gap: 1.5rem; }
}

@media (max-width: 600px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .team-grid { grid-template-columns: 1fr; }
  .browser-grid { grid-template-columns: 1fr; }
  .gallery-track img { height: 160px; }
  .hero-code-block { padding: 1.5rem; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat-sep { display: none; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .footer-content { flex-direction: column; text-align: center; }
}
