/* =============================================
   GAMACLE ENGINEERING SPA — Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,600;0,700;1,300&family=Barlow+Condensed:wght@400;600;700&display=swap');

:root {
  --orange: #F07B1D;
  --orange-dark: #C96010;
  --orange-light: #FF9A45;
  --charcoal: #2a3037;
  --dark: #15181c;
  --dark-2: #1b1f24;
  --dark-3: #232931;
  --mid: #333b44;
  --slate: #252b31;
  --silver: #9aa1aa;
  --steel: #c6ccd3;
  --light: #E8EAED;
  --white: #FFFFFF;
  --gradient-hero: linear-gradient(135deg, #15181c 0%, #232931 50%, #15181c 100%);
  --gradient-orange: linear-gradient(135deg, #F07B1D, #C96010);
  --gradient-steel: linear-gradient(135deg, #eef0f2 0%, #9aa1aa 55%, #c6ccd3 100%);
  --gradient-card: linear-gradient(180deg, #232931 0%, #1b1f24 100%);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-orange: 0 4px 20px rgba(240,123,29,0.3);
  --radius: 4px;
  --radius-lg: 8px;
  --font-display: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  --font-condensed: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--dark);
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: 0.05em; line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.2rem; font-family: var(--font-condensed); font-weight: 600; letter-spacing: 0.1em; }

p { font-size: 1rem; line-height: 1.7; }

a { color: var(--orange); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--orange-light); }

.text-orange { color: var(--orange); }
.text-silver { color: var(--silver); }
.text-upper { text-transform: uppercase; }

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.section-label {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  color: var(--white);
  margin-bottom: 1rem;
}

.section-title span { color: var(--orange); }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--silver);
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #FF9A45, #F07B1D);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,123,29,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--light);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ---- DIVIDER ---- */
.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-orange);
  margin: 1rem 0 2rem;
}
.divider-center { margin: 1rem auto 2rem; }

/* ---- CARDS ---- */
.card {
  background: var(--gradient-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(240,123,29,0.3);
  box-shadow: var(--shadow-card);
}

/* ---- NAV ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
  background: transparent;
}

#navbar.scrolled {
  background: rgba(21,24,28,0.96);
  backdrop-filter: blur(12px);
  padding: 0.7rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(240,123,29,0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.nav-logo-img {
  width: auto;
  height: 40px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-text .brand {
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: 0.06em;
  color: var(--white);
  white-space: nowrap;
}

.nav-logo-text .tagline {
  font-family: var(--font-condensed);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--orange);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  margin-left: 1.25rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--light);
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(21,24,28,0.985);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1001;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--light);
  text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--orange); }

.mobile-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  background: none;
  border: none;
  color: var(--light);
  font-size: 2rem;
  cursor: pointer;
}

/* ---- HERO ---- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../images/galeria/hero-soldador.jpg');
  background-size: cover;
  background-position: center 38%;
  transform: scale(1.04);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 72% 42%, rgba(240,123,29,0.16) 0%, transparent 62%),
    linear-gradient(95deg, rgba(15,17,20,0.94) 0%, rgba(15,17,20,0.74) 38%, rgba(15,17,20,0.34) 68%, rgba(15,17,20,0.55) 100%),
    linear-gradient(0deg, #13161a 0%, rgba(15,17,20,0.2) 30%, transparent 55%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(198,204,211,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198,204,211,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 75%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: 6rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--orange);
}

.hero-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.95;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero-title .highlight {
  display: block;
  color: var(--orange);
  -webkit-text-stroke: 1px var(--orange);
}

.hero-title .outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.3);
}

.hero-desc {
  max-width: 520px;
  color: var(--silver);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--orange);
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--silver);
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--orange), transparent);
}

/* ---- SERVICES ---- */
#servicios { background: var(--dark-2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--gradient-orange);
  transition: var(--transition);
}

.service-card:hover { border-color: rgba(240,123,29,0.25); transform: translateY(-4px); }
.service-card:hover::before { height: 100%; }

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(240,123,29,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: rgba(240,123,29,0.2);
}

.service-title {
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--silver);
  line-height: 1.6;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
}

.service-link svg { transition: var(--transition); }
.service-card:hover .service-link svg { transform: translateX(4px); }

/* ---- PROJECTS ---- */
#proyectos { background: var(--dark); }

.projects-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1.2rem;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--silver);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240,123,29,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.project-visual {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--dark-2);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img { transform: scale(1.06); }

.project-visual .proj-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,24,28,0) 35%, rgba(21,24,28,0.6) 100%);
  transition: var(--transition);
}

.project-card:hover .proj-overlay {
  background: linear-gradient(180deg, rgba(240,123,29,0.14) 0%, rgba(21,24,28,0.45) 100%);
}

.project-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-condensed);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge-won { background: rgba(34,197,94,0.2); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-done { background: rgba(240,123,29,0.2); color: var(--orange); border: 1px solid rgba(240,123,29,0.3); }

.project-body { padding: 1.5rem; }

.project-client {
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.4rem;
}

.project-name {
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--silver);
  line-height: 1.6;
}

/* ---- GALERÍA ---- */
#galeria { background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%); }

.gallery-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.gallery-grid {
  column-count: 4;
  column-gap: 1rem;
}

.gallery-item {
  position: relative;
  break-inside: avoid;
  margin: 0 0 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--dark-3);
  transition: var(--transition);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.75rem 1rem 0.85rem;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--white);
  background: linear-gradient(0deg, rgba(15,17,20,0.94) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
}

.gallery-item::after {
  content: '\2922';
  position: absolute;
  top: 0.8rem; right: 0.9rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(240,123,29,0.92);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.95rem;
  opacity: 0;
  transform: scale(0.7);
  transition: var(--transition);
}

.gallery-item:hover, .gallery-item:focus-visible {
  border-color: rgba(240,123,29,0.4);
  outline: none;
  box-shadow: var(--shadow-card);
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-item:hover figcaption, .gallery-item:focus-visible figcaption { opacity: 1; transform: translateY(0); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; transform: scale(1); }

.gallery-item.hide { display: none; }

@media (max-width: 1100px) { .gallery-grid { column-count: 3; } }
@media (max-width: 760px)  { .gallery-grid { column-count: 2; } }
@media (max-width: 440px)  { .gallery-grid { column-count: 1; } }

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10,12,14,0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}
.lightbox.open { display: flex; animation: lbFade 0.25s ease; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.lb-figure {
  max-width: min(1100px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.lb-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 70px rgba(0,0,0,0.7);
}
.lb-figure figcaption {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  text-align: center;
}
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.lb-close {
  top: 1.3rem; right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}
.lb-prev { left: 1.2rem; }
.lb-next { right: 1.2rem; }
.lb-close:hover { background: var(--orange); border-color: var(--orange); transform: scale(1.08); }
.lb-nav:hover { background: var(--orange); border-color: var(--orange); transform: translateY(-50%) scale(1.08); }

@media (max-width: 600px) {
  .lb-nav { width: 42px; height: 42px; font-size: 1.5rem; }
  .lb-prev { left: 0.5rem; } .lb-next { right: 0.5rem; }
  .lb-close { top: 0.8rem; right: 0.9rem; }
}

/* ---- CLIENTES ---- */
#clientes { background: var(--dark-2); }

.clients-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.client-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2.5rem;
  min-width: 180px;
  transition: var(--transition);
}

.client-logo-item:hover {
  background: rgba(240,123,29,0.08);
  border-color: rgba(240,123,29,0.2);
  transform: scale(1.03);
}

.client-logo-item span {
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ---- TESTIMONIALS ---- */
#testimonios { background: var(--dark); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: var(--transition);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: rgba(240,123,29,0.15);
}

.testimonial-card:hover {
  border-color: rgba(240,123,29,0.2);
  transform: translateY(-3px);
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--light);
  font-style: italic;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
}

.author-name {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.author-role {
  font-size: 0.8rem;
  color: var(--orange);
}

/* ---- CONTACTO ---- */
#contacto { background: var(--dark-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.contact-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(240,123,29,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-label {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.25rem;
}

.contact-value {
  color: var(--light);
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-group select option { background: var(--dark-3); color: var(--light); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  background: rgba(240,123,29,0.05);
  box-shadow: 0 0 0 3px rgba(240,123,29,0.1);
}

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

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.form-status.success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); display: block; }
.form-status.error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); display: block; }

/* ---- FOOTER ---- */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--silver);
  max-width: 320px;
  margin-top: 1rem;
  line-height: 1.7;
}

.footer-col h5 {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--silver);
  transition: var(--transition);
}
.footer-col a:hover { color: var(--orange); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--silver);
}

/* ---- AI CHAT ---- */
#ai-chat-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gradient-orange);
  box-shadow: var(--shadow-orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: var(--transition);
  animation: pulse-chat 3s infinite;
}

@keyframes pulse-chat {
  0%, 100% { box-shadow: 0 4px 20px rgba(240,123,29,0.3); }
  50% { box-shadow: 0 4px 35px rgba(240,123,29,0.6); }
}

#ai-chat-btn:hover { transform: scale(1.1); }

#ai-chat-panel {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 901;
  width: 380px;
  max-width: calc(100vw - 2rem);
  background: var(--dark-3);
  border: 1px solid rgba(240,123,29,0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 550px;
}

#ai-chat-panel.open { display: flex; }

.chat-header {
  background: var(--gradient-orange);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chat-name {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.chat-status {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}

.chat-close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.75;
  transition: var(--transition);
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  max-width: 85%;
  animation: msgIn 0.25s ease;
}

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

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }

.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.chat-msg.bot .chat-bubble {
  background: rgba(255,255,255,0.07);
  color: var(--light);
  border-bottom-left-radius: 3px;
}

.chat-msg.user .chat-bubble {
  background: var(--orange);
  color: var(--white);
  border-bottom-right-radius: 3px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  width: fit-content;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--silver);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--light);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--orange);
  background: rgba(240,123,29,0.05);
}

.chat-send {
  width: 38px;
  height: 38px;
  background: var(--gradient-orange);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.chat-send:hover { transform: scale(1.08); }

/* ---- ANIMATIONS ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 940px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 2rem; }
  .section { padding: 3.5rem 0; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  #ai-chat-panel { right: 1rem; width: calc(100vw - 2rem); }
}

/* ---- UTILS ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mb-0 { margin-bottom: 0; }

/* =============================================
   NAV ACTIONS — toggles de idioma y tema
   ============================================= */
:root { --nav-scrolled-fg: #e6e8eb; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-btn, .lang-toggle {
  height: 38px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: #e6e8eb;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn { width: 38px; }
.lang-toggle {
  gap: 0.38rem;
  padding: 0 0.6rem;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.icon-btn:hover, .lang-toggle:hover {
  background: rgba(240,123,29,0.18);
  border-color: rgba(240,123,29,0.55);
  color: var(--orange-light);
}
.lang-globe { opacity: 0.9; }
.lang-caret { transition: transform var(--transition); opacity: 0.8; }
.lang-select.open .lang-caret { transform: rotate(180deg); }

/* Dropdown de idioma */
.lang-select { position: relative; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1100;
}
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--light);
  cursor: pointer;
  transition: var(--transition);
}
.lang-menu li:hover { background: rgba(240,123,29,0.14); color: var(--white); }
.lang-menu li.active { color: var(--orange); }
.lang-menu li.active .lang-abbr { background: var(--orange); color: #fff; border-color: var(--orange); }
.lang-abbr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--silver);
  flex-shrink: 0;
}
[data-theme="light"] .lang-menu { background: #ffffff; border-color: rgba(20,24,30,0.12); box-shadow: 0 16px 40px rgba(20,24,30,0.16); }
[data-theme="light"] .lang-abbr { border-color: rgba(20,24,30,0.18); }
[data-theme="light"] .lang-menu li.active .lang-abbr { color: #fff; }

.ic { display: none; }
[data-theme="dark"] .ic-sun { display: block; }
[data-theme="light"] .ic-moon { display: block; }

/* Nav text over the (always dark) hero */
.nav-links a { color: #e6e8eb; }
.hamburger span { background: #e6e8eb; }
.hero-scroll { color: rgba(230,232,235,0.65); }

/* Scrolled navbar text follows the active theme */
#navbar.scrolled .nav-links a,
#navbar.scrolled .nav-logo-text .brand { color: var(--nav-scrolled-fg); }
#navbar.scrolled .hamburger span { background: var(--nav-scrolled-fg); }
#navbar.scrolled .icon-btn,
#navbar.scrolled .lang-toggle { color: var(--nav-scrolled-fg); }
#navbar.scrolled .nav-links a.active,
#navbar.scrolled .nav-links a:hover { color: var(--orange); }

/* Chat-with-AI note (was inline styles) */
.contact-chat-note {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(240,123,29,0.07);
  border: 1px solid rgba(240,123,29,0.2);
  border-radius: var(--radius-lg);
}
.contact-chat-note p { font-size: 0.875rem; color: var(--silver); }
.contact-chat-title {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

/* =============================================
   LIGHT THEME — paleta clara (respeta la marca)
   ============================================= */
[data-theme="light"] {
  --charcoal: #e9ecef;
  --dark: #eef1f4;
  --dark-2: #f8f9fb;
  --dark-3: #ffffff;
  --mid: #dfe3e8;
  --slate: #eef1f4;
  --silver: #586069;
  --steel: #6b7280;
  --light: #2b3138;
  --shadow-card: 0 10px 30px rgba(20,24,30,0.10);
  --gradient-hero: linear-gradient(135deg, #eef0f3 0%, #ffffff 50%, #eef0f3 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
  --nav-scrolled-fg: #2a3037;
}

/* Headings flip to near-black on light surfaces */
[data-theme="light"] .section-title,
[data-theme="light"] .service-title,
[data-theme="light"] .project-name,
[data-theme="light"] .author-name { color: #15181c; }

/* Borders & card surfaces */
[data-theme="light"] .card,
[data-theme="light"] .service-card,
[data-theme="light"] .project-card,
[data-theme="light"] .gallery-item,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .contact-form { border-color: rgba(20,24,30,0.10); }

[data-theme="light"] .service-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .contact-form { box-shadow: 0 6px 22px rgba(20,24,30,0.06); }

[data-theme="light"] .filter-btn {
  border-color: rgba(20,24,30,0.16);
  color: var(--silver);
}

[data-theme="light"] .client-logo-item {
  background: #ffffff;
  border-color: rgba(20,24,30,0.08);
  box-shadow: 0 4px 16px rgba(20,24,30,0.05);
}
[data-theme="light"] .client-logo-item:hover {
  background: rgba(240,123,29,0.06);
  border-color: rgba(240,123,29,0.3);
}

/* Form fields */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: #ffffff;
  border-color: rgba(20,24,30,0.16);
  color: var(--light);
}
[data-theme="light"] .form-group select option { background: #ffffff; color: #2a3037; }
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  border-color: var(--orange);
  background: rgba(240,123,29,0.05);
}

/* Navbar (scrolled) on light */
[data-theme="light"] #navbar.scrolled {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 20px rgba(20,24,30,0.10);
  border-bottom-color: rgba(240,123,29,0.25);
}
[data-theme="light"] #navbar.scrolled .icon-btn,
[data-theme="light"] #navbar.scrolled .lang-toggle {
  background: rgba(20,24,30,0.05);
  border-color: rgba(20,24,30,0.16);
}

/* Footer borders */
[data-theme="light"] footer { border-top-color: rgba(20,24,30,0.08); }
[data-theme="light"] .footer-bottom { border-top-color: rgba(20,24,30,0.08); }
[data-theme="light"] .footer-brand .brand { color: #15181c; }

/* Hero stays dark — keep its text light regardless of theme */
[data-theme="light"] .hero-desc { color: #d3d7dd; }
[data-theme="light"] .hero-stat-label { color: #c3c8cf; }

/* Mobile menu stays a dark overlay — force light links */
[data-theme="light"] .mobile-menu a,
[data-theme="light"] .mobile-close { color: #e6e8eb; }

/* Chat in light theme */
[data-theme="light"] #ai-chat-panel { border-color: rgba(240,123,29,0.3); }
[data-theme="light"] .chat-msg.bot .chat-bubble { background: #eef1f4; color: #2a3037; }
[data-theme="light"] .chat-typing { background: #eef1f4; }
[data-theme="light"] .chat-input {
  background: #f2f4f7;
  border-color: rgba(20,24,30,0.14);
  color: #2a3037;
}
[data-theme="light"] .chat-input-area { border-top-color: rgba(20,24,30,0.08); }

/* Scrollbar track on light */
[data-theme="light"] ::-webkit-scrollbar-track { background: #e4e7eb; }

/* =============================================
   CLIENTES — carrusel de logos (marquee)
   ============================================= */
#clientes { overflow: hidden; }

.clients-marquee {
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.clients-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: clients-scroll 50s linear infinite;
}
.clients-marquee:hover .clients-track { animation-play-state: paused; }

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

.client-logo {
  flex: 0 0 auto;
  width: 178px;
  height: 92px;
  margin-right: 1.25rem;       /* margin (not gap) keeps the -50% loop seamless */
  background: #ffffff;
  border: 1px solid rgba(20,24,30,0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.15rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.20);
  transition: var(--transition);
}
.client-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.client-logo:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.3); }

[data-theme="light"] .client-logo {
  border-color: rgba(20,24,30,0.1);
  box-shadow: 0 6px 18px rgba(20,24,30,0.08);
}

@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
  .client-logo { width: 150px; height: 80px; margin-right: 0.9rem; }
}

/* =============================================
   TESTIMONIOS — logo de la empresa (sin nombres)
   ============================================= */
.testimonial-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.testimonial-logo img {
  max-height: 44px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* =============================================
   CHATBOT — respuestas rápidas (chips)
   ============================================= */
.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.6rem;
}
.chat-chip {
  font-family: var(--font-condensed);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(240,123,29,0.4);
  background: rgba(240,123,29,0.08);
  color: var(--orange);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.chat-chip:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.chat-bubble a { color: var(--orange); font-weight: 600; }
.chat-msg.user .chat-bubble a { color: #fff; text-decoration: underline; }

/* ---- FILE UPLOAD (formulario) ---- */
.file-field { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.file-field .file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(240,123,29,0.12);
  border: 1px solid rgba(240,123,29,0.4);
  color: var(--orange);
  cursor: pointer;
  font-family: var(--font-condensed);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition);
}
.file-field .file-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.file-input:focus-visible + .file-btn { outline: 2px solid var(--orange); outline-offset: 2px; }
.file-name { font-size: 0.85rem; color: var(--silver); word-break: break-all; }
.file-name.has-file { color: var(--light); font-weight: 600; }
.file-hint { font-size: 0.75rem; color: var(--silver); margin-top: 0.5rem; }
.form-status a { color: inherit; font-weight: 700; text-decoration: underline; }
