/* Printing Press Manager — estilos compartidos del sitio público.
   La paleta sale del programa: azul marino del modo oscuro, índigo de encabezados
   y botones, verde de "Agregar trabajo", y los colores de estado del tablero de OT.
   El CMYK queda solo en el logo de AGM. */
:root {
  --navy: #121a33;
  --navy-line: #2b3866;
  --on-navy: #ffffff;
  --on-navy-2: #c3cae4;
  --on-navy-3: #8f9bc4;
  --indigo: #6078e4;
  --indigo-d: #4a5fc9;
  --indigo-l: #aab7f6;
  --green: #10b981;
  --green-h: #0ea371;
  --ink: #141a2b;
  --ink-2: #566079;
  --line: #e1e5ee;
  --paper: #f5f6f9;
  --white: #ffffff;
  --st1: #fdf3c7; --st1t: #7a5f00;
  --st2: #dce7fd; --st2t: #2f56b8;
  --st3: #ece8fd; --st3t: #5b45b8;
  --st4: #d3f5e7; --st4t: #0f6e4a;
  --f: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
/* Sin !important: las páginas con Tailwind usan "hidden lg:block" y el breakpoint tiene que poder ganarle. */
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.in { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; font: 600 15px/1.2 var(--f); padding: 11px 16px; border: 1px solid transparent; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: scale(.98); }
.btn-go { background: var(--green); color: var(--navy); }
.btn-go:hover { background: var(--green-h); }
.btn-indigo { background: var(--indigo-d); color: #fff; }
.btn-indigo:hover { background: #3d50b0; }
.btn-line { border-color: #4a5a94; color: var(--on-navy); background: transparent; }
.btn-line:hover { border-color: var(--on-navy-2); }
.btn-ghost { border-color: #c9d1f6; color: var(--indigo-d); background: var(--white); }
.btn-ghost:hover { border-color: var(--indigo); }
.btn-lg { font-size: 17px; padding: 15px 22px; }

/* ---------- cabecera ---------- */
/* Cabecera fija al hacer scroll. Los saltos a anclas (#video, #requisitos...) dejan lugar para ella. */
.site-head { background: var(--navy); color: var(--on-navy); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
[id] { scroll-margin-top: 84px; }
.nav { display: flex; align-items: center; gap: 28px; height: 68px; border-bottom: 1px solid var(--navy-line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16.5px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 24px; font-size: 15px; color: var(--on-navy-2); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-navy); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--indigo-l); padding-bottom: 3px; }
.nav-grow { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.nav-actions .link { color: var(--on-navy-2); }
.nav-actions .link:hover { color: var(--on-navy); }
.user-nav { display: flex; align-items: center; gap: 18px; }
.user-name { color: var(--on-navy-2); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name b { color: var(--on-navy); font-weight: 600; }
.user-nav.hidden { display: none; }
.logout { all: unset; cursor: pointer; color: #ffb4b4; font-weight: 600; }
.logout:hover { color: #fff; }
.menu-btn { all: unset; display: none; cursor: pointer; width: 42px; height: 42px; border-radius: 8px; place-items: center; color: var(--on-navy); }
.menu-btn svg { width: 26px; height: 26px; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .menu-btn { display: grid; }
  .mobile-menu { display: block; position: absolute; left: 0; right: 0; top: 68px; background: var(--navy); border-bottom: 1px solid var(--navy-line); padding-block: 8px 20px; box-shadow: 0 18px 30px rgba(0,0,0,.25); }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu nav { display: flex; flex-direction: column; }
  .mobile-menu nav a { padding: 14px 0; border-bottom: 1px solid var(--navy-line); color: var(--on-navy-2); font-size: 17px; }
  .mobile-menu nav a[aria-current="page"] { color: var(--on-navy); font-weight: 600; }
  .mobile-menu .m-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
  .mobile-menu .m-actions .btn { width: 100%; }
  .mobile-menu .m-actions.hidden { display: none; }
}

/* ---------- secciones ---------- */
.sec { padding-block: 80px; }
.sec-white { background: var(--white); border-block: 1px solid var(--line); }
.kick { font-size: 14.5px; font-weight: 600; color: var(--indigo-d); }
.h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
.sec-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.sec-head p { color: var(--ink-2); }
.chip { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 2px 10px; }
.chip.s1 { background: var(--st1); color: var(--st1t); }
.chip.s2 { background: var(--st2); color: var(--st2t); }
.chip.s3 { background: var(--st3); color: var(--st3t); }
.chip.s4 { background: var(--st4); color: var(--st4t); }
@media (max-width: 860px) { .sec { padding-block: 52px; } }

/* ---------- pie ---------- */
.site-foot { background: var(--navy); color: var(--on-navy-2); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 56px 40px; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand img { flex: none; border-radius: 50%; background: #fff; }
.foot-brand b { color: var(--on-navy); font-size: 17px; }
.foot-brand p { margin-top: 4px; max-width: 34ch; }
.foot-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.foot-col h4 { margin: 0 0 4px; color: var(--on-navy); font-size: 15px; font-weight: 600; }
.foot-col a:hover { color: var(--on-navy); }
.sel { user-select: all; overflow-wrap: anywhere; }
.social { display: flex; gap: 10px; margin-top: 4px; }
.social a { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--navy-line); display: grid; place-items: center; color: var(--on-navy); }
.social a:hover { border-color: var(--on-navy-3); }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--navy-line); font-size: 14px; color: var(--on-navy-3); }
.data-fiscal { display: inline-block; background: #fff; color: #1d3c78; font-weight: 700; font-size: 13px; line-height: 1.2; text-align: center; padding: 8px 12px; border-radius: 4px; }
.data-fiscal small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-2); }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; padding-block: 44px 32px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-col:last-child { grid-column: 1 / -1; }
}

/* ---------- volver arriba ---------- */
.to-top { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(20,26,43,.14); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 40; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- celular: contenedores a todo el ancho ----------
   En pantallas angostas las tarjetas pierden bordes redondeados, sombra y bordes laterales
   y se estiran hasta los bordes de la pantalla. --bleed es el margen lateral del contenedor
   padre que hay que "comerse" (16px en las páginas nuevas, 24px en las de Tailwind con px-6). */
@media (max-width: 640px) {
  .flat-sm, .form-card, .channel, .close, .presale-card, .lic-card, .pros-col, .video-box {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left-width: 0 !important;
    border-right-width: 0 !important;
    margin-left: calc(-1 * var(--bleed, max(16px, env(safe-area-inset-left, 0px))));
    margin-right: calc(-1 * var(--bleed, max(16px, env(safe-area-inset-right, 0px))));
  }
  .flat-sm { padding-left: 20px !important; padding-right: 20px !important; }
}
