/* ============================================================
   TAKETECH · Hoja de estilos
   ============================================================ */

:root {
  --bg:        #080b16;
  --bg-2:      #0d1226;
  --surface:   #121a31;
  --surface-2: #18203c;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #e8edf7;
  --muted:     #9aa6c2;
  --primary:   #3b82f6;
  --primary-2: #06b6d4;
  --accent:    #ffd60a;
  --grad:      linear-gradient(120deg, #3b82f6 0%, #06b6d4 60%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(59,130,246,.18), rgba(6,182,212,.10));
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .7);
  --maxw:      1180px;
  --ease:      cubic-bezier(.22, 1, .36, 1);
}

/* ===== Tema SOFT (tenue / dim) ===== */
[data-theme="soft"] {
  --bg:        #151a2b;
  --bg-2:      #1b2138;
  --surface:   #212a45;
  --surface-2: #283357;
  --border:    rgba(255, 255, 255, 0.10);
  --text:      #dce3f2;
  --muted:     #9aa6c4;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .55);
}

/* ===== Tema LIGHT (claro) ===== */
[data-theme="light"] {
  --bg:        #eef2f9;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --surface-2: #f1f5fb;
  --border:    rgba(15, 23, 42, 0.10);
  --text:      #0f1729;
  --muted:     #51607a;
  --accent:    #d97706;
  --grad-soft: linear-gradient(120deg, rgba(59,130,246,.12), rgba(6,182,212,.07));
  --shadow:    0 24px 60px -24px rgba(15, 23, 42, .22);
}

/* ===== Tema FONDO (imagen de fondo) ===== */
[data-theme="image"] {
  --bg:        #080b16;
  --bg-2:      #0d1226;
  --surface:   rgba(18, 26, 49, 0.78);
  --surface-2: rgba(24, 32, 60, 0.78);
  --border:    rgba(255, 255, 255, 0.14);
  --text:      #e8edf7;
  --muted:     #b3bdd6;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .8);
}

[data-theme="image"] body {
  background-image:
    linear-gradient(180deg, rgba(8, 11, 22, .40), rgba(8, 11, 22, .55)),
    url("IMGS/Z_TKT/ext/FONDO01.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}

/* Las superficies con fondo propio también acompañan el cambio de tema */
.marquee-wrap, .feature-band, .kit-section, .contact-section, .site-footer,
.card, .product-card, .contact-form, .field input, .field textarea {
  transition: background-color .45s var(--ease), border-color .45s var(--ease),
              color .45s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}

/* El hero va siempre sobre una foto oscura: texto claro en cualquier tema */
.hero h1 { color: #ffffff; }
.hero .hero-sub { color: rgba(233, 238, 248, .82); }
.hero .hero-stats strong { color: #ffffff; }
.hero .hero-stats span { color: rgba(233, 238, 248, .68); }

h1, h2, h3, h4, .brand-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img {
  max-width: 100%; display: block;
  /* Disuasión de descarga: impedir arrastrar y seleccionar imágenes */
  -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; user-drag: none;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; /* iOS: evita el menú "Guardar imagen" al mantener pulsado */
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Barra de progreso ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 1000; transition: width .1s linear;
}

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .4s var(--ease), backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 11, 22, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #02101f; font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 22px -8px rgba(6,182,212,.7);
}
.brand-text { font-weight: 500; letter-spacing: .02em; }
.brand-text strong { color: var(--accent); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 9px 16px; border-radius: 999px; font-size: .95rem; font-weight: 500;
  color: var(--muted); transition: color .25s, background .25s;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav .nav-cta {
  color: #02101f; background: var(--grad); font-weight: 600;
  box-shadow: 0 10px 24px -12px rgba(6,182,212,.8);
}
.nav .nav-cta:hover { color: #02101f; filter: brightness(1.08); }

/* ===== Botón de tema (Dark / Soft / Light) ===== */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 14px;
  padding: 8px 14px 8px 12px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
[data-theme="light"] .theme-toggle { background: rgba(15, 23, 42, .04); }
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--primary-2); }
.theme-toggle .theme-icon { font-size: 1.05rem; line-height: 1; }
.theme-toggle .theme-label { letter-spacing: .02em; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn-primary { background: var(--grad); color: #02101f; box-shadow: 0 16px 34px -16px rgba(6,182,212,.8); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -16px rgba(6,182,212,.9); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-3px); }
.btn-block { width: 100%; }

/* ===== Botones de operador (descarga de conexiones) ===== */
/* Apilados en vertical, a la derecha del texto del hero. */
.operador-bar {
  display: flex; flex-direction: column; gap: 14px;
  flex-shrink: 0; align-self: center; width: 220px;
}
.op-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px 26px; border-radius: 12px;
  font-weight: 700; font-size: .95rem; letter-spacing: .03em; color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6);
  cursor: pointer; transition: transform .2s var(--ease), filter .2s, box-shadow .2s;
}
.op-btn:hover { transform: translateY(-3px); filter: brightness(1.12); }
.op-btn:active { transform: translateY(-1px); }
.op-azul  { background: #1d4ed8; }            /* Azul */
.op-rojo  { background: #dc2626; }            /* Rojo */
.op-verde { background: #16a34a; }            /* Verde */

/* ===== Mini-botones cuadrados, siempre visibles (lateral derecho) ===== */
.op-mini-bar {
  position: fixed; top: 50%; right: 0; transform: translateY(-50%);
  z-index: 950; display: flex; flex-direction: column; gap: 6px;
  padding: 6px; border-radius: 10px 0 0 10px;
  background: rgba(8, 11, 22, .55); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-right: 0;
}
.op-mini {
  /* Cuadrados de 34×34 px (ajusta este valor si los quieres mayores/menores) */
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; color: #fff; font-weight: 700; line-height: 1;
  font-size: 16px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2);
  transition: transform .15s var(--ease), filter .15s;
}
.op-mini:hover { transform: scale(1.25); filter: brightness(1.15); }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 70px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 75% 15%, rgba(6,182,212,.22), transparent 60%),
    radial-gradient(900px 540px at 10% 85%, rgba(59,130,246,.20), transparent 60%),
    linear-gradient(180deg, rgba(8,11,22,.55) 0%, rgba(8,11,22,.86) 70%, var(--bg) 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
}
.hero-content {
  position: relative; max-width: var(--maxw);
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
}
.hero-copy { max-width: 820px; }

.pill {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: .82rem;
  font-weight: 500; letter-spacing: .03em; color: var(--primary-2);
  background: rgba(6,182,212,.10); border: 1px solid rgba(6,182,212,.28); margin-bottom: 26px;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 700; margin-bottom: 22px; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); max-width: 640px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; }
.hero-stats div { display: flex; flex-direction: column; text-align: center; align-items: center; }
.hero-stats strong { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; line-height: 1; color: var(--text); }
.hero-stats span { font-size: .9rem; color: var(--muted); margin-top: 6px; }

/* ===== Marquee sectores ===== */
.marquee-wrap { border-block: 1px solid var(--border); background: var(--bg-2); padding: 22px 0; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee-track span { color: var(--muted); font-weight: 500; font-size: 1.05rem; white-space: nowrap; position: relative; }
.marquee-track span::before { content: "◆"; color: var(--primary-2); margin-right: 48px; font-size: .6rem; vertical-align: middle; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ===== Secciones genéricas ===== */
.section { padding: 110px 0; }
.section-head { max-width: 660px; margin: 0 auto 60px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--primary-2); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ===== Cards de servicios ===== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: var(--grad-soft); border: 1px solid var(--border); font-size: 1.4rem; margin-bottom: 20px;
}
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ===== Feature band ===== */
.feature-band { background: var(--bg-2); border-block: 1px solid var(--border); padding: 100px 0; }
.feature-band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-text h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 18px; }
.feature-text p { color: var(--muted); font-size: 1.05rem; margin-bottom: 24px; }
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; color: var(--text); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 6px; font-size: .75rem; font-weight: 700;
  color: #02101f; background: var(--grad);
}
.feature-media { position: relative; }
.feature-media img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.feature-media::after {
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(400px 200px at 80% 0%, rgba(6,182,212,.25), transparent 70%);
}

/* ===== Productos ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(6,182,212,.5); box-shadow: var(--shadow); }
.product-thumb {
  aspect-ratio: 16 / 10; overflow: hidden; padding: 14px;
  display: grid; place-items: center; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
}
.product-thumb img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55);
  transition: transform .5s var(--ease);
}
.product-card:hover .product-thumb img { transform: scale(1.04); }
.product-body { padding: 20px 20px 24px; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary-2); background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.25);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.product-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.product-body p { color: var(--muted); font-size: .92rem; }
.product-note { text-align: center; margin-top: 40px; color: var(--muted); }
.product-note a { color: var(--primary-2); font-weight: 600; }
.product-note a:hover { text-decoration: underline; }

/* ===== Kit Digital ===== */
.kit-section { background: var(--bg-2); border-top: 1px solid var(--border); }
.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.kit-card {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  min-height: 240px; display: flex; align-items: flex-end; isolation: isolate;
}
.kit-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.kit-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,11,22,.1) 0%, rgba(8,11,22,.55) 50%, rgba(8,11,22,.94) 100%); }
.kit-card:hover img { transform: scale(1.07); }
.kit-card-body { padding: 24px; }
.kit-card-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.kit-card-body p { color: var(--muted); font-size: .92rem; }

/* ===== Nosotros ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.about-badge {
  position: absolute; right: -16px; bottom: -22px; background: var(--grad); color: #02101f;
  border-radius: 16px; padding: 16px 22px; text-align: center; box-shadow: 0 18px 40px -16px rgba(6,182,212,.8);
}
.about-badge strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 2rem; line-height: 1; }
.about-badge span { font-size: .8rem; font-weight: 600; }
.about-text h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); margin-bottom: 18px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-values { display: grid; gap: 18px; margin-top: 30px; }
.about-values div { padding-left: 18px; border-left: 2px solid; border-image: var(--grad) 1; }
.about-values strong { display: block; font-size: 1.05rem; }
.about-values span { color: var(--muted); font-size: .94rem; }

/* ===== Tarjetas TAKETECH ===== */
.tarjetas-section { background: var(--bg-2); border-top: 1px solid var(--border); }
.tarjeta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
/* La primera tarjeta (anverso) abre fila completa junto a su reverso en pantallas anchas */
.tarjeta-card {
  margin: 0; position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.tarjeta-card:hover { transform: translateY(-6px); border-color: rgba(6,182,212,.5); }
.tarjeta-card img {
  display: block; width: 100%; height: auto; cursor: zoom-in;
  transition: transform .5s var(--ease);
}
/* Margen entre la imagen y el borde de la ficha (no aplica a la tarjeta con giro) */
.tarjeta-card:not(.tarjeta-flip) img {
  width: calc(100% - 28px); margin: 14px 14px 0; border-radius: 10px;
}
.tarjeta-card:hover img { transform: scale(1.04); }
.tarjeta-card::after {
  content: "🔍"; position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; display: grid; place-items: center; font-size: .9rem;
  background: rgba(8,11,22,.65); border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
  opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s; pointer-events: none;
}
.tarjeta-card:hover::after { opacity: 1; transform: scale(1); }
.tarjeta-card figcaption {
  padding: 14px 18px; font-size: .9rem; font-weight: 600; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---- Tarjeta con anverso/reverso: giro 3D al pasar el ratón ---- */
.tarjeta-flip { perspective: 1500px; }
.tarjeta-flip .flip-inner {
  position: relative; width: calc(100% - 28px); aspect-ratio: 724 / 453;
  margin: 14px 14px 0; /* mismo margen hasta el borde de la ficha que las demás tarjetas */
  transform-style: preserve-3d; transition: transform 1.4s var(--ease);
}
.tarjeta-flip:hover .flip-inner { transform: rotateY(180deg); }
.tarjeta-flip .flip-face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.tarjeta-flip .flip-face img {
  width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in;
}
.tarjeta-flip .flip-back { transform: rotateY(180deg); }
/* el giro sustituye al zoom de las demás tarjetas */
.tarjeta-flip:hover img { transform: none; }
/* la lupa gira con la cara, no la mostramos en la flip */
.tarjeta-flip::after { content: none; }

/* ===== Contacto ===== */
.contact-section { background: var(--bg-2); border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.contact-info > p { color: var(--muted); margin-bottom: 30px; }
.contact-list { list-style: none; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .ci {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid var(--border); font-size: 1.2rem;
}
.contact-list strong { color: var(--text); }
.contact-list a:hover { color: var(--primary-2); }

.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: grid; gap: 18px; box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #5e6b88; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(6,182,212,.18);
}
.field input.invalid, .field textarea.invalid { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.16); }
.form-status { font-size: .92rem; text-align: center; min-height: 1.2em; }
.form-status.ok { color: #34d399; }
.form-status.err { color: #f87171; }

/* ===== Footer ===== */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding-bottom: 48px; }
.footer-brand p { color: var(--muted); margin-top: 16px; max-width: 320px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-nav h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.footer-nav a { display: block; color: var(--text); padding: 5px 0; font-size: .95rem; transition: color .2s; }
.footer-nav a:hover { color: var(--primary-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 26px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .86rem;
}
.footer-legal a:hover { color: var(--primary-2); }

/* ===== Lightbox (compartido: productos y galería) ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center;
  background: rgba(4, 6, 14, .92); backdrop-filter: blur(6px); padding: 24px;
  animation: lb-fade .25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-figure img {
  max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); background: #0a0f1f;
}
.lb-figure figcaption { color: #e8edf7; font-size: .95rem; text-align: center; }
.lb-figure figcaption .lb-cat { color: var(--primary-2); font-weight: 600; }

.lb-close, .lb-nav {
  position: fixed; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18);
  cursor: pointer; display: grid; place-items: center; transition: background .25s, transform .2s var(--ease);
}
.lb-close { top: 20px; right: 24px; width: 46px; height: 46px; border-radius: 12px; font-size: 1.2rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }

/* --- Controles de zoom --- */
.lb-zoom { position: fixed; top: 20px; left: 24px; z-index: 2; display: flex; gap: 8px; }
.lb-tool {
  width: 46px; height: 46px; border-radius: 12px; font-size: 1.5rem; line-height: 1;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18);
  cursor: pointer; display: grid; place-items: center; transition: background .25s, transform .2s var(--ease);
}
.lb-tool:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.lb-tool:disabled { opacity: .35; cursor: default; transform: none; }

.lb-figure img { cursor: zoom-in; }

/* --- Estado ampliado (zoom ++): la imagen puede superar la pantalla y se recorre con scroll --- */
.lightbox.zoomed { display: block; overflow: auto; padding: 40px 20px; }
.lightbox.zoomed .lb-figure { max-width: none; max-height: none; width: max-content; margin: 0 auto; }
.lightbox.zoomed .lb-figure img { max-width: none; max-height: none; width: auto; cursor: zoom-out; }
.lightbox.zoomed.z-2 .lb-figure img { height: 130vh; }
.lightbox.zoomed.z-3 .lb-figure img { height: 200vh; }
.lightbox.zoomed.z-4 .lb-figure img { height: 300vh; }

@media (max-width: 520px) {
  .lb-nav { width: 44px; height: 44px; font-size: 1.6rem; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-zoom { left: 10px; top: 10px; }
}

/* Pista visual de que la imagen del producto es ampliable */
.product-thumb { cursor: zoom-in; position: relative; }
.product-thumb::after {
  content: "⤢"; position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  font-size: .95rem; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  opacity: 0; transform: scale(.85); transition: opacity .25s, transform .25s var(--ease);
}
.product-card:hover .product-thumb::after { opacity: 1; transform: scale(1); }

/* ===== Reveal on scroll ===== */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  /* El hero pasa a columna: los botones de operador se colocan debajo */
  .hero-content { flex-direction: column; align-items: flex-start; gap: 32px; }
  .operador-bar { flex-direction: row; flex-wrap: wrap; align-self: stretch; width: auto; }
  .operador-bar .op-btn { width: auto; flex: 1 1 160px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .kit-grid { grid-template-columns: repeat(2, 1fr); }
  .tarjeta-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-band-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-band-inner .feature-media { order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(8,11,22,.97); backdrop-filter: blur(14px); padding: 18px 24px 26px;
    border-bottom: 1px solid var(--border); transform: translateY(-130%); transition: transform .4s var(--ease);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 13px 16px; }
  .nav .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: flex; }
  .theme-toggle { margin-left: auto; margin-right: 6px; padding: 8px 10px; }
  .theme-toggle .theme-label { display: none; }
  .section { padding: 80px 0; }
  .hero-stats { gap: 28px; }
  .hero-stats strong { font-size: 2rem; }
  .cards-grid, .product-grid, .kit-grid, .tarjeta-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .about-badge { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
