/* ═══════════════════════════════════════════════════════════
   TK INDUSTRIAL — brand system from tkindustrial.com.mx
   Olive #718B44 · Black header/footer · Roboto Slab headings
═══════════════════════════════════════════════════════════ */
:root {
  --olive:        #718B44;
  --olive-dark:   #5C7236;
  --olive-deep:   #404E27;
  --ink:          #14261C;
  --black:        #000000;
  --graphite:     #4E5652;
  --gray:         #7A7A7A;
  --mist:         #F4F6F4;
  --ash:          #F0F0F0;
  --silver:       #DBDBDB;
  --white:        #FFFFFF;
  --overlay:      rgba(0, 0, 0, 0.55);
  --overlay-soft: rgba(20, 38, 28, 0.35);
  --slab: 'Roboto Slab', Georgia, serif;
  --sans: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
  --mont: 'Montserrat', var(--sans);
  --ease: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, textarea { font-family: inherit; font-size: 15px; }

/* Headings — Roboto Slab like the original site */
.h-hero {
  font-family: var(--slab);
  font-size: clamp(34px, 5.5vw, 58px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.h-section {
  font-family: var(--slab);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.2;
}
.section-title {
  color: var(--ink);
  text-align: center;
  position: relative;
  padding-bottom: 18px;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 4px;
  background: var(--olive);
  border-radius: 2px;
}

/* ═══ NAVIGATION — transparent over hero → solid black on scroll ═══ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0));
  transition: background var(--ease);
}
.nav.scrolled,
.nav.open {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-brand img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 3px;
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  transition: color var(--ease), background-color var(--ease);
}
.nav-links a:hover { color: #C9D8A8; }

.nav-cta {
  background: var(--olive-deep);
  color: var(--white) !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--olive); color: var(--white) !important; }

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 12px;
}

/* ═══ BUTTONS — olive, bold, like the original ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 28px;
  border: none;
  border-radius: 3px;
  font-family: var(--mont);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn-primary { background: var(--olive); color: var(--white); }
.btn-primary:hover { background: var(--olive-deep); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--ink); }

/* ═══ HERO — real banner photo, dark overlay ═══ */
.hero {
  position: relative;
  overflow: hidden; /* clips the over-scaled parallax video */
  height: 100svh;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 96px 24px 64px;
  text-align: center;
  background: var(--ink) url("img/tk-hero-poster.jpg") center/cover no-repeat;
  color: var(--white);
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12); /* headroom for the parallax drift */
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.6));
}
.hero > :not(.hero-video):not(.hero-scroll) { position: relative; z-index: 2; }

.hero-title { color: var(--white); text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.hero-sub {
  margin-top: 16px;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}
.hero-promo {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 26px;
  background: var(--olive);
  border-radius: 3px;
  font-family: var(--mont);
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ═══ SECTIONS ═══ */
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(64px, 10vh, 110px) clamp(16px, 4vw, 32px);
  scroll-margin-top: 64px;
}
.section-ash { background: var(--mist); }
.section-sub {
  margin-top: 20px;
  max-width: 680px;
  text-align: center;
  font-size: 16px;
  color: var(--gray);
  line-height: 1.7;
}

/* ═══ NOSOTROS ═══ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin-top: 56px;
  width: 100%;
  max-width: 1140px;
}
.about-img {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(20, 38, 28, 0.18);
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h3 {
  font-family: var(--slab);
  font-size: 21px;
  font-weight: 600;
  color: var(--olive-deep);
  margin-bottom: 8px;
}
.about-text p {
  font-size: 15px;
  color: var(--graphite);
  line-height: 1.75;
}
.about-block + .about-block { margin-top: 28px; }
.about-values {
  list-style: none;
  font-size: 15px;
  color: var(--graphite);
  line-height: 2.1;
}
.about-values li { padding-left: 20px; position: relative; }
.about-values li::before {
  content: "■";
  position: absolute;
  left: 0;
  font-size: 10px;
  top: 2px;
  color: var(--olive);
}

/* Metrics — green banner band like the original */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 16px;
  margin-top: 72px;
  width: 100%;
  max-width: 1140px;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: 6px;
  background: var(--olive-deep) url("img/BANNER-VERDE.jpg") center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.metrics::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(64, 78, 39, 0.82);
}
.metric { text-align: center; position: relative; }
.metric-value {
  font-family: var(--slab);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}
.metric-label {
  margin-top: 8px;
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* Certifications */
.certs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 56px;
  justify-content: center;
}
.cert-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 6px;
  padding: 18px 28px;
}
.cert-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.cert-card span {
  font-family: var(--slab);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.cert-card small {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}

/* ═══ PROCESOS — photo cards ═══ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 64px;
  width: 100%;
  max-width: 1200px;
}
.process-card {
  text-align: center;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(20, 38, 28, 0.1);
  padding-bottom: 24px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.process-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(20, 38, 28, 0.16);
}
.process-img {
  height: 210px;
  overflow: hidden;
  background: var(--ash);
  position: relative;
}
.process-img::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--olive);
}
.process-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.process-card:hover .process-img img { transform: scale(1.05); }
.process-name {
  margin-top: 22px;
  font-family: var(--slab);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.process-desc {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.65;
  padding: 0 20px;
}
.process-links {
  margin-top: 16px;
  display: flex;
  gap: 28px;
  justify-content: center;
}
.text-link {
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 700;
  color: var(--olive);
  transition: color var(--ease);
}
.text-link:hover { color: var(--olive-deep); }

/* ═══ INGENIERÍA & HERRAMIENTAS ═══ */
.eng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin-top: 56px;
  width: 100%;
  max-width: 1140px;
}
.eng-img {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(20, 38, 28, 0.18);
}
.eng-img img { width: 100%; height: 100%; object-fit: cover; }
.eng-list { list-style: none; }
.eng-list li {
  padding: 20px 0 20px 34px;
  border-bottom: 1px solid var(--silver);
  position: relative;
}
.eng-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eng-list li:last-child { border-bottom: none; }
.eng-list strong {
  display: block;
  font-family: var(--slab);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.eng-list span {
  display: block;
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.6;
}

/* ═══ INDUSTRIAS — full-bleed photo category cards ═══ */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 64px;
  width: 100%;
  max-width: 1200px;
}
.industry-card {
  position: relative;
  height: 300px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink);
}
.industry-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s, opacity var(--ease);
}
.industry-card:hover img { transform: scale(1.06); opacity: 0.85; }
.industry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0) 55%, rgba(0,0,0,0.75));
}
.industry-card .industry-label {
  position: absolute;
  bottom: 18px;
  left: 20px;
  color: var(--white);
  font-family: var(--slab);
  font-size: 20px;
  font-weight: 700;
  z-index: 1;
}
.industry-card .industry-label::after {
  content: "";
  display: block;
  margin-top: 6px;
  width: 40px;
  height: 3px;
  background: var(--olive);
  border-radius: 2px;
  transition: width var(--ease);
}
.industry-card:hover .industry-label::after { width: 64px; }

/* ═══ GALERÍA ═══ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 64px;
  width: 100%;
  max-width: 1200px;
}
.gallery-item {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--ash);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-more { margin-top: 48px; }

/* ═══ CTA BANNER — black & white banner like the original ═══ */
.cta-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: clamp(72px, 12vh, 120px) 24px;
  text-align: center;
  background: var(--ink) url("img/Blanco-y-negro-BANNER.jpg") center/cover no-repeat;
  color: var(--white);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: var(--white); }
.cta-banner p {
  font-family: var(--mont);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.cta-banner .btn { margin-top: 10px; }

/* ═══ CONTACTO ═══ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  margin-top: 64px;
  width: 100%;
  max-width: 1080px;
}
.contact-block h3 {
  font-family: var(--slab);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  padding-left: 14px;
  border-left: 4px solid var(--olive);
}
.contact-block p, .contact-block address {
  font-style: normal;
  font-size: 15px;
  color: var(--graphite);
  line-height: 1.8;
}
.contact-block + .contact-block { margin-top: 30px; }
.contact-block a { color: var(--olive-deep); font-weight: 500; transition: color var(--ease); }
.contact-block a:hover { color: var(--olive); }
.map-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--white);
  border-radius: 6px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 10px 30px rgba(20, 38, 28, 0.1);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--silver);
  border-radius: 3px;
  background: var(--mist);
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease), background-color var(--ease);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--gray); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--olive); background: var(--white); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 12.5px; color: var(--gray); }

/* ═══ FOOTER — black like the original ═══ */
.footer {
  padding: 56px 24px 110px;
  text-align: center;
  background: var(--black);
  color: var(--white);
}
.footer-logo {
  height: 24px;
  width: auto;
  margin: 0 auto 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  list-style: none;
  margin-bottom: 20px;
}
.footer-links a {
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--ease);
}
.footer-links a:hover { color: #C9D8A8; }
.footer-copy { font-size: 13.5px; color: rgba(255, 255, 255, 0.5); }
.footer-copy a { color: rgba(255, 255, 255, 0.7); }
.footer-copy a:hover { color: var(--white); }

/* ═══ PERSISTENT CONTACT BAR ═══ */
.contact-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.contact-bar-label {
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.contact-bar .btn {
  min-width: 140px;
  min-height: 38px;
  padding: 6px 20px;
  font-size: 14px;
}
.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}
.btn-whatsapp:hover { background: #1DA851; }

/* ═══ POLISH — brand details ═══ */
::selection { background: var(--olive); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 2px;
  border-radius: 3px;
}

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ash); }
::-webkit-scrollbar-thumb { background: #9aa88a; border-radius: 6px; border: 2px solid var(--ash); }
::-webkit-scrollbar-thumb:hover { background: var(--olive); }

.eyebrow {
  font-family: var(--mont);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 12px;
}

/* nav gains depth once it goes solid */
.nav.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35); }

/* primary buttons: arrow slides in on hover */
.btn-primary::after {
  content: "→";
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-6px);
  transition: max-width var(--ease), opacity var(--ease), transform var(--ease), margin-left var(--ease);
}
.btn-primary:hover::after {
  max-width: 20px;
  margin-left: 10px;
  opacity: 1;
  transform: translateX(0);
}

/* hero scroll cue — mouse outline with drifting dot */
.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 26px;
  left: calc(50% - 13px); /* centered without transform — fadeUp owns transform */
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  animation: fadeUp 0.9s 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-scroll span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--white);
  animation: scrollcue 1.8s ease-in-out infinite;
}
.hero-scroll:hover { border-color: var(--white); }
@keyframes scrollcue {
  0%   { transform: translateY(0);    opacity: 1; }
  60%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* photos fade in as they finish loading — no pop-in */
.img-fade { opacity: 0; transition: opacity 0.6s ease-out; }
.img-fade.loaded { opacity: 1; }

/* gallery hover affordance */
.gallery-item { position: relative; }
.gallery-item::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 300;
  color: var(--white);
  background: rgba(64, 78, 39, 0.45);
  opacity: 0;
  transition: opacity var(--ease);
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }

/* ═══ PRELOADER ═══ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--black);
  transition: opacity 0.6s, visibility 0.6s;
}
.preloader img { height: 30px; width: auto; animation: pulse 1.4s ease-in-out infinite; }
.preloader-bar {
  width: 180px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: var(--olive);
  animation: loadslide 1.1s ease-in-out infinite;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes loadslide {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(500%); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ═══ SCROLL PROGRESS BAR ═══ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 110;
  width: 100%;
  height: 3px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ═══ NAV ACTIVE LINK (scrollspy) ═══ */
.nav-links a.active { color: #C9D8A8; }
.nav-links a.active:not(.nav-cta) { box-shadow: inset 0 -2px 0 0 var(--olive); border-radius: 3px 3px 0 0; }

/* ═══ HERO ENTRANCE ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-title   { animation: fadeUp 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-sub     { animation: fadeUp 0.9s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-promo   { animation: fadeUp 0.9s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-ctas    { animation: fadeUp 0.9s 0.75s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ═══ SCROLL REVEAL ═══ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ═══ LIGHTBOX ═══ */
.gallery-item { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox.open .lb-img { animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.lb-caption {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mont);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 0 16px;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  transition: background-color var(--ease);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--olive); }
.lb-close { top: 20px; right: 20px; font-size: 30px; }
.lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ═══ BACK TO TOP ═══ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 76px;
  z-index: 95;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--olive);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease), background-color var(--ease);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--olive-deep); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-card:last-child { grid-column: 1 / -1; height: 240px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.96);
    padding: 8px 16px 20px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links {
    max-height: calc(100svh - 64px);
    overflow-y: auto; /* short landscape screens can still reach every link */
  }
  .nav-links a { padding: 13px 14px; }
  .nav-cta { margin-left: 0; text-align: center; }

  .hero { gap: 36px; }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; margin: 0 auto; }
  .hero-ctas .btn { width: 100%; }

  .about-grid, .eng-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-img { order: -1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .industry-card { height: 220px; }
  .industry-card .industry-label {
    font-size: 16px;
    left: 14px;
    right: 12px;
    bottom: 14px;
    hyphens: auto;        /* "Electrodomésticos" fits half-width cards */
    overflow-wrap: break-word;
  }
  .contact-bar-label { display: none; }
  .certs { flex-direction: column; align-items: center; }
  .cert-card { width: 100%; max-width: 360px; }

  /* long emails/links never push the layout sideways */
  .contact-block p, .contact-block address, .form-note { overflow-wrap: anywhere; }

  /* lightbox controls sized for thumbs, clear of the photo */
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 17px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 10px; right: 10px; width: 42px; height: 42px; }
  .lb-img { max-width: 94vw; max-height: 72vh; }
  .lb-caption { bottom: 16px; width: 100%; }
}

@media (max-width: 480px) {
  /* sticky contact bar: buttons share the width instead of forcing it */
  .contact-bar { gap: 10px; padding: 8px 12px; }
  .contact-bar .btn { flex: 1; min-width: 0; padding: 6px 10px; }
  .back-to-top { right: 14px; bottom: 68px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 24px 8px; padding: 28px 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .hero-promo { padding: 8px 18px; }
  .hero-ctas { max-width: 280px; }
  .section-sub { font-size: 15px; }
  .cta-banner p { letter-spacing: 0.5px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .process-card:hover, .industry-card:hover img, .gallery-item:hover img { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
