/* ==========================================
   BASE STYLES
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeSpeed;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  body, html {
    overscroll-behavior-y: none;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: 1.2;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-secondary); }

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

/* ==========================================
   SCROLL PROGRESS BAR
   ========================================== */
.scroll-progress { display: none; }

/* ==========================================
   CUSTOM CURSOR (desktop only)
   ========================================== */
@media (pointer: fine) {
  .custom-cursor, .custom-cursor-dot { display: none; }
}

@media (pointer: coarse) {
  .custom-cursor, .custom-cursor-dot { display: none; }
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 0.75rem 2rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal), background var(--transition-normal), border-color 0.15s ease, box-shadow 0.15s ease;
  width: auto;
  min-width: 1000px;
  will-change: transform, opacity;
  contain: layout style;
}

@media (max-width: 768px) {
  .navbar {
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    padding: 0.75rem 1rem;
    gap: var(--space-sm);
  }
}

.navbar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.6);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.logo-static {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  animation: logoSpin 12s ease-in-out infinite;
}

@keyframes logoSpin {
  0%, 80% { transform: rotate(0deg) scale(1); }
  87% { transform: rotate(180deg) scale(1.08); }
  94% { transform: rotate(360deg) scale(1); }
  100% { transform: rotate(360deg) scale(1); }
}

.logo-text-static {
  color: white;
  font-family: var(--font-display);
  font-size: 1.1em;
}

.logo-text-bold {
  font-weight: 700;
}

.logo-text-light {
  font-weight: 300;
}

@media (min-width: 768px) {
  .logo { font-size: var(--text-lg); }
}

.logo:hover { color: var(--accent-primary); }

.nav-menu {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.nav-menu a {
  position: relative;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: 12px 16px;
  border-radius: var(--radius-full);
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-menu a:hover {
  color: var(--text-primary);
}

.nav-menu a.active {
  color: var(--bg-primary);
  background: var(--accent-primary);
}

.nav-menu a.active::after { display: none; }

.nav-menu a.active:hover {
  background: var(--accent-secondary);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  gap: 4px;
  transition: background var(--transition-fast);
}

@media (min-width: 768px) {
  .hamburger { display: none; }
}

.hamburger:hover { background: rgba(255, 255, 255, 0.1); }

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.hamburger:hover span { background-color: var(--accent-primary); }

.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.nav-menu.mobile-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  z-index: 999;
}

.nav-menu.mobile-open a {
  font-size: var(--text-sm);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.nav-menu.mobile-open a::after { display: none; }

.nav-menu.mobile-open a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.nav-menu.mobile-open a.active {
  color: var(--accent-primary);
  background: rgba(94, 234, 212, 0.1);
}

.menu-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.menu-backdrop.visible { display: block; }

@media (min-width: 768px) {
  .nav-menu { display: flex; }
  .nav-menu.mobile-open {
    position: static;
    flex-direction: row;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
  }
  .nav-menu.mobile-open a {
    font-size: var(--text-sm);
    padding: 0.5rem 1rem;
  }
}

/* ==========================================
   SECTION SHARED STYLES
   ========================================== */
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-sm);
}

section {
  padding: var(--space-xl) var(--space-sm);
}

@media (min-width: 768px) {
  section { padding: var(--space-xl) var(--space-md); }
}

@media (min-width: 1024px) {
  section { padding: var(--space-xl) var(--space-lg); }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(94, 234, 212, 0.02) 0%, transparent 70%), var(--bg-primary);
  overflow: hidden;
  padding: 0 var(--space-sm);
}

@supports not (height: 100svh) {
  .hero { height: 100vh; }
}

#hero-grid-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  will-change: contents;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 8px 20px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  background: rgba(94, 234, 212, 0.05);
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.hero-logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  position: relative;
  top: -4px;
}

.hero-logo-wordmark {
  height: 28px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .hero-logo-icon {
    width: 64px;
    height: 64px;
  }
  .hero-logo-wordmark {
    height: 36px;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: var(--font-bold);
  line-height: 1;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.hero-line {
  display: block;
}

.hero-we-build {
  font-family: 'Orbitron', sans-serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-title .highlight {
  color: var(--accent-primary);
  position: relative;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--accent-primary);
  background: transparent;
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 48px;
}

.hero-cta:hover {
  opacity: 0.8;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 48px;
}

.hero-cta-secondary:hover {
  opacity: 0.8;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 1;
  pointer-events: none;
}

.scroll-line {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.5));
  animation: scrollUp 2s ease-in-out infinite;
}

@keyframes scrollUp {
  0% { bottom: -100%; }
  100% { bottom: 100%; }
}

@media (max-width: 767px) {
  .scroll-indicator {
    bottom: 1rem;
    gap: 4px;
    font-size: 0.55rem;
  }
  .scroll-line {
    height: 18px;
  }
  .scroll-line::after {
    animation: scrollUp 2s ease-in-out infinite;
  }
}

/* ==========================================
   SERVICES - BENTO GRID
   ========================================== */
.services {
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
  contain: content;
}

.services-header {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .services-header { margin-bottom: var(--space-xl); }
}

.services-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

.bento-featured {
  border-color: rgba(94, 234, 212, 0.15);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

@media (min-width: 768px) {
  .bento-featured {
    grid-column: 1 / -1;
  }

  .bento-card-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .bento-featured .bento-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .bento-featured .bento-title {
    font-size: var(--text-3xl);
  }
}

.bento-card {
  position: relative;
  padding: var(--space-lg) var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.4s ease;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  border-color: rgba(94, 234, 212, 0.3);
}

.bento-large {
  grid-row: span 2;
}

@media (max-width: 767px) {
  .bento-large { grid-row: span 1; }
}

.bento-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(94, 234, 212, 0.06), transparent 40%);
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.bento-card:hover .bento-glow { opacity: 1; }

.bento-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.bento-icon svg {
  width: 100%;
  height: 100%;
}

.bento-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.bento-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.bento-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.bento-tech span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.bento-card:hover .bento-tech span {
  border-color: rgba(94, 234, 212, 0.2);
  color: var(--accent-primary);
}

/* ==========================================
   PROCESS SECTION
   ========================================== */
.process {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  contain: content;
}

.process::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.process-header {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .process-header { margin-bottom: var(--space-xl); }
}

.process-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.process-timeline {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 768px) {
  .process-timeline {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

.process-step {
  flex: 1;
  padding: var(--space-md);
  text-align: center;
  cursor: default;
}

.step-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: var(--font-bold);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(94, 234, 212, 0.3);
  line-height: 1;
  margin-bottom: var(--space-sm);
  transition: -webkit-text-stroke-color 0.4s ease, text-shadow 0.4s ease;
  user-select: none;
}

.process-step:hover .step-number {
  -webkit-text-stroke-color: rgba(94, 234, 212, 0.6);
  text-shadow: 0 0 20px rgba(94, 234, 212, 0.15);
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.process-connector {
  display: none;
}

@media (min-width: 768px) {
  .process-connector {
    display: flex;
    align-items: center;
    align-self: center;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.3), rgba(94, 234, 212, 0.1));
    flex-shrink: 0;
    margin-top: -20px;
  }
}

/* ==========================================
   FEATURED APP SHOWCASE
   ========================================== */
.app-showcase {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.app-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.app-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .app-header { margin-bottom: var(--space-xl); }
}

.app-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.app-subtitle {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.app-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

@media (max-width: 767px) {
  .app-content {
    text-align: center;
  }

  .app-details {
    max-width: 100%;
  }

  .app-badge-row {
    justify-content: center;
  }

  .app-stats {
    justify-content: center;
  }

  .play-store-link {
    width: 100%;
    justify-content: center;
  }

  .app-phone {
    width: 220px;
    margin: 0 auto;
  }

  .app-feature {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .app-content {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }
}

/* Phone mockup */
.app-phone {
  flex-shrink: 0;
  width: 240px;
}

@media (min-width: 768px) {
  .app-phone { width: 260px; margin-left: var(--space-md); }
}

/* Screenshot Carousel */
.app-carousel {
  position: relative;
  width: 100%;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 17.7;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #111;
}

@media (min-width: 768px) {
  .carousel-viewport { border-radius: 24px; }
}

.carousel-slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: rgba(94, 234, 212, 0.2);
  border-color: var(--accent-primary);
}

.carousel-prev { left: -52px; }
.carousel-next { right: -52px; }

@media (max-width: 767px) {
  .carousel-prev { left: -56px; }
  .carousel-next { right: -56px; }
}

.carousel-counter {
  text-align: center;
  margin-top: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-family: var(--font-display);
}

.phone-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* App details */
.app-details {
  flex: 1;
  max-width: 500px;
}

.app-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-md);
}

.app-badge {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  padding: 4px 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: var(--radius-full);
  background: rgba(94, 234, 212, 0.05);
}

.app-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.app-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

@media (max-width: 480px) {
  .app-features { grid-template-columns: 1fr; }
}

.app-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.app-feature svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.app-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.play-store-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--bg-primary);
  background: var(--accent-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 48px;
}

.play-store-link svg {
  width: 20px;
  height: 20px;
}

.play-store-link:hover {
  color: var(--bg-primary);
  opacity: 0.8;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
  background-color: var(--bg-secondary);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.about-container {
  max-width: 700px;
  margin: 0 auto;
}

.about-header {
  margin-bottom: var(--space-sm);
  text-align: center;
}

@media (min-width: 768px) {
  .about-header { margin-bottom: var(--space-md); }
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.about-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .about-description { font-size: var(--text-lg); line-height: 1.8; margin-bottom: var(--space-md); }
}

.about-description:last-of-type { margin-bottom: 0; }

.about-logo-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: var(--space-sm);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .about-logo-img {
    width: 160px;
    height: 160px;
  }
}

/* ==========================================
   TESTIMONIALS SECTION
   ========================================== */
.testimonials {
  background-color: var(--bg-primary);
  position: relative;
  contain: content;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.testimonials-container {
  max-width: 900px;
  margin: 0 auto;
}

.testimonials-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .testimonials-header { margin-bottom: var(--space-xl); }
}

.testimonials-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Featured testimonial */
.testimonial-feature {
  position: relative;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--accent-primary);
  opacity: 0.2;
  position: absolute;
  top: 16px;
  left: 24px;
}

.testimonial-quote-large {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
  padding-top: var(--space-md);
}

@media (min-width: 768px) {
  .testimonial-quote-large { font-size: var(--text-xl); }
}

.testimonial-author-large {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.author-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.testimonial-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stars {
  color: #fbbf24;
  font-size: var(--text-lg);
  letter-spacing: 2px;
}

.testimonial-source {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  font-weight: var(--font-medium);
}

/* ==========================================
   CTA BANNER
   ========================================== */
.cta-banner {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.05) 0%, rgba(94, 234, 212, 0.02) 100%);
  border-top: 1px solid rgba(94, 234, 212, 0.1);
  border-bottom: 1px solid rgba(94, 234, 212, 0.1);
  text-align: center;
}

.cta-banner-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-banner-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.cta-banner-content p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
  background-color: var(--bg-secondary);
  position: relative;
  contain: content;
}

.contact-container {
  max-width: 900px;
  margin: 0 auto;
}

.contact-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .contact-header { margin-bottom: var(--space-xl); }
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.contact-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (max-width: 767px) {
  .contact-form { gap: var(--space-sm); }
}

/* Honeypot - visually hidden from users */
.form-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: var(--space-sm); }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-primary);
  font-size: 16px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:hover { border-color: rgba(255, 255, 255, 0.2); }

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.form-textarea {
  resize: none;
  min-height: 120px;
}

.select-wrapper { position: relative; }

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.form-error {
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-height: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.form-error.visible {
  opacity: 1;
  min-height: 1.25rem;
  max-height: 2rem;
}

.form-input.error { border-color: rgba(255, 255, 255, 0.3); }

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--accent-primary);
  background: transparent;
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  min-height: 48px;
  margin-top: var(--space-sm);
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .form-submit { width: 100%; }
}

.form-submit::before {
  display: none;
}

.form-submit:hover:not(:disabled) {
  opacity: 0.8;
}

.form-submit:hover:not(:disabled)::before { display: none; }

.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-submit .submit-loading { display: none; }
.form-submit.loading .submit-text { display: none; }
.form-submit.loading .submit-loading { display: inline; }

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  color: var(--accent-primary);
}

.form-success.visible {
  display: flex;
  animation: fadeInSmall 0.3s ease;
}

.success-icon { font-size: var(--text-lg); font-weight: var(--font-bold); }
.success-text { font-size: var(--text-sm); }

@keyframes fadeInSmall {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background-color: var(--bg-primary);
  padding: var(--space-lg) var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

@media (min-width: 768px) {
  .footer { padding: var(--space-lg) var(--space-md); }
}

@media (min-width: 1024px) {
  .footer { padding: var(--space-lg) var(--space-lg); }
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand { max-width: 300px; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--space-sm);
}

.footer-logo:hover { color: var(--accent-primary); }

.footer-logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.footer-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-tech-stack span {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
}

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

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.footer-contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-item a:hover { color: var(--accent-primary); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: var(--space-sm);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.15), transparent);
  margin-bottom: var(--space-lg);
  position: relative;
}

.footer-divider::after {
  content: '✝';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
  background: var(--bg-primary, #0a0a0a);
  padding: 0 10px;
  line-height: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-terms {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-terms:hover { color: var(--accent-primary); }

@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 767px) {
  .footer-content { text-align: center; }
  .footer-brand { max-width: 100%; }
  .footer-logo { justify-content: center; }
  .footer-tagline { text-align: center; }
  .footer-tech-stack { justify-content: center; }
  .footer-links { align-items: center; }
  .footer-contact { align-items: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ==========================================
   TOUCH & HOVER INTERACTIONS
   ========================================== */
button, input[type="submit"], .hero-cta, .form-submit, .hamburger, .github-link {
  min-height: 44px;
  min-width: 44px;
}

@media (pointer: coarse) {
  :focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 3px; }
}

@media (hover: hover) {
  .form-submit:hover:not(:disabled) { opacity: 0.8; }
}

@media (hover: none) {
  .form-submit:hover:not(:disabled) { transform: none; }
  .bento-card:hover { border-color: rgba(255, 255, 255, 0.06); }
  .bento-card:hover .bento-glow { opacity: 0; }
  .bento-card:hover .bento-tech span { border-color: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
}

.hero-cta:active, .form-submit:active:not(:disabled) { transform: scale(0.98); }
.hamburger:active { transform: scale(0.95); }

/* Prevent touch on decorative elements */
#hero-grid-canvas, .hero::after, .scroll-progress, .custom-cursor, .custom-cursor-dot {
  pointer-events: none;
}

/* ==========================================
   TERMS PAGE STYLES
   ========================================== */
.terms-page {
  padding: var(--space-xl) var(--space-sm) var(--space-lg);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

@media (min-width: 768px) {
  .terms-page { padding: var(--space-xl) var(--space-md) var(--space-lg); }
}

.terms-header {
  text-align: left;
  margin-bottom: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.terms-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.terms-intro { font-size: var(--text-lg); color: var(--text-secondary); margin-bottom: var(--space-sm); }
.terms-updated { font-size: var(--text-sm); color: var(--text-muted); }

.terms-content { max-width: 800px; margin: 0 auto; }
.terms-section { margin-bottom: 16px; padding: 0; }

.terms-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--accent-primary);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.2);
  padding-bottom: 4px;
}

.terms-section p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.terms-section ul { margin: 8px 0; padding-left: var(--space-md); }
.terms-section li { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; margin-bottom: 2px; }

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.back-button:hover { color: var(--accent-primary); }
.back-button svg { transition: transform var(--transition-fast); }
.back-button:hover svg { transform: translateX(-2px); }

.terms-footer { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.terms-footer .back-button { margin-bottom: 0; }
.terms-section a { color: var(--accent-primary); text-decoration: underline; }
.terms-section a:hover { color: var(--accent-secondary); }

/* ==========================================
   MOBILE ANIMATION OVERRIDES
   ========================================== */
@media (max-width: 767px) {
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-indicator { display: flex; }
}

/* ==========================================
   MOBILE LANDSCAPE OVERRIDES
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
  /* Navbar: keep hamburger, compact bar */
  .nav-menu { display: none; }
  .hamburger { display: flex; }
  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 999;
    max-height: 60vh;
    overflow-y: auto;
  }
  .navbar {
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    padding: 0.5rem 1rem;
  }

  /* Hero: tighten vertical spacing only */
  .hero { height: auto; min-height: 100svh; padding: var(--space-sm) var(--space-sm); }
  .hero-content { gap: 0; }
  .hero-logo { margin-bottom: var(--space-xs); }
  .hero-logo-icon { width: 36px; height: 36px; }
  .hero-logo-wordmark { height: 22px; }
  .hero-badge { margin-bottom: var(--space-xs); }
  .hero-subtitle { margin-bottom: var(--space-xs); }
  .hero-cta { margin-top: var(--space-xs); }

  /* Global: reduce section padding */
  section { padding: var(--space-md) var(--space-sm); }

  /* All section titles: uniform smaller size */
  .services-title,
  .process-title,
  .app-title,
  .about-title,
  .testimonials-title,
  .contact-title { font-size: clamp(1.5rem, 4vw, 2rem); }

  /* Section headers: tighter bottom margin */
  .services-header,
  .process-header,
  .app-header,
  .about-header,
  .testimonials-header,
  .contact-header { margin-bottom: var(--space-sm); }

  /* About section: scale down logo */
  .about-logo-img { width: 64px; height: 64px; margin-bottom: var(--space-xs); }
  .about-description { font-size: var(--text-sm); line-height: 1.5; margin-bottom: var(--space-xs); }

  /* Testimonials: tighter spacing */
  .testimonial-feature { padding: var(--space-sm); }
  .quote-mark { font-size: 3.5rem; }
  .testimonial-quote-large { font-size: var(--text-base); padding-top: var(--space-sm); margin-bottom: var(--space-sm); }

  /* Contact: tighter form */
  .contact-form { gap: var(--space-xs); }
  .form-input { padding: 10px 14px; }
  .form-textarea { min-height: 80px; }

  /* Footer: no full-height */
  .footer { min-height: auto; padding-top: var(--space-md); }
  .footer-content { margin-bottom: var(--space-sm); }
  .footer-divider { margin-bottom: var(--space-sm); }

  /* Hide scroll indicator */
  .scroll-indicator { display: none !important; }
}
