:root {
  --bg: #0e1422;
  --bg-alt: #151c2e;
  --bg-card: #1a2340;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-hover: rgba(0, 206, 227, 0.45);
  --text: #edf0f7;
  --text-muted: #a8b2c4;
  --text-dim: #7b8698;
  --accent: #00cee3;
  --accent-2: #0054ff;
  --accent-soft: rgba(0, 206, 227, 0.14);
  --gradient: linear-gradient(135deg, #00cee3 0%, #0054ff 100%);
  --radius: 14px;

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.loading {
  overflow: hidden;
}

.preloader-svg {
  width: 200px;
  height: 80px;
}
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--gradient); border-radius: 6px; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient);
  z-index: 1002;
  box-shadow: 0 0 12px rgba(0, 206, 227, 0.6);
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 206, 227, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-glow { opacity: 1; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 34px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn-primary {
  background: var(--gradient);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 206, 227, 0.3);
  animation: gradientShift 4s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 206, 227, 0.5);
}

/* Double diagonal cut button */
.btn-diagonal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gradient);
  color: #fff;
  padding: 16px 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  transition: transform 0.3s ease, filter 0.3s ease;
  z-index: 1;
}

.btn-diagonal:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.2);
}

.btn-diagonal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 35px) 0, calc(100% - 17px) 50%, calc(100% - 35px) 100%, 0 100%, 17px 50%);
  pointer-events: none;
  z-index: -1;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-3px);
}

.btn-full { width: 100%; }

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--accent);
    padding: 1px 0;
    z-index: 1001;
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.top-bar-link:hover {
  opacity: 0.85;
  color: #fff;
}

.top-bar-icon {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
  background: #23241d;
}

.nav.scrolled {
  background: #23241d;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* El PNG del logo ya trae fondo #23241d; el nav usa ese mismo color
   para que el logo se integre sin verse recortado */
.nav-logo img {
  height: 44px;
  width: auto;
  transition: var(--transition);
}

.nav-logo:hover img {
  transform: scale(1.04);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-menu a:not(.nav-cta):hover { color: var(--accent); }

.nav-menu a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-menu a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 9px 24px;
  border-radius: 50px;
}

.nav-cta:hover {
  box-shadow: 0 6px 18px rgba(0, 206, 227, 0.4);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

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

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/section-background.jpg') center/cover no-repeat;
  z-index: -2;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-video.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(14, 20, 34, 0.82) 0%, rgba(14, 20, 34, 0.70) 55%, rgba(0, 84, 255, 0.20) 100%);
  z-index: -1;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  animation: blobFloat 14s ease-in-out infinite;
}

.blob-1 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  top: -120px;
  right: -120px;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: var(--accent-2);
  bottom: -140px;
  left: -120px;
  animation-delay: -7s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 206, 227, 0.25);
  padding: 8px 18px;
  border-radius: 50px;
  margin-bottom: 26px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 206, 227, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(0, 206, 227, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
}

.text-gradient {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3.5s ease infinite;
}

.hero-typeline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  min-height: 1.8em;
}

.type-prefix { color: var(--text-muted); }

.typewriter {
  color: var(--accent);
  font-weight: 700;
}

.type-cursor {
  color: var(--accent);
  animation: blink 0.9s step-end infinite;
  font-weight: 400;
}

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

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 38px;
  max-width: 620px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  position: relative;
}

.wheel {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 4px;
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel {
  0% { opacity: 1; top: 7px; }
  100% { opacity: 0; top: 22px; }
}

/* ===== MARQUEE ===== */
.marquee {
  overflow: hidden;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: relative;
  transform: skewY(-2deg);
  margin-top: -30px;
  margin-bottom: -30px;
  z-index: 5;
}

.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  white-space: nowrap;
  position: relative;
}

.marquee-track span::after {
  content: '•';
  position: absolute;
  right: -38px;
  color: var(--accent);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== STATS ===== */
.stats {
  background: var(--bg-alt);
  padding: 70px 0 100px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 80px), 0 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat {
  position: relative;
  padding: 30px 20px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.stat:hover {
  background: var(--surface);
  transform: translateY(-6px);
}

.stat-number {
  display: block;
  font-size: 3.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== SECTION HEADERS ===== */
section { padding: 100px 0; }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
  position: relative;
  z-index: 5;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-subtitle { color: #fff; font-size: 1.05rem; }

/* ===== ABOUT ===== */
.about {
  position: relative;
  z-index: 3;
  padding-top: 110px;
}

.about-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.about-image { position: relative; }

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.about-image:hover img { border-color: var(--border-hover); }

.about-badge {
  position: absolute;
  bottom: -22px;
  right: -22px;
  background: var(--gradient);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  animation: badgeFloat 4s ease-in-out infinite;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.badge-number { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; }
.badge-text { font-size: 0.75rem; opacity: 0.95; text-transform: uppercase; letter-spacing: 1px; }

.about-content .section-title { margin-bottom: 22px; }
.about-text { color: var(--text-muted); margin-bottom: 18px; }

.about-skills { margin-top: 28px; display: grid; gap: 14px; }

.skill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 13px 18px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.skill:hover {
  border-color: var(--border-hover);
  transform: translateX(8px);
  background: var(--accent-soft);
}

.skill svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }

.about-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.about-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.about-col:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.about-col-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.about-list li:hover { color: var(--text); transform: translateX(4px); }

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* =============================================
   PARALLAX BACKGROUNDS & OVERLAYS
   ============================================= */
.has-bg { position: relative; overflow: hidden; }

.section-bg {
  position: absolute;
  inset: -30% 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}
.section-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14,20,34,0.70) 0%, rgba(14,20,34,0.65) 100%);
}
.bg-dim { opacity: 0.18; }

/* Floating decorative images */
.float-img {
  position: absolute;
  z-index: 0;
  opacity: 0.12;
  pointer-events: none;
  will-change: transform;
  filter: blur(1px);
  transition: opacity 0.6s ease, filter 0.6s ease;
}
.float-img:hover { opacity: 0.28; filter: blur(0); }
.float-a { width: 320px; top: -40px; right: -80px; transform: rotate(12deg); }
.float-b { width: 280px; bottom: -60px; left: -60px; transform: rotate(-8deg); }

@keyframes float-a {
  0%,100% { transform: rotate(12deg) translateY(0); }
  50%     { transform: rotate(12deg) translateY(-20px); }
}
@keyframes float-b {
  0%,100% { transform: rotate(-8deg) translateY(0); }
  50%     { transform: rotate(-8deg) translateY(16px); }
}
@media (min-width:769px) {
  .float-a { animation: float-a 7s ease-in-out infinite; }
  .float-b { animation: float-b 6s ease-in-out infinite 0.8s; }
}

/* ===== PERSONAL PROJECT ===== */
.personal-project {
  background: linear-gradient(135deg, #0a1628 0%, #0d2247 50%, #0a1628 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.personal-project .section-overlay {
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.45) 0%, rgba(10, 14, 26, 0.45) 100%);
}
.personal-project .section-bg { opacity: 0.45; }
.personal-project .container { position: relative; z-index: 5; }
.personal-project .section-title { color: #ffffff; text-shadow: 0 2px 16px rgba(0,0,0,0.7); }
.personal-project .section-tag { color: var(--accent); text-shadow: 0 2px 16px rgba(0,206,227,0.3); }
.personal-project .personal-content p { color: #ffffff; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }

.personal-project::before {
  content: 'GPS';
  position: absolute;
  font-size: 20vw;
  font-weight: 800;
  color: rgba(0, 206, 227, 0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.personal-content { max-width: 820px; margin: 0 auto; position: relative; z-index: 5; }
.personal-content p { color: #ffffff; margin-bottom: 18px; font-size: 1.1rem; line-height: 1.8; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }

/* ===== SERVICES ===== */
.services {
  background: transparent;
  margin-bottom: -44px;
}
.services .section-overlay {
  background: linear-gradient(180deg, rgba(14,20,34,0.55) 0%, rgba(14,20,34,0.50) 100%);
}
.services .section-bg { opacity: 0.70; }
.services-bg-fixed {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-block {
  background: #1a2340;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

.service-block:hover {
  background: #1e2a4a;
  border-color: rgba(0, 206, 227, 0.40);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
}

.service-head { display: flex; gap: 20px; margin-bottom: 28px; align-items: flex-start; }

.service-icon {
  width: 58px;
  height: 58px;
  background: rgba(0, 206, 227, 0.12);
  border: 1px solid rgba(0, 206, 227, 0.25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.service-block:hover .service-icon {
  transform: rotate(-8deg) scale(1.08);
  background: var(--gradient);
}

.service-block:hover .service-icon svg { color: #fff; }

.service-icon svg { width: 30px; height: 30px; color: var(--accent); transition: var(--transition); }
.service-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; color: #ffffff; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.service-desc { color: #ffffff; font-size: 0.95rem; line-height: 1.6; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }

/* ===== ACCORDION ===== */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: var(--transition);
}

.accordion-item.open { border-color: var(--border-hover); }

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.accordion-header:hover { color: var(--accent); }

.accordion-icon { position: relative; width: 14px; height: 14px; flex-shrink: 0; }

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--accent);
  transition: var(--transition);
}

.accordion-icon::before { width: 14px; height: 2px; top: 6px; left: 0; }
.accordion-icon::after { width: 2px; height: 14px; top: 0; left: 6px; }

.accordion-item.open .accordion-icon::after { transform: rotate(90deg); opacity: 0; }

.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }

.accordion-body p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 12px; padding: 0 20px; }
.accordion-body p:first-child { padding-top: 4px; }
.accordion-body p:last-child { padding-bottom: 18px; margin-bottom: 0; }
.accordion-body ul { padding: 0 20px 18px 40px; }
.accordion-body ul li { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 8px; list-style: disc; }

.accordion-faq { max-width: 820px; margin: 0 auto; }

/* ===== FAQ SECTION ===== */
.faq {
  position: relative;
  background: #0e1422;
  padding: 140px 0 100px;
  margin-top: -1px;
  overflow: visible;
}

.faq-divider-top {
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: 120px;
  display: block;
  z-index: 5;
  pointer-events: none;
}

.faq-divider-top path {
    fill: #0e1422;
}

/* ===== PROCESS ===== */
.process {
  background: linear-gradient(180deg, #151c2e 0%, #1a2340 100%);
  clip-path: polygon(0 0, 100% 44px, 100% 100%, 0 100%);
}
.process .container { position: relative; z-index: 5; }
.process .section-overlay {
  background: linear-gradient(180deg, rgba(20,30,55,0.22) 0%, rgba(14,20,34,0.18) 100%);
}
.process .section-bg { opacity: 0.60; }
.process .section-title,
.process .section-tag { text-shadow: 0 2px 12px rgba(0,0,0,0.5); }

.process-divider-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75px;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.process-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.process-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.process-card:hover::before { transform: scaleX(1); }

.process-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.process-number {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
}

.process-icon {
  width: 54px;
  height: 54px;
  background: var(--accent-soft);
  border: 1px solid rgba(0, 206, 227, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition);
}

.process-card:hover .process-icon {
  background: var(--gradient);
  transform: translateY(-4px) rotate(-6deg);
}

.process-card:hover .process-icon svg { color: #fff; }

.process-icon svg { width: 28px; height: 28px; color: var(--accent); transition: var(--transition); }
.process-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.process-desc { color: var(--text-muted); font-size: 0.92rem; }

/* ===== PROJECTS ===== */
.project-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 80px;
}

.project-item:last-child { margin-bottom: 0; }
.project-item.reverse .project-image { order: -1; }

.project-type {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

.project-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 18px; line-height: 1.25; }
.project-desc { color: var(--text-muted); margin-bottom: 20px; }

.project-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.project-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.project-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(0, 206, 227, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-image { perspective: 800px; }

.project-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
  will-change: transform;
}

.project-image:hover img { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }

/* ===== PROPOSAL ===== */
.proposal { position: relative; padding: 130px 0; overflow: hidden; }

.proposal-bg {
  position: absolute;
  inset: 0;
  background: url('../img/fondoOscuroOk.png') center/cover no-repeat;
  z-index: -2;
}

.proposal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(14, 20, 34, 0.60) 0%, rgba(20, 30, 50, 0.30) 100%);
  z-index: -1;
}

.proposal-content { text-align: center; max-width: 720px; margin: 0 auto; }

.proposal-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.proposal-subtitle { color: #fff; font-size: 1.25rem; line-height: 1.6; margin-bottom: 34px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }

/* ===== CTA SECTION ===== */
.cta-section {
  position: relative;
  background: var(--bg);
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  overflow: hidden;
  perspective: 1000px;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: 0;
}

.cta-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform-style: preserve-3d;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent), 0 0 20px var(--accent);
  animation: floatParticle 6s ease-in-out infinite, sparkShine 2s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s, 0s; }
.particle:nth-child(2) { top: 40%; left: 80%; animation-delay: 1s, 0.5s; }
.particle:nth-child(3) { top: 70%; left: 25%; animation-delay: 2s, 1s; }
.particle:nth-child(4) { top: 30%; left: 60%; animation-delay: 1.5s, 1.5s; }
.particle:nth-child(5) { top: 80%; left: 70%; animation-delay: 0.5s, 0.8s; }
.particle:nth-child(6) { top: 10%; left: 85%; animation-delay: 2.5s, 0.3s; }
.particle:nth-child(7) { top: 60%; left: 10%; animation-delay: 1.8s, 1.2s; }
.particle:nth-child(8) { top: 50%; left: 45%; animation-delay: 0.8s, 1.8s; }
.particle:nth-child(9) { top: 25%; left: 35%; animation-delay: 2.2s, 0.6s; }
.particle:nth-child(10) { top: 85%; left: 55%; animation-delay: 1.3s, 1.4s; }

@keyframes floatParticle {
  0%, 100% {
    transform: translate3d(0, 0, 0) translateZ(0);
  }
  50% {
    transform: translate3d(20px, -30px, 50px) translateZ(100px);
  }
}

@keyframes sparkShine {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

.cta-section:hover .particle {
  animation-play-state: running;
}

.cta-content {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.cta-subtitle {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 36px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cta-section .btn,
.cta-section .btn-diagonal {
  font-size: 1rem;
  padding: 16px 50px;
}

/* ===== CONTACT ===== */
.contact { 
  position: relative;
  background: var(--bg-alt); 
  padding: 140px 0 100px;
  clip-path: polygon(0 80px, 100% 0, 100% 100%, 0 100%);
}

.contact-divider-top {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 80px;
  display: block;
  z-index: 5;
  pointer-events: none;
  transform: scale(-1, -1);
  transform-origin: center;
  opacity: 0.9;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-info .section-title { margin-bottom: 30px; }
.contact-methods { display: grid; gap: 20px; margin-bottom: 28px; }
.contact-method { display: flex; align-items: flex-start; gap: 16px; }
a.contact-method { text-decoration: none; color: inherit; transition: transform 0.3s ease; }
a.contact-method:hover { transform: translateX(4px); }
.contact-method svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.method-label { display: block; font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.method-value { font-weight: 600; color: var(--text); }
.contact-note { color: var(--text-muted); font-size: 0.95rem; }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-weight: 600; color: var(--text); margin-bottom: 8px; font-size: 0.88rem; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-group select option { background: var(--bg-card); color: var(--text); }
.form-group textarea { resize: vertical; min-height: 120px; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 206, 227, 0.12);
  transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

/* ===== FOOTER ===== */
.footer { background: #23241d; border-top: 1px solid var(--border); padding: 32px 0; }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ===== BACK TO TOP ===== */
.back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(0, 206, 227, 0.4);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover { transform: translateY(-4px); }
.back-top svg { width: 22px; height: 22px; }

/* ===== TILT ===== */
[data-tilt] { transform-style: preserve-3d; }

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-100px) translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(100px) translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-rotate {
  opacity: 0;
  transform: translateY(40px) rotate(-5deg);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-left.visible, .reveal-right.visible, .reveal-scale.visible, .reveal-rotate.visible, .reveal-up.visible, .reveal-down.visible {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1) rotate(0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(-70px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-down {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-alt);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transition: right 0.35s ease;
    border-left: 1px solid var(--border);
  }

  .nav-menu.active { right: 0; }
  .nav-menu a { font-size: 1.15rem; }
  .nav-toggle { display: flex; }

  .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-image { max-width: 380px; margin: 0 auto; }
  .about-columns { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .project-item, .project-item.reverse { grid-template-columns: 1fr; gap: 32px; }
  .project-item.reverse .project-image { order: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .cursor-glow { display: none; }
}

@media (max-width: 640px) {
  section { padding: 70px 0; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 28px 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .about-badge { right: 12px; bottom: 12px; }
  .hero-typeline { font-size: 1.05rem; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
