/* ============================================
   PIXELCOMMERCE - Industrial Tech Protocol
   Design System v3
   ============================================ */
:root {
  /* Colors */
  --bg-base: #030303;
  --bg-elevated: #0a0a0a;
  --fg-base: #ffffff;
  --fg-muted: #888888;
  --accent-lime: #D4FF00;

  --border-light: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(212, 255, 0, 0.5);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container-w: 1280px;
  --container-px: 24px;
  --header-h: 80px;

  /* Animations */
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.5s;
  --dur-slow: 0.8s;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg-base);
}

body {
  font-family: var(--font-body);
  color: var(--fg-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-base);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
  color: inherit;
}

/* Utilities */
.grid-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
  height: 100%;
}

.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.relative {
  position: relative;
}

.v-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Spacing */
.pt-120 {
  padding-top: 120px;
}

.pb-120 {
  padding-bottom: 120px;
}

.py-40 {
  padding-top: 40px;
  padding-bottom: 40px;
}

.p-40 {
  padding: 40px;
}

.mb-80 {
  margin-bottom: 80px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-10 {
  margin-top: 10px;
}

.pb-20 {
  padding-bottom: 20px;
}

/* Typography */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 16px;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 600px;
}

.lime-text {
  color: var(--accent-lime);
}

.text-black {
  color: #000;
}

/* Borders & Structural Grid */
.site-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.b-bottom {
  border-bottom: 1px solid var(--border-light);
}

.b-top {
  border-top: 1px solid var(--border-light);
}

.b-all {
  border: 1px solid var(--border-light);
}

/* Background Grid Overlay */
.site-bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 100px 100px;
  background-position: center center;
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: transform var(--dur-med) var(--ease-snappy);
}

.header.scroll-up {
  transform: translateY(0);
}

.header.scroll-down {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--dur-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.brand-icon {
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.bt-pixel {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-base);
  letter-spacing: -0.04em;
  margin-right: 4px;
}

.bt-commerce {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

.brand-logo.sm .brand-icon {
  width: 16px;
  height: 16px;
}

.brand-logo.sm .bt-pixel {
  font-size: 1.1rem;
}

.brand-logo.sm .bt-commerce {
  font-size: 0.6rem;
  margin-right: 6px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--dur-fast);
}

.nav-link:hover {
  color: var(--accent-lime);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-right: 4px;
}

.header-action {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lang-btn {
  color: var(--fg-muted);
  transition: color var(--dur-fast);
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  color: var(--fg-base);
}

.lang-btn.active {
  color: var(--accent-lime);
  font-weight: 700;
}

.lang-div {
  color: var(--border-light);
}

.mx-10 {
  margin-left: 10px;
  margin-right: 10px;
}

/* Buttons & Interactive Elements */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fg-base);
  color: var(--bg-base);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 24px;
  height: 48px;
  border-radius: 0;
  transition: all var(--dur-fast) var(--ease-snappy);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--accent-lime);
  color: var(--bg-base);
  box-shadow: 0 0 20px rgba(212, 255, 0, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  color: var(--fg-base);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 24px;
  height: 48px;
  transition: all var(--dur-fast) var(--ease-snappy);
}

.btn-outline:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  background: rgba(212, 255, 0, 0.05);
}

.hover-invert {
  transition: all var(--dur-fast) var(--ease-snappy);
}

.hover-invert:hover {
  background: var(--fg-base);
  color: var(--bg-base);
}

.hover-invert:hover .mono-label,
.hover-invert:hover .step-desc {
  color: var(--bg-elevated);
}

.hover-invert:hover svg {
  stroke: var(--bg-base);
}

/* Badges */
.badge-group {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 12px;
  letter-spacing: 0.05em;
}

.badge-outline {
  border: 1px solid var(--border-light);
  color: var(--fg-base);
}

.badge-lime {
  background: rgba(212, 255, 0, 0.1);
  border: 1px solid var(--accent-lime);
  color: var(--accent-lime);
}

/* Hero */
.hero {
  height: 100vh;
  min-height: 700px;
  padding-top: var(--header-h);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  height: 100%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-title .mask {
  overflow: hidden;
  display: block;
}

.hero-title .anim-reveal {
  display: block;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.hero-title .anim-reveal.is-visible {
  transform: translateY(0);
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 540px;
  margin-bottom: 40px;
}

/* Hero Visual (Technical Graphic) */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tech-graphic {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  position: relative;
}

.geometric-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
}

.geo-box {
  background: var(--bg-base);
  position: relative;
}

.block-fill {
  background: rgba(255, 255, 255, 0.03);
}

.anim-pulse {
  animation: techPulse 4s infinite alternate;
}

@keyframes techPulse {
  0% {
    background: var(--bg-base);
  }

  100% {
    background: rgba(212, 255, 0, 0.05);
  }
}

.data-stream {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-lime);
  line-height: 1.5;
  z-index: 2;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.sys-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Services Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card {
  background: var(--bg-elevated);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-fast);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.bento-card.span-2 {
  grid-column: span 2;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-base);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 2px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-lime);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.tech-stack span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border: 1px solid var(--border-light);
  padding: 4px 8px;
  color: var(--fg-muted);
}

/* About / Stats */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stat-box {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--accent-lime);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
}

/* Process */
.process-sequence {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.process-step {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}

.bg-lime {
  background: var(--accent-lime);
  border-color: var(--accent-lime);
}

.step-num {
  margin-bottom: 40px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.step-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.bg-lime .step-desc {
  color: rgba(0, 0, 0, 0.7);
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.method-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  transition: all var(--dur-fast);
}

.method-value {
  font-size: 1.125rem;
  font-weight: 500;
}

.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.input-group input,
.input-group textarea {
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  transition: border-color var(--dur-fast);
  resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent-lime);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.1);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-lime);
  animation: blink 2s infinite;
}

/* Footer */
.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-sys {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* WhatsApp Floating */
.fab-wa {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  background: #25D366;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 99;
  transition: all var(--dur-fast) var(--ease-snappy);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.3);
}

.fab-wa svg {
  width: 34px;
  height: 34px;
}

.fab-wa:hover {
  background: #20C05C;
  color: #fff;
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.5);
}

/* Desktop Borders */
@media (min-width: 992px) {
  .b-right-desk {
    border-right: 1px solid var(--border-light);
  }

  .b-l-desk {
    border-left: 1px solid var(--border-light);
  }

  .pr-desk {
    padding-right: 64px;
  }

  .pl-desk {
    padding-left: 64px;
  }

  .mobile-only {
    display: none !important;
  }
}

/* Scroll Animations */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

/* Mobile Adaptations */
@media (max-width: 991px) {
  .hero {
    height: auto;
    min-height: 0;
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-visual {
    padding: 40px 0;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card.span-2 {
    grid-column: span 1;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats-grid {
    border-top: 1px solid var(--border-light);
    border-left: none;
  }

  .process-sequence {
    grid-template-columns: 1fr;
  }

  .desktop-only {
    display: none !important;
  }

  .desktop-inline {
    display: none !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Mobile Menu Toggle */
  .menu-toggle {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }

  .menu-toggle .bar {
    width: 100%;
    height: 2px;
    background: var(--fg-base);
    transition: all 0.3s;
  }

  .menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle.is-active .bar:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Mobile Menu Panel */
  .mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .mobile-menu.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .mobile-nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg-base);
  }

  .mobile-nav-link span {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-lime);
    margin-right: 8px;
  }
}

/* Loading state to hide flash */
body.loading .anim-reveal,
body.loading .anim-fade-up {
  transition: none;
}