/* ═══════════════════════════════════════════════
   CSS VARIABLES & RESET
═══════════════════════════════════════════════ */
:root {
  --bg: #0A0A0A;
  --bg2: #111111;
  --surface: #111111;
  --surface2: #1A1A1A;
  --ink: #FFFFFF;
  --ink2: #B3B3B3;
  --ink3: #888888;
  --accent: #00D4C7;
  --accent2: #00BFFF;
  --accent-glow: rgba(0, 212, 199, 0.25);
  --border: #2A2A2A;
  --border-strong: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-xl: 0 40px 100px rgba(0,0,0,0.6);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --gradient: linear-gradient(135deg, #00D4C7 0%, #00BFFF 100%);
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg2: #FFFFFF;
  --surface: #FFFFFF;
  --surface2: #F1F5F9;
  --ink: #0A0A0A;
  --ink2: #334155;
  --ink3: #64748B;
  --accent: #00B8AD;
  --accent2: #00A3DA;
  --accent-glow: rgba(0, 184, 173, 0.1);
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.2);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* Custom Cursor */
@media (min-width: 1025px) {
  .cursor {
    position: fixed; pointer-events: none; z-index: 99999;
    width: 10px; height: 10px;
    background: #00D4C7;
    border-radius: 50%;
    top: 0; left: 0;
    transition: width .2s, height .2s, opacity .2s;
    box-shadow: 0 0 8px rgba(0, 212, 199, 0.8);
  }
  .cursor-ring {
    position: fixed; pointer-events: none; z-index: 99998;
    width: 36px; height: 36px;
    border: 1.5px solid #00D4C7;
    border-radius: 50%;
    top: 0; left: 0;
    opacity: 0.6;
  }
  body { cursor: none; }
  a, button, [role=button] { cursor: none; }
  .cursor.hover { width: 20px; height: 20px; opacity: 0.7; }
  .cursor-ring.hover { width: 56px; height: 56px; opacity: 0.3; }
}

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════ */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.body-lg { font-size: 1.15rem; color: var(--ink2); line-height: 1.75; }
.body-md { font-size: 1rem; color: var(--ink3); line-height: 1.7; }

/* ═══════════════════════════════════════════════
   PRELOADER (TYPEWRITER)
═══════════════════════════════════════════════ */
#preloader {
  position: fixed; inset: 0; z-index: 100000;
  background: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.typewriter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #FFFFFF;
}

.preloader-dot {
  width: 10px; height: 10px;
  background: #00D4C7;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.preloader-dot.active {
  transform: scale(1);
  animation: glow-explosion 1s ease-out forwards;
}

.typewriter-cursor {
  display: inline-block;
  width: 3px; height: 1.2em;
  background: #00D4C7;
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: middle;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes glow-explosion {
  0% { box-shadow: 0 0 5px #00D4C7; }
  50% { box-shadow: 0 0 40px #00D4C7; }
  100% { box-shadow: 0 0 15px #00D4C7; }
}

/* ═══════════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════════ */
header {
  position: fixed; top: 1.5rem; left: 0; right: 0; z-index: 2000;
  padding: 0 5%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
header.scrolled { top: 0.75rem; }
.nav-container {
  max-width: 1200px;
  width: 95%;
  margin: 0 auto;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 0.4rem 0.4rem 0.4rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
header.scrolled .nav-container {
  background: rgba(10, 10, 10, 0.95);
  border-color: rgba(0, 212, 199, 0.3);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
}
.nav-logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
}
nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}
nav a {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink2);
  padding: 0.5rem 0.7rem;
  border-radius: 100px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  position: relative;
}
nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
nav a.active {
  color: var(--accent);
  background: rgba(0, 212, 199, 0.08);
}
nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-cta {
  padding: 0.75rem 1.5rem;
  background: var(--gradient);
  color: #000 !important;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease !important;
}
.nav-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 212, 199, 0.4) !important;
}

.theme-btn {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: var(--ink3);
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 212, 199, 0.05); }
.theme-btn svg { width: 16px; height: 16px; }
.sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1100;
}
.hamburger:hover { border-color: var(--accent); background: rgba(0, 212, 199, 0.1); }
.hamburger span {
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  display: block;
}
.hamburger.open {
  background: var(--gradient);
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent);
}
.hamburger.open span { background: #000; height: 2.5px; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); width: 24px; }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scale(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); width: 24px; }

header.menu-open .nav-cta,
header.menu-open .theme-btn {
  opacity: 0 !important;
  visibility: hidden !important;
}
header.menu-open .nav-container {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
header.menu-open .nav-logo {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #0A0A0A;
  z-index: 1500;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(-20px);
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-align: center;
  width: 100%;
  padding: 0 1.5rem;
}
.mobile-menu a:hover {
  color: var(--accent);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════
   SECTIONS COMMON
═══════════════════════════════════════════════ */
section { padding: 7rem 5%; }
.container { max-width: 1300px; margin: 0 auto; }
.section-header { margin-bottom: 4rem; }
.section-header.center { text-align: center; }

/* Fade in animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 7rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  max-width: 100%;
}

/* Terminal Styles */
.hero-terminal {
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  height: 320px;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.terminal-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #28CA41; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: #888;
  font-family: monospace;
  font-weight: 600;
}
.terminal-body {
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  flex: 1;
  overflow: hidden;
  text-align: left;
}
.t-prompt { color: #00D4C7; font-weight: bold; margin-right: 8px; }
.t-command { color: #00BFFF; }
.t-output { color: #ccc; display: block; }
.t-success { color: #00D4C7; display: block; font-weight: 500; }
.t-cursor {
  display: inline-block;
  width: 8px; height: 1rem;
  background: #00D4C7;
  margin-left: 4px;
  animation: terminal-blink 1s infinite;
  vertical-align: middle;
}
@keyframes terminal-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Grid background */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}
/* Glow blobs */
.hero-blob {
  position: absolute;
  top: -20%; right: -10%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
  overflow: hidden;
}
.hero-blob-2 {
  position: absolute;
  bottom: -10%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(96,165,250,0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: float 12s ease-in-out infinite reverse;
  overflow: hidden;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.03); }
}

.hero-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 100px;
  margin-bottom: 1.8rem;
}
[data-theme="dark"] .hero-tag { border-color: rgba(96,165,250,0.3); }
.hero-tag-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero-title { margin-bottom: 1.5rem; }
.hero-title .line-accent { color: var(--accent); }
.hero-subtitle { margin-bottom: 2.5rem; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.8rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  font-size: .93rem;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 212, 199, 0.4); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.8rem;
  background: transparent;
  color: var(--ink2);
  border-radius: 10px;
  font-weight: 600;
  font-size: .93rem;
  border: 1.5px solid var(--border-strong);
  transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.8rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-radius: 100px;
  font-weight: 700;
  font-size: .93rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

/* Hero badge */
.hero-badge-2 {
  position: absolute;
  top: -1rem; right: -1rem;
  background: var(--accent);
  border-radius: var(--radius);
  padding: .75rem 1.1rem;
  box-shadow: 0 8px 30px var(--accent-glow);
  display: flex; align-items: center; gap: .6rem;
  animation: float 6s ease-in-out infinite reverse;
  color: #000;
}
.hero-badge-2 span { font-size: .82rem; font-weight: 800; }

/* Hero visual */
.hero-visual { position: relative; }

/* ═══════════════════════════════════════════════
   MARQUEE
═══════════════════════════════════════════════ */
.marquee-section {
  padding: 2.5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-width: 100%;
}
.marquee-track {
  display: flex; gap: 4rem;
  animation: marquee 20s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink3);
  display: flex; align-items: center; gap: .8rem;
  transition: color var(--transition);
}
.marquee-item:hover { color: var(--ink); }
.marquee-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* ═══════════════════════════════════════════════
   PORTFOLIO
═══════════════════════════════════════════════ */
#portfolio { background: var(--bg); position: relative; }
#portfolio::before {
  content: '';
  position: absolute;
  top: 10%; left: -5%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 199, 0.03) 0%, transparent 70%);
  pointer-events: none;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.portfolio-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition);
}
.portfolio-item:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 212, 199, 0.1);
}
.portfolio-quote {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink2);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  min-height: 80px;
}
.portfolio-project-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.portfolio-project-logo {
  width: 85px; height: 85px;
  background: var(--surface2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.portfolio-project-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.portfolio-project-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.portfolio-project-status { font-size: 0.8rem; color: var(--ink3); }
.portfolio-cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient);
  color: #000;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.portfolio-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 212, 199, 0.3);
}

/* ═══════════════════════════════════════════════
   COMPARISON
═══════════════════════════════════════════════ */
#comparison { background: var(--surface); }

/* ═══════════════════════════════════════════════
   SERVICES
═══════════════════════════════════════════════ */
#services { background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,235,0.3); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  position: relative;
  color: var(--accent);
}
.service-icon-wrap::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 12px;
  background: var(--accent-glow);
}
.service-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: .5rem;
}
.service-desc { font-size: .88rem; color: var(--ink3); line-height: 1.65; margin-bottom: 1.2rem; }
.service-price {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════
   PROCESS
═══════════════════════════════════════════════ */
#process { background: var(--surface); }
.process-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; margin-top: 3rem;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 2rem; left: 12.5%; right: 12.5%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.process-step { text-align: center; position: relative; }
.process-num {
  width: 48px; height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  margin: 0 auto 1.2rem;
  position: relative; z-index: 1;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.process-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: .5rem;
}
.process-desc { font-size: .85rem; color: var(--ink3); line-height: 1.65; }

/* ═══════════════════════════════════════════════
   STATS
═══════════════════════════════════════════════ */
#stats {
  background: var(--bg);
  padding: 5rem 5%;
}
.stats-inner {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(37,99,235,.3); }
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 800;
  color: var(--ink); line-height: 1;
  margin-bottom: .5rem;
}
.stat-number span { color: var(--accent); }
.stat-desc { font-size: .88rem; color: var(--ink3); font-weight: 500; }

/* ═══════════════════════════════════════════════
   PRICING
═══════════════════════════════════════════════ */
#pricing { background: var(--surface); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 3rem;
  align-items: start;
}
.price-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--transition);
  position: relative;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  background: var(--bg2);
  border-color: var(--accent);
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(0, 212, 199, 0.1);
}
[data-theme="dark"] .price-card.featured { background: var(--surface2); }
.price-card.featured:hover { transform: scale(1.03) translateY(-4px); box-shadow: 0 0 40px rgba(0, 212, 199, 0.2); }
.featured-badge {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--gradient);
  color: #000;
  padding: .3rem 1.1rem;
  border-radius: 0 0 8px 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.price-plan {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: .3rem;
}
.price-card.featured .price-plan { color: #fff; }
[data-theme="dark"] .price-card.featured .price-plan { color: var(--ink); }
.price-desc { font-size: .85rem; color: var(--ink3); margin-bottom: 1.5rem; }
.price-amount {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 800;
  color: var(--ink); line-height: 1;
  margin-bottom: .3rem;
}
.price-card.featured .price-amount { color: #fff; }
[data-theme="dark"] .price-card.featured .price-amount { color: var(--ink); }
.price-note { font-size: .8rem; color: var(--ink3); margin-bottom: 2rem; }
.price-features { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.price-feat {
  display: flex; align-items: center; gap: .6rem;
  font-size: .88rem; color: var(--ink2);
}
.price-card.featured .price-feat { color: rgba(255,255,255,0.85); }
[data-theme="dark"] .price-card.featured .price-feat { color: var(--ink2); }
.price-feat::before { content: '✓'; color: #10B981; font-weight: 700; font-size: .8rem; }
.price-btn {
  width: 100%; padding: .85rem; border-radius: 10px;
  font-weight: 600; font-size: .9rem;
  transition: all var(--transition);
}
.price-btn.outline {
  border: 1.5px solid var(--border-strong);
  color: var(--ink2);
  background: transparent;
}
.price-btn.outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.price-btn.fill {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.price-btn.fill:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--accent-glow); }

/* ═══════════════════════════════════════════════
   FAQ
═══════════════════════════════════════════════ */
#faq { background: var(--bg); }
.faq-list { max-width: 780px; margin: 3rem auto 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left;
  padding: 1.4rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600;
  color: var(--ink);
  transition: color var(--transition);
  background: transparent;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--ink3);
  transition: all var(--transition);
}
.faq-item.open .faq-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
}
.faq-answer-inner {
  padding-bottom: 1.5rem;
  color: var(--ink3); font-size: .93rem; line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 400px; }

/* ═══════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════ */
#contact { background: var(--surface); }
.contact-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 5rem; align-items: start;
}
.contact-info-block { padding-top: 1rem; }
.contact-info-block .label { margin-bottom: 1.2rem; }
.contact-headline { margin-bottom: 1.2rem; }
.contact-sub { font-size: 1rem; color: var(--ink3); line-height: 1.75; margin-bottom: 2.5rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-detail { display: flex; align-items: center; gap: 1rem; }
.contact-detail-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--accent-glow);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.contact-detail-text strong { display: block; font-size: .9rem; color: var(--ink); margin-bottom: .1rem; }
.contact-detail-text a, .contact-detail-text span {
  font-size: .85rem; color: var(--ink3);
  transition: color var(--transition);
}
.contact-detail-text a:hover { color: var(--accent); }

/* Contact Form */
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group.full { grid-column: span 2; }
.form-label {
  font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink3);
}
.form-input, .form-select, .form-textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  font-family: var(--font-body);
  font-size: .93rem;
  color: var(--ink);
  transition: all var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input.error, .form-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.form-error-msg {
  font-size: 0.75rem;
  color: #ef4444;
  display: none;
  margin-top: -0.2rem;
}
.form-error-msg.show { display: block; }
.form-saved {
  font-size: 0.75rem;
  color: #10B981;
  display: none;
  margin-top: -0.2rem;
}
.form-saved.show { display: block; }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { appearance: none; cursor: pointer; }
.form-input.error, .form-select.error, .form-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.form-input.ok, .form-select.ok, .form-textarea.ok {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.3rem;
  display: none;
}
.field-error.show { display: block; }
.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin-top: 1.5rem;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.form-submit.loading { opacity: .7; pointer-events: none; }

/* ═══════════════════════════════════════════════
   CTA FINAL / BETAS
═══════════════════════════════════════════════ */
#cta-final {
  background: var(--ink);
  padding: 7rem 5%;
  text-align: center;
  position: relative; overflow: hidden;
}
[data-theme="dark"] #cta-final { background: var(--bg2); }
.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 2; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 800px; margin: 0 auto 1.5rem;
}
[data-theme="dark"] .cta-title { color: var(--ink); }
.cta-sub { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 2.5rem; }
[data-theme="dark"] .cta-sub { color: var(--ink3); }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 5% 2.5rem;
}
.footer-inner { max-width: 1300px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.1fr;
  gap: 2.4rem; margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand-desc { font-size: .87rem; color: var(--ink3); line-height: 1.7; margin-bottom: 1.5rem; max-width: 280px; }
.footer-social { display: flex; gap: .75rem; }
.social-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3);
  transition: all var(--transition);
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: .85rem; font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: 1.2rem;
}
.footer-links { display: flex; flex-direction: column; gap: .65rem; }
.footer-links a { font-size: .85rem; color: var(--ink3); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: .82rem; color: var(--ink3); }
.footer-copy a { color: var(--accent); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: .8rem; color: var(--ink3); transition: color var(--transition); }
.footer-legal a:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════
   MOBILE BOTTOM BAR
═══════════════════════════════════════════════ */
.mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: .75rem 1rem;
  display: none; gap: .75rem;
  z-index: 500;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.1);
}
.mobile-bar a {
  flex: 1; padding: .75rem .5rem;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 8px;
  font-weight: 600; font-size: .82rem;
  transition: all var(--transition);
}
.mobile-bar .mb-whatsapp { background: #25D366; color: #000; font-weight: 800; }
.mobile-bar .mb-cta { background: var(--accent); color: #000; font-weight: 800; }

/* ═══════════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════════ */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 400;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.back-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }

/* ═══════════════════════════════════════════════
   COOKIE BANNER
═══════════════════════════════════════════════ */
.cookie-banner {
  position: fixed; bottom: 2rem; right: 2rem;
  transform: translateX(120%);
  width: 380px;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.5rem;
  z-index: 3000;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.cookie-banner.visible { transform: translateX(0); }
.cookie-inner { display: flex; flex-direction: column; gap: 1.25rem; }
.cookie-text { font-size: 0.85rem; color: #fff; line-height: 1.5; }
.cookie-text strong { color: var(--accent); display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 0.4rem; }
.cookie-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.cookie-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.75rem; font-weight: 900;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
}
.cookie-btn.accept { background: var(--gradient); color: #000; border: none; }
.cookie-btn.secondary { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }
.cookie-btn.config-text { font-size: 0.75rem; color: #ccc; text-decoration: underline; background: none; border: none; padding: 0.2rem; font-weight: 700; }
.cookie-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }

.cookie-config-panel {
  max-height: 0; overflow: hidden;
  transition: all 0.4s ease;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}
.cookie-config-panel.open { max-height: 200px; padding: 1rem; margin-bottom: 0.5rem; border: 1px solid rgba(255,255,255,0.05); }
.config-item { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; font-size: 0.75rem; color: #999; }
.config-item:last-child { margin-bottom: 0; }
.switch { position: relative; width: 32px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #333; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(14px); }
.cookie-feedback {
  display: none;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — SISTEMA COMPLETO DE BREAKPOINTS
═══════════════════════════════════════════════ */

/* ── 1150px: colapsar nav ── */
@media (max-width: 1150px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
}

/* ── 1024px: tablet landscape ── */
@media (max-width: 1024px) {
  section { padding: 6rem 5%; }

  /* Hero */
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
  .hero-badge-2 { display: none; }

  /* Grids */
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-steps::before { display: none; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
  .price-card.featured { transform: none !important; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* Contact */
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
}

/* ── 900px: tablet portrait ── */
@media (max-width: 900px) {
  section { padding: 5rem 5%; }

  /* Nav container más compacto */
  .nav-container { padding: 0.4rem 0.4rem 0.4rem 1.2rem; }

  /* Hero terminal más pequeño */
  .hero-terminal { height: 260px; }
  .terminal-body { font-size: 0.78rem; }

  /* Tipografía */
  .display-lg { font-size: clamp(1.9rem, 4.5vw, 3.5rem); }
  .display-md { font-size: clamp(1.6rem, 3vw, 2.5rem); }

  /* Comparison table scroll horizontal */
  .comparison-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Stats */
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat-number { font-size: 2.5rem; }

  /* About grid */
  .about-stats-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ── 768px: móvil grande / tablet pequeño ── */
@media (max-width: 768px) {
  section { padding: 4.5rem 4%; }

  /* Hero */
  #hero { padding-top: 6rem; }
  .hero-terminal { height: 230px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions a { width: 100%; max-width: 320px; justify-content: center; }
  .hero-tag { font-size: 0.65rem; }

  /* Grids a 1 columna */
  .portfolio-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .footer-top { grid-template-columns: 1fr; }
  .pricing-grid { max-width: 100%; }

  /* Barra móvil */
  .mobile-bar { display: flex; }
  .back-top { bottom: 5.5rem; right: 1rem; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { flex-wrap: wrap; justify-content: center; }
  .footer-brand-desc { max-width: 100%; }

  /* Marquee más pequeño */
  .marquee-item { font-size: 0.95rem; }

  /* Process 1 columna */
  .process-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .process-step { display: flex; align-items: flex-start; gap: 1rem; text-align: left; }
  .process-num { margin: 0; flex-shrink: 0; }

  /* CTA section */
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions a { width: 100%; max-width: 320px; justify-content: center; }

  /* Contact */
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }

  /* FAQ */
  .faq-question { font-size: 0.92rem; }

  /* About mini-stats */
  .about-stats-grid { gap: 1.5rem; }
}

/* ── 640px: móvil mediano ── */
@media (max-width: 640px) {
  section { padding: 4rem 4%; }

  /* Nav */
  .nav-container { padding: 0.35rem 0.35rem 0.35rem 1rem; }
  .nav-logo { font-size: 0.95rem; }

  /* Hero */
  .hero-terminal { height: 200px; }
  .terminal-body { padding: 1rem; font-size: 0.72rem; line-height: 1.6; }
  .display-lg { font-size: clamp(1.7rem, 7vw, 2.8rem); }

  /* Stats 2 columnas compactas */
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 1.5rem 1rem; }
  .stat-number { font-size: 2rem; }

  /* Services card más compacto */
  .service-card { padding: 1.5rem; }

  /* Portfolio card */
  .portfolio-item { padding: 1.75rem 1.25rem; }

  /* Contact form */
  .contact-form { padding: 1.75rem 1.25rem; }

  /* Footer */
  .footer-social { gap: 0.5rem; }

  /* Comparison table */
  table { font-size: 0.82rem; }
  table th, table td { padding: 0.85rem 0.75rem; }
}

/* ── 480px: móvil pequeño ── */
@media (max-width: 480px) {
  section { padding: 3.5rem 4%; }

  /* Cookie banner */
  .cookie-banner { right: 4%; left: 4%; width: 92%; bottom: 1rem; }

  /* Hero */
  #hero { padding-top: 5.5rem; min-height: auto; padding-bottom: 3rem; }
  .hero-terminal { height: 180px; }
  .terminal-body { font-size: 0.68rem; padding: 0.75rem; }

  /* Tipografía mínima */
  .display-lg { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .display-md { font-size: clamp(1.4rem, 6vw, 2rem); }
  .body-lg { font-size: 1rem; }

  /* Stats en 2 col muy compactas */
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 1.25rem 0.75rem; }
  .stat-number { font-size: 1.75rem; }
  .stat-desc { font-size: 0.78rem; }

  /* Botones full width */
  .btn-primary, .btn-secondary, .btn-outline { width: 100%; max-width: 100%; justify-content: center; }

  /* Mobile bar más alta */
  .mobile-bar { padding: 0.85rem 0.75rem; }
  .mobile-bar a { font-size: 0.78rem; padding: 0.7rem 0.4rem; }
  .back-top { bottom: 5rem; width: 40px; height: 40px; font-size: 1rem; }

  /* Nav pill más compacto */
  .nav-container { border-radius: 16px; }

  /* Proceso steps */
  .process-num { width: 40px; height: 40px; font-size: 0.85rem; }

  /* Section headers */
  .section-header { margin-bottom: 2.5rem; }

  /* Portfolio */
  .portfolio-quote { font-size: 0.9rem; min-height: unset; }
  .portfolio-project-logo { width: 70px; height: 70px; }

  /* About mission banner */
  .about-mission-banner { padding: 2.5rem 1.25rem; }
  .about-mission-banner h3 { font-size: 1.8rem; }

  /* Footer */
  .footer-inner { padding: 3rem 4% 1.5rem; }
  .footer-copy { font-size: 0.75rem; }
}

/* ── 360px: móvil muy pequeño ── */
@media (max-width: 360px) {
  section { padding: 3rem 3.5%; }
  .display-lg { font-size: 1.5rem; }
  .stats-inner { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .nav-logo { font-size: 0.85rem; }
  .terminal-body { display: none; }
  .hero-terminal { height: 48px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
/* ═══ LANGUAGE SWITCHER — botón circular con bandera ═══ */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: all var(--transition);
  overflow: hidden;
}
.lang-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px) scale(1.05);
}
.lang-switcher.open .lang-btn {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  min-width: 180px;
  max-height: 320px;        /* NUEVO */
  overflow-y: auto;         /* NUEVO */
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0.45rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink2);
  transition: all 0.2s ease;
  text-align: left;
}
.lang-option:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.lang-option.active { color: var(--accent); background: var(--accent-glow); }
.lang-flag, .lang-flag-current { font-size: 1.15rem; line-height: 1; }

[data-theme="light"] .lang-dropdown {
  background: rgba(255, 255, 255, 0.98);
}
.lang-flag, .lang-flag-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-flag svg, .lang-flag-current svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Bandera dentro del botón circular (más grande, recortada en círculo) */
.lang-flag-current {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Bandera dentro de cada opción del desplegable (rectangular, esquinas suaves) */
.lang-flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.1);
}

.lang-option {
  gap: 0.65rem;
}

@media (max-width: 1150px) {
  .lang-switcher { order: -1; }
}
.lang-dropdown::-webkit-scrollbar { width: 5px; }
.lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
