/* ===== Tecnogama — estilos ===== */
:root {
  --red: #e5202b;
  --red-dark: #b8141e;
  --ink: #1a1a1d;
  --ink-2: #3c3c43;
  --muted: #6b6b75;
  --line: #e6e6ea;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --dark: #141417;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 20, 23, .08);
  --shadow-lg: 0 24px 60px rgba(20, 20, 23, .16);
  --header-h: 76px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; margin-top: 40px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid var(--red);
  background: var(--red); color: #fff; font: 600 .95rem var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(229, 32, 43, .3); }
.btn--sm { padding: 9px 20px; font-size: .9rem; }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; }
.btn--outline { background: transparent; color: var(--red); }
.btn--outline:hover { color: #fff; }
.btn--outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline-dark:hover { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }

.eyebrow {
  font: 700 .8rem var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin: 0 0 12px; display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--red); }

/* ===== Encabezado ===== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; color: #fff;
  transition: background .3s, box-shadow .3s, color .3s, height .3s;
}
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
.header.is-scrolled { color: var(--ink); box-shadow: 0 2px 20px rgba(0,0,0,.06); height: 64px; }
.header.is-scrolled::before { opacity: 1; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.logo__name { font: 800 clamp(1.75rem, 2.6vw, 2.3rem) var(--font-head); color: var(--red); letter-spacing: -.01em; }
.logo__name--light { font: 800 1.4rem var(--font-head); color: #fff; }
.logo__tag { font-size: clamp(.5rem, .75vw, .66rem); letter-spacing: .045em; text-transform: uppercase; margin-top: 5px; opacity: .85; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding: 4px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:not(.btn):hover::after, .nav a.is-current::after { transform: scaleX(1); }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; background: currentColor; margin: 6px 0; transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--dark); }
.hero__slides, .hero__slide, .hero__overlay { position: absolute; inset: 0; }
.hero__slide { background-size: cover; background-position: center; opacity: 0; transform: scale(1.08); transition: opacity 1.2s ease, transform 7s ease-out; }
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__overlay { background: linear-gradient(100deg, rgba(14,14,17,.92) 0%, rgba(14,14,17,.7) 45%, rgba(14,14,17,.25) 100%); }
.hero__content { position: relative; z-index: 2; padding: calc(var(--header-h) + 40px) 0 100px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; max-width: 820px; }
/* la palabra roja va en su propio renglón y con altura fija, para que nada salte al cambiar */
.rotator { color: var(--red); display: block; min-height: 1.15em; transition: opacity .35s, transform .35s; }
@media (max-width: 700px) { .rotator { min-height: 2.3em; } }
.rotator.is-out { opacity: 0; transform: translateY(12px); }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 600px; color: rgba(255,255,255,.85); margin: 0 0 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__dots { position: absolute; z-index: 3; bottom: 32px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero__dots button { width: 28px; height: 4px; border: 0; border-radius: 4px; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: background .3s, width .3s; }
.hero__dots button.is-active { background: var(--red); width: 44px; }

/* ===== Cifras ===== */
.stats { background: var(--red); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 20px; text-align: center; border-right: 1px solid rgba(255,255,255,.2); }
.stat:last-child { border-right: 0; }
.stat__num { display: block; font: 800 clamp(2rem, 4vw, 3rem) var(--font-head); line-height: 1; }
.stat__label { font-size: .9rem; opacity: .9; }

/* ===== Secciones ===== */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__lead { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ===== Proceso ===== */
.process { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.process__tabs { display: flex; flex-direction: column; gap: 6px; position: relative; }
.process__tab {
  text-align: left; background: none; border: 0; border-left: 3px solid var(--line);
  padding: 16px 20px; font: 600 1.05rem var(--font-head); color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.process__tab span { display: block; font-size: .75rem; letter-spacing: .1em; color: var(--red); margin-bottom: 2px; }
.process__tab:hover { color: var(--ink); background: var(--bg-alt); }
.process__tab.is-active { color: var(--ink); border-color: var(--red); background: var(--bg-alt); }
.process__bar { height: 3px; background: var(--line); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.process__fill { height: 100%; width: 0; background: var(--red); }
.process__panel {
  background: var(--dark); color: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
  min-height: 300px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.process__panel::after { content: attr(data-num); position: absolute; right: 20px; bottom: -30px; font: 800 10rem var(--font-head); color: rgba(255,255,255,.05); line-height: 1; pointer-events: none; }
.process__panel h3 { font-size: 1.6rem; }
.process__panel p { color: rgba(255,255,255,.8); max-width: 560px; }
.process__panel ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.process__panel li { display: flex; gap: 10px; align-items: flex-start; }
.process__panel li::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 3px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.process__panel .fade { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== Marcas ===== */
.brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.brand {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px 22px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 16px; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.brand::before { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.brand:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.brand:hover::before { transform: scaleX(1); }
.brand__logo { height: 80px; display: flex; align-items: center; justify-content: center; }
.brand__logo img { max-height: 70px; max-width: 85%; object-fit: contain; transition: transform .3s; }
.brand:hover .brand__logo img { transform: scale(1.05); }
.brand__name { font: 700 1.05rem var(--font-head); margin: 0; }
.brand__desc { font-size: .88rem; color: var(--muted); margin: 0; flex: 1; }
.brand__more { font-size: .85rem; font-weight: 600; color: var(--red); display: flex; align-items: center; gap: 6px; }
.brand__more::after { content: "→"; transition: transform .2s; }
.brand:hover .brand__more::after { transform: translateX(4px); }

/* ===== Modal ===== */
.modal { border: 0; border-radius: 18px; padding: 0; width: min(620px, 100% - 32px); max-height: 90vh; box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(14,14,17,.6); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .3s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-alt); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal__close:hover { background: var(--line); }
.modal__body { padding: 36px; }
.modal__logo { height: 70px; margin-bottom: 18px; }
.modal__logo img { max-height: 70px; max-width: 220px; object-fit: contain; }
.modal__body h3 { font-size: 1.5rem; margin-bottom: 4px; }
.modal__country { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.modal__body h4 { font: 700 .8rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; margin: 24px 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg-alt); border-radius: 999px; padding: 6px 14px; font-size: .85rem; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== Maquinaria ===== */
.filters { display: flex; flex-direction: column; gap: 18px; margin-bottom: 32px; }
.search { position: relative; max-width: 460px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { width: 100%; padding: 14px 18px 14px 46px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--bg-alt); transition: border-color .2s, background .2s; }
.search input:focus { outline: none; border-color: var(--red); background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font: 500 .88rem var(--font-body); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.machine {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff;
  display: flex; flex-direction: column; gap: 8px; transition: transform .25s, box-shadow .25s, opacity .3s;
  animation: fadeUp .4s ease both;
}
.machine:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.machine__cat { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.machine h3 { font-size: 1.08rem; margin: 0; }
.machine__brand { font-size: .88rem; color: var(--muted); margin: 0; flex: 1; }
.machine__link { font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }
.machine__link:hover { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.empty a { color: var(--red); font-weight: 600; }

/* ===== Clientes ===== */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 20px; width: max-content; animation: scroll 60s linear infinite; padding: 8px 0; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.client { width: 170px; height: 110px; flex: none; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.client img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform .3s; }
.client:hover img { transform: scale(1.06); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== Videos ===== */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; border: 0; padding: 0; box-shadow: var(--shadow); }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; opacity: .85; }
.video:hover img { transform: scale(1.05); opacity: 1; }
.video__play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--red); display: grid; place-items: center; transition: transform .25s; box-shadow: 0 0 0 0 rgba(229,32,43,.6); animation: pulse 2.2s infinite; }
.video__play::after { content: ""; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.video:hover .video__play { transform: scale(1.1); }
.video iframe { width: 100%; height: 100%; border: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 18px rgba(229,32,43,0); } 100% { box-shadow: 0 0 0 0 rgba(229,32,43,0); } }

/* ===== Contacto ===== */
.contact { background: var(--dark); color: #fff; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact__info > p { color: rgba(255,255,255,.75); }
.contact__list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 16px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__list svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--red); stroke-width: 2; margin-top: 2px; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--red); }
.map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: #222; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.form { background: #fff; color: var(--ink); border-radius: 18px; padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; box-shadow: var(--shadow-lg); }
.form h3 { font-size: 1.5rem; margin: 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.form input, .form select, .form textarea { font: 400 1rem var(--font-body); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); color: var(--ink); transition: border-color .2s, background .2s; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--red); background: #fff; }
.form textarea { resize: vertical; }
.form .is-invalid { border-color: var(--red); }
.form__error { color: var(--red); font-size: .88rem; margin: 0; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== Footer ===== */
.footer { background: #0c0c0e; color: rgba(255,255,255,.6); padding: 40px 0; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer p { margin: 4px 0 0; }
.footer__social { display: flex; gap: 12px; }
.footer__social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .2s; }
.footer__social a:hover { background: var(--red); }
.footer__social svg { width: 20px; height: 20px; fill: #fff; }
.footer__copy { width: 100%; text-align: center; border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; }

/* ===== WhatsApp flotante ===== */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .25s; }
.wa-float:hover { transform: scale(1.1) rotate(-6deg); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ===== Animación al hacer scroll ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .brands { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: 1fr; }
  .process__tabs { flex-direction: row; overflow-x: auto; gap: 0; }
  .process__tab { border-left: 0; border-bottom: 3px solid var(--line); white-space: nowrap; font-size: .95rem; }
  .process__tab.is-active { border-color: var(--red); }
  .process__bar { display: none; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); flex-direction: column; align-items: flex-start;
    background: #fff; color: var(--ink); padding: 96px 32px 32px; gap: 22px;
    transform: translateX(100%); transition: transform .35s ease; box-shadow: var(--shadow-lg);
  }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { font-size: 1.15rem; }
  .burger { position: relative; z-index: 60; }
  .header.menu-open { color: var(--ink); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.2); }
  .videos { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .brands { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .hero__ctas .btn { width: 100%; }
  .client { width: 130px; height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
