/* =========================================================
   Zenit Group — estilos compartidos por todas las páginas
   Para cambiar colores o tipografías, edita las variables de :root
   ========================================================= */

/* ---------- Tipografías alojadas en el sitio (licencia OFL, ver carpeta fonts) ----------
   Fuentes variables: un solo archivo cubre todos los grosores usados.
   Subconjunto "latin": incluye todos los caracteres del español. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --text: #141414;
  --muted: #6b6b6b;
  --line: #e6e6e3;
  --accent: #141414;

  /* Toques CMYK, guiño a la imprenta */
  --c: #00a3e0;
  --m: #e6007e;
  --y: #ffd400;
  --k: #141414;

  --radius: 14px;
  --container: 1160px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* Evita que Safari en iPhone agrande el texto al girar la pantalla */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
strong, b { font-weight: 600; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
h4,
.footer__title,
.tabs__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1 em { font-style: normal; color: var(--muted); }

p { margin: 0 0 1em; text-wrap: pretty; }

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

.eyebrow {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-bottom: 1.2em;
}

/* Subrayado de tintas CMYK: el sello de la imprenta */
.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c) 0 25%, var(--m) 25% 50%, var(--y) 50% 75%, var(--k) 75%);
}

.lead { font-size: 1.125rem; line-height: 1.6; color: var(--muted); max-width: 560px; }

/* ---------- Botones ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--small { padding: 9px 18px; font-size: 0.88rem; }
.btn--full { width: 100%; }
.btn--light { background: #fff; color: var(--text); border-color: #fff; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn--outline-light:hover { border-color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Blanco casi sólido: mismo aspecto que un desenfoque, sin costo de procesador al desplazarse */
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo: símbolo Cénit + nombre */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 34px; height: 34px; color: var(--text); flex-shrink: 0; }
.logo__text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.logo__text small {
  display: block;
  margin-top: 4px;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s ease;
}
.nav a:not(.btn):hover,
.nav a.is-active:not(.btn) { color: var(--text); }
.nav a.is-active:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text);
  transition: transform .3s ease, top .3s ease;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Hero de Inicio ---------- */
.hero { padding: 80px 0 100px; overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
}

.hero__visual { position: relative; height: 440px; }

.stack { position: absolute; inset: 20px 60px 40px 20px; }
.sheet {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.18);
}
.sheet--3 { transform: rotate(-8deg) translate(-12px, 10px); background: var(--bg-alt); }
.sheet--2 { transform: rotate(-3deg) translate(-4px, 4px); }
.sheet--1 {
  transform: rotate(3deg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: float 6s ease-in-out infinite;
}
.sheet__lines span {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--bg-alt);
  margin-bottom: 14px;
}
.sheet__lines span:first-child { height: 22px; width: 70%; background: var(--text); margin-bottom: 26px; }
.sheet__lines .short { width: 55%; }

.cmyk { display: flex; gap: 10px; }
.cmyk i { width: 26px; height: 26px; border-radius: 50%; mix-blend-mode: multiply; }
.cmyk .c { background: var(--c); }
.cmyk .m { background: var(--m); margin-left: -18px; }
.cmyk .y { background: var(--y); margin-left: -18px; }
.cmyk .k { background: var(--k); margin-left: 6px; }

.cube {
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 120px;
  height: 130px;
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.18));
  animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ---------- Encabezado de páginas internas ---------- */
.page-hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 760px; }
.page-hero .lead { margin-bottom: 0; }

.page-hero--split .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section--compact { padding: 64px 0; }
.page-hero + .section { padding-top: 64px; }
.section__head { max-width: 620px; margin-bottom: 48px; }
.section__head p { color: var(--muted); margin: 0; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
/* Encabezado con enlace a la derecha (ej. "Ver todos los trabajos") */
.section__head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}
.section__head--split > div { max-width: 620px; }
/* "Trabajos recientes" en Inicio: línea divisoria con la sección siguiente (ambas son blancas) */
.section--recientes + .section > .container {
  padding-top: 96px;
  /* Línea alineada con el contenido (sin invadir el margen lateral) */
  background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 48px) 1px no-repeat;
}
.section--recientes + .section { padding-top: 0; }

/* ---------- Cifras ---------- */
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__grid--3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  padding: 8px 24px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
a.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.2);
}
.card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-alt);
  margin-bottom: 20px;
}
.card__icon svg { width: 24px; height: 24px; }
.card p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.card .link-arrow { margin-top: auto; padding-top: 18px; }

/* Tarjeta compacta: solo icono y título */
.card--tile { align-items: center; text-align: center; padding: 32px 20px; }
.card--tile .card__icon { margin-bottom: 14px; }
.card--tile h3 { margin: 0; font-size: 1.02rem; }
.card--tile p { margin-top: 6px; font-size: 0.88rem; }

.icon--c { color: var(--c); }
.icon--m { color: var(--m); }
.icon--y { color: #c9a600; }
.icon--k { color: var(--k); }

/* Lista con palomita */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding: 9px 0 9px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--text) 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Etiquetas */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips--center { justify-content: center; }
.chips li {
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.93rem;
}

/* ---------- Pestañas (Servicios) ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  margin-bottom: 40px;
  background: var(--bg-alt);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.93rem var(--font-body);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.2);
}
.tabs__tab:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tabs__dot { width: 8px; height: 8px; border-radius: 50%; }
.tabs__dot--c { background: var(--c); }
.tabs__dot--m { background: var(--m); }
.tabs__dot--y { background: var(--y); }
.tabs__dot--k { background: var(--k); }

.tabs__panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  animation: fadeIn .35s ease;
}
.tabs__panel[hidden] { display: none; }
.tabs__panel h2 { margin-bottom: 0.4em; }
.tabs__panel .lead { font-size: 1.05rem; }
.tabs__group + .tabs__group { margin-top: 28px; }
.tabs__label { margin: 0 0 14px; }
.footer__title { margin: 0 0 0.9em; line-height: 1.15; }

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

/* Aviso con enlace */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 24px 32px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.banner p { margin: 0; font-weight: 500; }
.section--alt .banner { background: #fff; border: 1px solid var(--line); }

/* ---------- Animación 3D: el logo se imprime ---------- */
.print-box {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 40px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.printlogo { width: 100%; max-width: 230px; height: auto; overflow: visible; }
.print-box__caption { margin: 16px 0 0; color: var(--muted); font-size: 0.9rem; }

/* El anillo se dibuja tinta por tinta: cian, magenta y amarillo */
/* Cada arco mide 126 unidades (un tercio del anillo de radio 60) */
.printlogo__arc { fill: none; stroke-width: 12.6; stroke-dasharray: 126; stroke-dashoffset: 126; }
.printlogo__arc--c { stroke: var(--c); animation: drawC 7s linear infinite; }
.printlogo__arc--m { stroke: var(--m); animation: drawM 7s linear infinite; }
.printlogo__arc--y { stroke: var(--y); animation: drawY 7s linear infinite; }

/* Al terminar el anillo aparece el punto negro (K) */
.printlogo__dot { fill: var(--k); transform-box: fill-box; transform-origin: center; animation: dotK 7s ease-out infinite; }
.printlogo__drawing { animation: printFade 7s linear infinite; }
.printlogo__head { animation: headFade 7s linear infinite; }

@keyframes drawC { 0% { stroke-dashoffset: 126; } 22%, 100% { stroke-dashoffset: 0; } }
@keyframes drawM { 0%, 22% { stroke-dashoffset: 126; } 44%, 100% { stroke-dashoffset: 0; } }
@keyframes drawY { 0%, 44% { stroke-dashoffset: 126; } 66%, 100% { stroke-dashoffset: 0; } }
@keyframes dotK { 0%, 72% { transform: scale(0); } 78% { transform: scale(1.15); } 82%, 100% { transform: scale(1); } }
@keyframes printFade { 0%, 90% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes headFade { 0%, 66% { opacity: 1; } 72%, 96% { opacity: 0; } 100% { opacity: 1; } }

/* ---------- Pasos ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.steps--compact { grid-template-columns: 1fr; gap: 20px; }
.steps--compact .step { border-top-width: 1px; padding-top: 16px; }
.steps--compact .step h3 { margin-bottom: 0.25em; }
.step { border-top: 2px solid var(--text); padding-top: 20px; }
.step__num {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.step p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- Franja de llamada a la acción ---------- */
.cta { background: var(--text); color: #fff; padding: 80px 0; }
.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta h2 { margin-bottom: 0.3em; }
.cta p { color: rgba(255, 255, 255, 0.7); margin: 0; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact__list { list-style: none; padding: 0; margin: 0; }
.contact__list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__list li:first-child { padding-top: 0; }
.contact__list li:last-child { border-bottom: 0; }
.contact__list span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact__list a, .contact__list p { font-weight: 500; margin: 0; }
.contact__list a:hover { text-decoration: underline; }

.form {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form h2 { font-size: 1.5rem; margin-bottom: 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
}
.form input,
.form select,
.form textarea {
  /* Quita los estilos propios de cada navegador para que se vean iguales */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 1rem; /* 16px: evita que el iPhone haga zoom al escribir */
  line-height: 1.4;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form select {
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}
.form textarea { resize: vertical; min-height: 120px; }
.form ::placeholder { color: #8a8a8a; opacity: 1; }
.form select:invalid { color: #8a8a8a; }
.form select option { color: var(--text); }
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}
.form .is-invalid { border-color: var(--m); }
.form__note { margin: 0; font-size: 0.9rem; color: var(--muted); }
.form__legal { margin: -4px 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.form__legal a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.form__note:empty { display: none; }
.form__note.is-success { color: #0a7a4a; font-weight: 500; }
.form__note.is-error { color: var(--m); font-weight: 500; }
.form__hp { display: none; }
.form button[disabled] { opacity: 0.6; cursor: wait; }

.map {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 21 / 9;
  background: #fff;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Vista ligera antes de cargar el mapa */
.map__placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background-color: #fff;
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}
.map__pin { width: 40px; height: 40px; color: var(--m); }
.map__address { margin: 0; font-weight: 500; }

/* ---------- Sección destacada con foto (ej. Figuras personalizadas) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.feature__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.25);
}
.feature__text .checklist { margin: 1.4em 0 0; }
/* Variante con la foto a la derecha (en celular la foto siempre va arriba) */
.feature--reverse { grid-template-columns: 0.95fr 1.05fr; }
.feature--reverse .feature__media { order: 2; }
/* Dos fotos lado a lado (personas y mascotas) */
.feature__media--duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature__media--duo img { aspect-ratio: 1 / 1; object-fit: cover; }

/* Tarjeta ancha destacada (Inicio: Figuras personalizadas) */
.spotlight {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.spotlight__media { align-self: stretch; }
.spotlight__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spotlight__text { padding: 40px 48px; }
.spotlight__tag {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m);
}
.spotlight__text h3 { font-size: 1.6rem; }
.spotlight__text p:not(.spotlight__tag) { color: var(--muted); }
.spotlight__text .actions { align-items: center; gap: 20px; margin-top: 1.4em; }

/* ---------- Vistazo de trabajos (Inicio y Soluciones) ---------- */
.gallery__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 20px;
}
/* Con solo 2 fotos: dos columnas, sin hueco vacío */
.gallery__grid--2 { grid-template-columns: repeat(2, 1fr); }
.gallery__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}
.gallery__open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__open:hover img { transform: scale(1.04); }
.gallery__open:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.gallery__caption { margin: 12px 0 0; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.gallery__caption span { display: block; margin-top: 2px; font-weight: 500; font-size: 0.82rem; color: var(--muted); }

/* Estado sin fotos */
.gallery__empty {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 32px;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 24px;
}
.gallery__empty-icon { width: 48px; height: 48px; margin: 0 auto 18px; color: var(--m); }
.gallery__empty h3 { font-size: 1.4rem; }
.section--alt .gallery__empty { background: #fff; border: 1px solid var(--line); }
.gallery__empty p { color: var(--muted); }
.gallery__empty .actions { justify-content: center; margin-top: 1.4em; }

/* Visor ampliado */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.lightbox::backdrop { background: rgba(10, 10, 10, 0.92); }
.lightbox[open] {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  justify-items: center;
}
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__caption { margin-top: 14px; font-size: 0.95rem; text-align: center; color: rgba(255, 255, 255, 0.85); }
.lightbox__close,
.lightbox__nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__close svg,
.lightbox__nav svg { width: 22px; height: 22px; }
.lightbox__close { position: fixed; top: 16px; right: 16px; }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Preguntas frecuentes ---------- */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--m); }
.faq summary:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.faq details p { margin: -6px 0 22px; color: var(--muted); max-width: 680px; }

/* ---------- Páginas legales ---------- */
.legal > * { max-width: 760px; }
.legal h2 { font-size: 1.25rem; margin: 2.2em 0 0.6em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: #3a3a3a; line-height: 1.75; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal__updated { font-size: 0.88rem; color: var(--muted); margin-top: 2.5em; }

/* ---------- Pie ---------- */
.footer { position: relative; padding: 64px 0 32px; }

/* Franja CMYK en el borde superior del pie */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c) 0 25%, var(--m) 25% 50%, var(--y) 50% 75%, var(--k) 75%);
}
/* Cuatro columnas alineadas arriba: marca · navegación · contacto · visítanos */
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1.25fr 1.25fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 48px;
}
.footer__brand p { color: var(--muted); font-size: 0.93rem; line-height: 1.6; margin: 18px 0 0; max-width: 300px; }
/* Los títulos de columna se alinean con el logotipo */
.footer__col { padding-top: 6px; }
.footer__title { margin: 0 0 18px; }

/* Mismo tamaño y ritmo de renglón en todas las columnas, para que queden alineadas */
.footer__links li,
.footer__info li { font-size: 0.93rem; line-height: 1.5; }
.footer__links li + li,
.footer__info li + li { margin-top: 12px; }

/* Enlaces de navegación: gris, se oscurecen al pasar el mouse */
.footer__links a {
  color: var(--muted);
  transition: color .2s ease;
}
.footer__links a:hover { color: var(--text); }

/* Datos de contacto con ícono */
.footer__info li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}
.footer__info svg { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.footer__info a { font-weight: 500; overflow-wrap: anywhere; }
.footer__info a:hover { text-decoration: underline; text-underline-offset: 3px; }

.social { display: flex; gap: 10px; margin-top: 22px; }
.social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.social a:hover { background: var(--text); border-color: var(--text); color: #fff; }
.social svg { width: 18px; height: 18px; }

.footer ul { list-style: none; padding: 0; margin: 0; }

/* Barra inferior: derechos a la izquierda, enlaces legales a la derecha */
.footer__bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 24px;
}
/* La línea divisoria respeta el margen del contenido */
.footer__bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: var(--line);
}
.footer__bottom p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.footer__legal { display: flex; gap: 24px; font-size: 0.86rem; }
.footer__legal a { color: var(--muted); transition: color .2s ease; }
.footer__legal a:hover { color: var(--text); }

/* Pantallas medianas: la marca ocupa su propia fila y debajo van 3 columnas */
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p { max-width: 520px; }
}

/* Donde el botón flotante de WhatsApp coincidiría con la barra inferior, se deja su espacio */
@media (min-width: 561px) and (max-width: 1275px) {
  .footer__bottom { padding-right: 96px; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6);
  transition: transform .2s ease;
}
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 30px; height: 30px; }

/* Navegadores sin soporte de proporciones (Safari anterior a la versión 15) */
@supports not (aspect-ratio: 1 / 1) {
  .map { height: 420px; }
}

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

/* Animaciones en pausa mientras no están en pantalla (lo controla main.js) */
.is-paused,
.is-paused * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .printlogo__arc { stroke-dashoffset: 0; }
  .printlogo__dot { transform: none; }
  .printlogo__head { display: none; }
}

/* Si el navegador tiene JavaScript desactivado: todo visible y todas las soluciones abiertas */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; }
  .tabs__list { display: none; }
  .tabs__panel[hidden] { display: grid; margin-top: 24px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .steps:not(.steps--3):not(.steps--compact) { grid-template-columns: repeat(2, 1fr); }
  .tabs__panel { gap: 40px; padding: 36px; }
  .tabs__tab { padding: 10px 16px; }
  .contact { gap: 48px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav a.is-active:not(.btn)::after { display: none; }
  .nav a.is-active:not(.btn) { font-weight: 600; }
  .nav .btn { margin-top: 16px; }

  .hero { padding: 48px 0 70px; }
  .hero__inner,
  .page-hero--split .container,
  .tabs__panel,
  .contact { grid-template-columns: 1fr; }
  .hero__visual { height: 300px; max-width: 380px; width: 100%; margin: 0 auto; }
  .page-hero { padding: 56px 0 48px; }
  .page-hero + .section { padding-top: 48px; }
  .page-hero--split .print-box { max-width: 420px; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps--3 { grid-template-columns: 1fr; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats__grid--3 { grid-template-columns: repeat(3, 1fr); }
  .stats__grid--3 .stat:nth-child(3) { border-left: 1px solid var(--line); padding-left: 24px; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature--reverse .feature__media { order: 0; }
  .spotlight { grid-template-columns: 1fr; }
  .spotlight__media img { aspect-ratio: 4 / 3; height: auto; }
  .spotlight__text { padding: 28px 24px 32px; }
  .section--recientes + .section > .container { padding-top: 72px; }
  /* Dos columnas: se muestran 2 trabajos recientes para no dejar uno solo en la fila */
  .section--recientes .gallery__item:nth-child(n+3) { display: none; }
  /* En Soluciones se muestran 4 en lugar de 6 */
  #trabajos .gallery__item:nth-child(n+5) { display: none; }
  .tabs__list { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 20px; }
  .tabs__tab { justify-content: center; }
  .map { aspect-ratio: 4 / 3; }

  .section { padding: 72px 0; }
  .cta { padding: 64px 0; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p { max-width: 520px; }
  /* Navegación a la izquierda; Contacto y Visítanos apilados a la derecha */
  .footer__grid > nav { grid-row: span 2; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .cards, .cards--4, .steps, .form__row, .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section__head { margin-bottom: 32px; }
  .page-hero { padding: 44px 0 40px; }
  .page-hero + .section { padding-top: 40px; }
  .actions { margin-top: 1.5em; }
  .hero .actions .btn { flex: 1 1 100%; }

  /* Cifras */
  .stats__grid--3 .stat:nth-child(n) { padding: 0 10px; }
  .stats__grid--3 .stat:first-child { padding-left: 0; }
  .stat strong { font-size: 1.35rem; }
  .stat span { font-size: 0.8rem; line-height: 1.4; margin-top: 4px; }

  /* Tarjetas */
  .card { padding: 22px 20px; }

  /* Tarjetas con enlace (Inicio): en fila, con flecha a la derecha */
  a.card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    column-gap: 16px;
    align-items: center;
    padding: 16px 18px;
  }
  a.card .card__icon { grid-row: 1 / 3; width: 44px; height: 44px; margin: 0; }
  a.card h3 { margin: 0; font-size: 1.05rem; }
  a.card p { grid-column: 2; font-size: 0.88rem; }
  a.card .link-arrow { display: none; }
  a.card::after { content: "→"; grid-column: 3; grid-row: 1 / 3; font-weight: 600; }

  /* Mosaicos de íconos (Impresión 3D): de dos en dos */
  .cards.cards--tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card--tile { padding: 20px 10px; }
  .card--tile h3 { font-size: 0.92rem; }

  /* Pestañas: cuadrícula de 2 columnas */
  .tabs__list { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 6px; }
  .tabs__tab { justify-content: center; padding: 10px 8px; font-size: 0.88rem; }
  .tabs__panel { padding: 24px 20px; gap: 28px; }

  .banner { padding: 20px; }
  .form { padding: 28px 20px; }

  /* Portada */
  .hero { padding: 36px 0 48px; }
  .hero__inner { gap: 32px; }
  .hero__visual { height: 230px; max-width: 320px; }
  .stack { inset: 10px 44px 30px 10px; }
  .sheet--1 { padding: 20px; }
  .cube { transform: scale(0.62); transform-origin: bottom right; }

  /* Visual 3D */
  .print-box { padding: 28px 24px 20px; }

  /* Galería en celular: dos columnas compactas y visor con flechas abajo */
  .gallery__grid { gap: 20px 12px; }
  .section--recientes + .section > .container { padding-top: 56px; background-size: calc(100% - 32px) 1px; }
  .gallery__caption { font-size: 0.85rem; }
  .gallery__caption span { font-size: 0.76rem; }
  .gallery__empty { padding: 40px 20px; }
  .lightbox[open] { grid-template-columns: 1fr; padding: 72px 12px 96px; }
  .lightbox__img { max-height: calc(100vh - 220px); }
  .lightbox__nav { position: absolute; bottom: 24px; background: rgba(255, 255, 255, 0.2); }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { left: calc(50% + 12px); }
  .printlogo { max-width: 180px; }

  /* Franja final: botones uno debajo del otro */
  .cta { padding: 56px 0; }
  .cta__actions { flex-direction: column; width: 100%; }
  .cta__actions .btn { width: 100%; }
  .footer { padding-top: 56px; }
  .footer__grid { gap: 32px; padding-bottom: 36px; }
  .footer__grid > nav { grid-row: auto; }
  .footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .footer__links li + li { margin-top: 0; }
  /* padding-top explícito: .container lo reinicia en celular */
  .footer__bottom { flex-direction: column; align-items: flex-start; padding-top: 24px; }
  .footer__bottom::before { left: 16px; right: 16px; }
  .whatsapp { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
