/* === Arreglos de diseño (10/11/2026, Iván: «ve empezando con todo») ===
   Fichero aparte y enlazado desde Base.astro después de motion.css, por la misma
   razón que motion.css: producción tiene tres Base.*.css distintos por parches en
   vivo, y así se publica subiendo este fichero y una línea por página.
   Cuando se recompile el sitio entero, esto puede fundirse en global.css.
   Identidad intacta: Neue Montreal, negro sobre blanco, cian en bloques. */

/* --- 2 · Cuerpo a 400 y en negro; el gris solo para notas, pies y metadatos --- */
body { font-weight: 400; }
.home-hero p.home-hero__flow, .hero p.hero__flow,
.door p, .flow p, .case p, .faq .faq__a, .production-film p,
.section__head p.muted, .resource-grid p.muted, .blog-index__lead,
.caso-row p.muted, .grid .cell p.muted, .cell p.muted,
main .guide-group > p.muted, main .guide-card p { color: var(--c-fg); }
/* Fichas de familia: el segundo párrafo del hero es cuerpo, no nota */
main .hero p.muted { color: var(--c-fg); }
/* Botón del hero en móvil: que parta en dos líneas y no quede bajo el botón flotante de WhatsApp */
@media (max-width: 600px) { main .hero__cta .btn { max-width: calc(100% - 4.5rem); } }
/* Claro sobre negro: un punto más de blanco */
.dark .micro, .dark .muted, .section--dark .muted { color: rgba(255, 255, 255, 0.82); }
main .situations-grid p, .door--dark p { color: rgba(255, 255, 255, 0.88); }
.site-footer__legal { color: rgba(255, 255, 255, 0.68); }

/* --- 1 · Sobre cian, todo en negro y a 400 --- */
.cta-band--cyan, .cta-band--cyan p, .cta-band--cyan .muted, .cta-band--cyan .micro,
.cta-band--cyan .check, .cta-band--cyan .check a, .cta-band--cyan label,
.cta-band--cyan .field label, .case__cian, .case__cian *,
main .print-testimonial, main .print-testimonial p { color: var(--ink); font-weight: 400; }
.cta-band--cyan .lead-form .check { font-size: 0.9375rem; }
/* Tarjetas cian de las fichas de familia: el gris va en línea (rgba 0.7) */
.cell[style*="cyan"] p, .cell[style*="cian"] p { color: var(--ink) !important; }

/* --- 3 · Aviso de cookies en móvil: barra fina pegada abajo (mismo script, misma lógica) --- */
@media (max-width: 640px) {
  div[role="dialog"][aria-label="Tu privacidad en Nómada"]:not([hidden]) {
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    max-width: none !important; margin: 0 !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
    border: 0 !important; border-top: 1px solid #111 !important; box-shadow: none !important;
    font: 12.5px/1.35 'Neue Montreal', -apple-system, sans-serif !important;
    display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px;
  }
  div[role="dialog"][aria-label="Tu privacidad en Nómada"] p { flex: 1 0 100%; }
  div[role="dialog"][aria-label="Tu privacidad en Nómada"] a { margin-right: auto !important; }
  div[role="dialog"][aria-label="Tu privacidad en Nómada"] button { margin: 0 !important; padding: 8px 12px !important; }
  div[role="dialog"][aria-label="Tu privacidad en Nómada"] button:last-child { background: #111 !important; color: #fff !important; }
}

/* --- 4 · Tablas de precios en móvil: cada fila, apilada bajo la pieza --- */
@media (max-width: 640px) {
  main div[style*="overflow-x"] > table, main div[style*="overflow-x"] > table tbody { display: block; }
  main div[style*="overflow-x"] > table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  main div[style*="overflow-x"] > table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; row-gap: 0.2rem;
    padding: 0.9rem 0; border-bottom: 1px solid var(--line);
  }
  main div[style*="overflow-x"] > table tbody tr:first-child { border-top: 2px solid var(--ink); }
  main div[style*="overflow-x"] > table td { display: block; grid-column: 1 / -1; padding: 0 !important; border: 0 !important; white-space: normal !important; }
  /* Imprenta (pieza · detalle · unidades · precio) */
  main table:has(thead th:nth-child(4):last-child) td:nth-child(1) { grid-column: 1; }
  main table:has(thead th:nth-child(4):last-child) td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap !important; }
  main table:has(thead th:nth-child(4):last-child) td:nth-child(2),
  main table:has(thead th:nth-child(5):last-child) td:nth-child(1),
  main table:has(thead th:nth-child(5):last-child) td:nth-child(3) { font-size: 0.9375rem; }
  main table:has(thead th:nth-child(4):last-child) td:nth-child(3)::after,
  main table:has(thead th:nth-child(5):last-child) td:nth-child(4)::after { content: ' uds'; }
  main table:has(thead th:nth-child(4):last-child) td:nth-child(3),
  main table:has(thead th:nth-child(5):last-child) td:nth-child(4) { font-size: 0.9375rem; color: var(--c-muted); }
  /* Merchandising (familia · producto · marcaje · unidades · precio) */
  main table:has(thead th:nth-child(5):last-child) td:nth-child(1) { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; }
  main table:has(thead th:nth-child(5):last-child) td:nth-child(2) { grid-column: 1; }
  main table:has(thead th:nth-child(5):last-child) td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; white-space: nowrap !important; }
  /* Técnicas (técnica · va bien en · cuándo) */
  main table:has(thead th:nth-child(3):last-child) td:nth-child(3) { color: var(--c-muted); font-size: 0.9375rem; }
}

/* --- 5 · Email de la newsletter: misma altura que el botón --- */
@media (max-width: 760px) {
  .inline-form input[type='email'] { flex: 0 0 auto; height: 53px; padding: 0 1.125rem; }
  .inline-form .btn, .inline-form button[type='submit'] { height: 53px; }
}

/* --- 6 · Portada en móvil: menos arranque y los logos antes del vídeo --- */
.home-hero .logo-strip { grid-column: 1 / -1; padding: 0 !important; }
/* La cinta mide max-content: sin min-width 0 ensancharía la rejilla del hero */
.home-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.home-hero > * { min-width: 0; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-hero__copy { order: 1; }
  .home-hero .logo-strip { order: 2; }
  .home-hero .production-film { order: 3; }
  .home-hero .logo-strip__inner { padding-top: 1.25rem; gap: 1rem; }
}
@media (max-width: 600px) {
  .home-hero p.home-hero__flow { display: none; }
}

/* --- 7 · Ritmo: titulares más grandes, fondos alternos, sin caja en tarjetas de solo texto --- */
.head-split h2, .section__head h2, .resource-grid h2, .people-section h2, .lead-form h2,
.nl-band h2, main .guide-group h2, .cta-band h2, .caso-row h2, .situations h2 {
  font-size: clamp(2.125rem, 4.2vw, 3.375rem); line-height: 1.04; letter-spacing: -0.025em;
}
/* Fondo de papel a sangre sin tocar el HTML (las secciones de la portada van dentro de .wrap) */
.home-section:has(.flow--4), main .guide-group:nth-of-type(even) {
  background: var(--c-bg-alt);
  box-shadow: 0 0 0 100vmax var(--c-bg-alt);
  clip-path: inset(0 -100vmax);
  padding-top: 4.5rem; margin-bottom: 4.5rem;
}
.section--rule:has(.resource-grid) { background: var(--c-bg-alt); border-top: 0; }
.section--rule:has(.resource-grid) + .catalogue-band { border-top-color: transparent; }
main > .section--rule:not(.section--dark):nth-of-type(odd) { background: var(--c-bg-alt); border-top-color: transparent; }
main > .section--rule:not(.section--dark):nth-of-type(odd) .cell:not(.cell--product) { background: var(--c-bg-alt); }
/* Tarjetas de solo texto: fuera la caja, queda el filete superior */
.grid:not(:has(img)) { background: transparent; border: 0; gap: 2.5rem 2rem; }
.grid:not(:has(img)) > .cell { background: transparent; border-top: 1px solid var(--ink); padding: 1.5rem 0 0; }
main .guide-grid .guide-card { border: 0; border-top: 1px solid var(--ink); padding: 1.5rem 0 0; }
main .guide-grid .guide-card:hover, main .guide-grid .guide-card:focus-visible { background: transparent; outline: 0; color: var(--ink); }
main .guide-grid .guide-card:hover h3 { text-decoration: underline; text-decoration-color: var(--cian); text-underline-offset: 4px; }

/* --- 8 · /blog/ en móvil: lista compacta (título y enlace) --- */
@media (max-width: 650px) {
  main .guide-grid { gap: 0; margin-top: 1.5rem; border-bottom: 1px solid var(--line); }
  main .guide-grid .guide-card { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.95rem 0; border-top: 1px solid var(--line); }
  main .guide-grid .guide-card p, main .guide-grid .guide-card .arrow-link { display: none; }
  main .guide-grid .guide-card h3 { font-size: 1.0625rem; line-height: 1.35; }
  main .guide-grid .guide-card::after { content: '↗'; flex-shrink: 0; }
  main .guide-group:nth-of-type(even) { padding-top: 2.5rem; margin-bottom: 2.5rem; }
}

/* --- 9 · Fichas de familia: la foto de producto al ancho de la tarjeta --- */
.cell--product .cell__media-wrap { height: auto; aspect-ratio: 1 / 1; padding: 0.75rem; }
.cell--product img { width: 100%; height: 100%; }

/* --- 10 · /casos/ en móvil: la cifra en franja, no en cuadrado --- */
@media (max-width: 900px) {
  .caso-row .case__cian { aspect-ratio: auto; min-height: 8.75rem; padding: 1.25rem; }
}

/* --- 11 · Formularios: todos con caja --- */
.form .field input:not([type='checkbox']), .form .field textarea {
  border: 1px solid var(--ink); padding: 0.875rem 1rem; background: #fff; color: var(--ink);
}
.form .field input:not([type='checkbox']):focus, .form .field textarea:focus {
  border-color: var(--ink); border-width: 2px; padding: calc(0.875rem - 1px) calc(1rem - 1px);
}
.cta-band:not(.cta-band--cyan) .form .field input:not([type='checkbox']),
.cta-band:not(.cta-band--cyan) .form .field textarea { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.cta-band:not(.cta-band--cyan) .form .field input:focus,
.cta-band:not(.cta-band--cyan) .form .field textarea:focus { border-color: var(--cian); }
.form > * { min-width: 0; }
.form .field input:not([type='checkbox']), .form .field textarea { width: 100%; min-width: 0; }
.contacto-oficina { margin-top: 3.5rem; }

/* --- 12 · Menú móvil: filas de 48 px y texto de 18 px --- */
@media (max-width: 980px) {
  .site-nav { gap: 0; padding-top: 0.5rem; }
  .site-nav a:not(.btn) {
    display: flex; align-items: center; width: 100%; min-height: 48px;
    font-size: 1.125rem; border-bottom: 1px solid var(--line);
  }
  .site-nav a[aria-current='page'] { border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--cian); padding-left: 0.75rem; }
  .site-nav .btn { width: 100%; justify-content: center; min-height: 48px; font-size: 1rem; margin-top: 0.75rem; }
  .nav-toggle-label { min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
}

/* --- Carga sin parpadeos (10/11 noche) --- */
/* Mientras llega el póster, la caja del vídeo es papel y no un rectángulo negro */
.home-hero .production-film video { background: var(--paper-2) !important; } /* el estilo de página lleva atributos de Astro: hace falta !important */
