:root {
  --bg-0: #0B0B0B;
  --bg-1: #111111;
  --bg-2: #161616;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-1: #FFFFFF;
  --text-2: #CFCFCF;
  --text-3: #8A8A8A;
  --accent: #00BFFF;
  --accent-2: #4F8CFF;
  --glow: rgba(0, 191, 255, 0.25);
  --grid-color: rgba(255, 255, 255, 0.035);
}

[data-theme="blueprint"] {
  --bg-0: #050B1A;
  --bg-1: #0A1430;
  --bg-2: #0F2047;
  --card: rgba(0, 240, 255, 0.03);
  --card-hover: rgba(0, 240, 255, 0.06);
  --border: rgba(0, 240, 255, 0.1);
  --border-strong: rgba(0, 240, 255, 0.2);
  --text-1: #E0F2FE;
  --text-2: #BAE6FD;
  --text-3: #7DD3FC;
  --accent: #00F0FF;
  --accent-2: #1E88E5;
  --glow: rgba(0, 240, 255, 0.2);
  --grid-color: rgba(0, 240, 255, 0.06);
}

[data-theme="terminal"] {
  --bg-0: #000000;
  --bg-1: #0A0A0A;
  --bg-2: #121212;
  --card: rgba(57, 255, 20, 0.03);
  --card-hover: rgba(57, 255, 20, 0.06);
  --border: rgba(57, 255, 20, 0.12);
  --border-strong: rgba(57, 255, 20, 0.25);
  --text-1: #E8FDE8;
  --text-2: #A3FFA3;
  --text-3: #52D052;
  --accent: #39FF14;
  --accent-2: #00A86B;
  --glow: rgba(57, 255, 20, 0.2);
  --grid-color: rgba(57, 255, 20, 0.04);
}

[data-theme="cyber"] {
  --bg-0: #0F021B;
  --bg-1: #1B0530;
  --bg-2: #280B42;
  --card: rgba(255, 0, 127, 0.04);
  --card-hover: rgba(255, 0, 127, 0.08);
  --border: rgba(0, 255, 255, 0.1);
  --border-strong: rgba(255, 0, 127, 0.22);
  --text-1: #FFE4E6;
  --text-2: #FDA4AF;
  --text-3: #FB7185;
  --accent: #FF007F;
  --accent-2: #00FFFF;
  --glow: rgba(255, 0, 127, 0.22);
  --grid-color: rgba(0, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.surface {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.surface-hover {
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

h1,
h2,
h3,
.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

::selection {
  background: var(--glow);
  color: #fff;
}

/* ---- landing hero gradient blinds ---- */
.gradient-blinds-container,
#hero-blinds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* ---- DepthText 3D Typography ---- */
.depth-text {
  display: inline-block;
  perspective: var(--depth-text-perspective, 900px);
  perspective-origin: 50% 48%;
  isolation: isolate;
  user-select: none;
}

.depth-text__stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(-2.4deg) rotateY(3.15deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.depth-text__layer,
.depth-text__face {
  grid-area: 1 / 1;
  display: inline-block;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: var(--depth-text-font-size, clamp(2.4rem, 8vw, 6.2rem));
  font-weight: var(--depth-text-font-weight, 900);
  line-height: 0.95;
  letter-spacing: -0.045em;
  white-space: nowrap;
  user-select: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.depth-text__layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(0.95) brightness(0.92);
  pointer-events: none;
}

.depth-text__face {
  position: relative;
  z-index: 1;
  color: var(--depth-text-face-color, #f8fafc);
  text-shadow: var(--depth-text-shadow);
  transform: translateZ(0.6px);
}

@media (hover: hover) and (pointer: fine) {
  .depth-text {
    cursor: default;
  }
}

/* ---- WarpText styling ---- */
.warp-text-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1200px;
  height: 120px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .warp-text-container {
    height: 160px;
  }
}

@media (min-width: 1024px) {
  .warp-text-container {
    height: 200px;
  }
}

.warp-text-container canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- RotatingText Component Styling ---- */
.rotating-text-wrapper {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.text-rotate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #00e7ff 0%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: none;
  box-sizing: border-box;
}

.text-rotate-group {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.text-rotate-group.entering {
  opacity: 0;
}

.text-rotate-group.current {
  opacity: 1;
}

.text-rotate-group.exiting {
  opacity: 0;
}

.text-rotate-word {
  display: inline-flex;
}

.text-rotate-element {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.text-rotate-group.entering .text-rotate-element {
  transform: translateY(100%);
  opacity: 0;
}

.text-rotate-group.current .text-rotate-element {
  transform: translateY(0);
  opacity: 1;
}

.text-rotate-group.exiting .text-rotate-element {
  transform: translateY(-120%);
  opacity: 0;
}

.text-rotate-space {
  display: inline-block;
  width: 0.35em;
}

/* ---- shared surfaces ---- */
.surface {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
}

.btn-primary {
  background: var(--text-1);
  color: #08090A;
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text-1);
}

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}

.nav-link {
  position: relative;
  color: var(--text-2);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--accent);
}

.tech-badge svg,
.tech-badge img {
  filter: grayscale(1) opacity(0.55);
}

.timeline-line {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.14) 8%, rgba(255, 255, 255, 0.14) 92%, transparent);
}

.timeline-dot {
  box-shadow: 0 0 0 4px var(--bg-0), 0 0 20px 2px var(--glow);
}

.scroll-track {
  padding: 16px;
  margin: -16px;
}

.scroll-track::-webkit-scrollbar {
  height: 6px;
}

.scroll-track::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-1);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.grain {
  position: relative;
}

/* ---- scroll progress ---- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 8px var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.1s ease-out;
  pointer-events: none;
}

/* ---- theme switcher ---- */
#theme-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-2);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#theme-switcher:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  color: var(--text-1);
  box-shadow: 0 0 15px var(--glow);
  transform: scale(1.05);
}

/* ---- code background ---- */
#code-bg span {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ---- project card hover enhancements ---- */
.project-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-default-view {
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.project-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
  z-index: 5;
  padding: 24px;
  border-radius: inherit;
  /* always match the card's corner radius */
}

.surface-hover:hover .project-default-view {
  opacity: 0 !important;
  /* Hide completely to prevent overlaps and clashing with overlays */
}

.surface-hover:hover .project-hover-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.surface-hover {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  /* explicit — matches Tailwind rounded-2xl */
  will-change: transform;
  /* GPU layer → border-radius clips correctly under scale() */
}

.surface-hover:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: var(--border-strong) !important;
  border-radius: 1rem !important;
  /* preserve corners explicitly during hover */
  transform: translateY(-6px) scale(1.025) !important;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.75), 0 0 30px var(--glow) !important;
}

/* Device Mockups (Pure CSS) */
.device-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 116px;
  /* Reduced from 140px to give more breathing room */
  position: relative;
  overflow: hidden;
}

.phone-mockup {
  width: 64px;
  /* Slightly reduced to fit card perfectly */
  height: 110px;
  /* Slightly reduced to fit card perfectly */
  border: 2px solid var(--text-3);
  border-radius: 12px;
  position: relative;
  background: #000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--text-3);
  border-radius: 99px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 6px 3px 3px 3px;
}

.laptop-mockup {
  width: 110px;
  /* Reduced from 140px to fit card perfectly */
  height: 70px;
  /* Reduced from 85px to fit card perfectly */
  border: 2px solid var(--text-3);
  border-radius: 6px;
  background: #000;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.laptop-screen {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 3px;
}

.laptop-base {
  width: 130px;
  /* Reduced from 160px to fit card perfectly */
  height: 5px;
  background: var(--text-3);
  border-radius: 0 0 4px 4px;
  margin-top: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Animations in Mockups */
@keyframes courtBall {
  0% {
    transform: translate(10px, 80px);
  }

  50% {
    transform: translate(50px, 20px);
  }

  100% {
    transform: translate(10px, 80px);
  }
}

.court-ball {
  width: 4px;
  height: 4px;
  background: #adff2f;
  border-radius: 50%;
  position: absolute;
  animation: courtBall 4s infinite ease-in-out;
  box-shadow: 0 0 6px #adff2f;
}

@keyframes flashUmpire {

  0%,
  100% {
    opacity: 0;
  }

  45%,
  55% {
    opacity: 1;
  }
}

.court-alert {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8px;
  font-weight: bold;
  color: #ff3366;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #ff3366;
  animation: flashUmpire 4s infinite step-end;
}

@keyframes waveGrow {

  0%,
  100% {
    height: 10px;
  }

  50% {
    height: 35px;
  }
}

.wave-bar {
  width: 2px;
  height: 10px;
  background: var(--accent);
  border-radius: 1px;
  animation: waveGrow 1.5s infinite ease-in-out;
}

/* scrolling code panel */
.code-panel {
  width: 130px;
  height: 104px;
  /* Reduced from 120px to fit card perfectly */
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  padding: 8px;
  font-family: 'Space Grotesk', monospace;
  font-size: 8px;
  color: var(--text-2);
  overflow: hidden;
  position: relative;
}

@keyframes scrollCode {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

.code-scroller {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: scrollCode 12s infinite linear;
}

/* ---- founder accordion cards ---- */
.founder-card-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
}

@media (min-width: 768px) {
  .founder-card-container {
    flex-direction: row;
    align-items: stretch;
  }
}

.founder-card {
  position: relative;
  flex: 1;
  transition: flex 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .founder-card {
    flex-direction: row;
    height: 380px;
  }

  .founder-card:hover {
    flex: 2.2;
    background: var(--card-hover);
    border-color: var(--border-strong);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 0 30px var(--glow);
  }
}

.founder-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .founder-default {
    width: 200px;
    align-items: flex-start;
    text-align: left;
    height: 100%;
  }
}

.founder-expanded {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.4s ease, max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  width: 100%;
}

@media (min-width: 768px) {
  .founder-expanded {
    max-height: none;
    max-width: 0;
    opacity: 0;
  }

  .founder-card:hover .founder-expanded {
    opacity: 1;
    max-width: 480px;
    margin-left: 24px;
  }
}

@media (max-width: 767px) {
  .founder-card.expanded .founder-expanded {
    opacity: 1;
    max-height: 520px;
    margin-top: 20px;
  }
}

.founder-social-icon {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.2s ease, background 0.2s ease;
}

/* developer mode animations */
@keyframes crtScanlines {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 100%;
  }
}

#crt-overlay {
  animation: crtScanlines 20s linear infinite;
}

.glitch-active {
  animation: devmode-glitch 0.3s infinite linear alternate-reverse;
}



/* ================= WHATSAPP FLOATING BUTTON ================= */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.whatsapp-float-btn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6), 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
}

.whatsapp-float-btn .whatsapp-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  z-index: -1;
  animation: whatsappPulse 2s infinite ease-out;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.whatsapp-float-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================================
   FAQ SECTION & ACCORDION
   ============================================================ */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.faq-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--glow), 0 8px 30px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-1);
  transition: color 0.2s ease;
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.85;
  margin-right: 14px;
  flex-shrink: 0;
}

.faq-question {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  flex: 1;
  color: var(--text-1);
  transition: color 0.2s ease;
}

.faq-item.active .faq-question {
  color: var(--accent);
}

.faq-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
  color: var(--text-2);
}

.faq-item.active .faq-icon-wrapper {
  transform: rotate(180deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 0 12px var(--glow);
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  opacity: 1;
  padding: 0 24px 22px 55px;
}

@media (max-width: 640px) {
  .faq-trigger {
    padding: 16px 18px;
  }
  .faq-question {
    font-size: 14.5px;
  }
  .faq-item.active .faq-answer {
    padding: 0 18px 18px 18px;
  }
}