/* ═══════════════════════════════════════════════════════════════
   CorteLab — estilos del portal
   Negro carbón + rojo corte. Space Grotesk para títulos.
   ═══════════════════════════════════════════════════════════════ */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(/fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }

:root {
  --negro: #0B0B0F;
  --grafito: #15151B;
  --grafito-2: #1C1C24;
  --humo: #26262F;
  --humo-2: #34343F;
  --rojo: #FF3B4E;
  --rojo-hondo: #E62238;
  --rojo-suave: rgba(255, 59, 78, 0.12);
  --blanco: #FFFFFF;
  --texto-2: #C9C9D4;
  --texto-3: #A1A1B0;
  --verde: #2BD67B;
  --ambar: #FFB547;
  --radio: 14px;
  --titulo: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --cuerpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ancho: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--negro); color: var(--blanco); font-family: var(--cuerpo);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--titulo); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--texto-2); }
.contenedor { width: min(var(--ancho), 100% - 40px); margin-inline: auto; }
.rojo { color: var(--rojo); }
.oculto { display: none !important; }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }

/* ── Cabecera ── */
.cabecera { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 15, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--humo); }
.cabecera .contenedor { display: flex; align-items: center; gap: 24px; height: 68px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--titulo); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; }
.marca img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--texto-2); font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--blanco); }
.nav .boton { color: var(--negro); }
.menu-movil { display: none; margin-left: auto; background: none; border: 1px solid var(--humo-2); color: var(--blanco); border-radius: 10px; padding: 8px 12px; font: inherit; }
@media (max-width: 820px) {
  .menu-movil { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--negro); border-bottom: 1px solid var(--humo); padding: 16px 20px 22px; gap: 14px; }
  .nav.abierta { display: flex; }
}

/* ── Botones ── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--rojo); color: var(--negro); font-family: var(--titulo); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 12px; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s;
  box-shadow: 0 8px 30px rgba(255, 59, 78, .25);
}
.boton:hover { background: var(--rojo-hondo); transform: translateY(-1px); }
.boton:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.boton.secundario { background: transparent; color: var(--blanco); border: 1px solid var(--humo-2); box-shadow: none; }
.boton.secundario:hover { border-color: var(--texto-3); background: var(--grafito); }
.boton.chico { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.boton.grande { padding: 17px 30px; font-size: 1.1rem; }
.boton.ancho { width: 100%; }
.boton.peligro { background: transparent; color: #ff8a96; border: 1px solid rgba(255, 59, 78, .4); box-shadow: none; }

/* ── Héroe ── */
.heroe { position: relative; padding: 90px 0 60px; overflow: hidden; }
.heroe::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 640px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 59, 78, .22), transparent 62%);
}
.heroe .contenedor { position: relative; text-align: center; }
.etiqueta { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--rojo-suave); color: #ff9aa5; font-size: .85rem; font-weight: 600; margin-bottom: 22px; border: 1px solid rgba(255, 59, 78, .25); }
.heroe p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 680px; margin: 0 auto 34px; }
.heroe .acciones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.heroe .nota { margin-top: 16px; font-size: .9rem; color: var(--texto-3); }
.vitrina { margin: 60px auto 0; max-width: 1060px; border-radius: 18px; border: 1px solid var(--humo-2); overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 59, 78, .08); background: var(--grafito); }
.vitrina img { width: 100%; }

/* ── Secciones ── */
.seccion { padding: 90px 0; }
.seccion.alterna { background: var(--grafito); border-block: 1px solid var(--humo); }
.encabezado { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.encabezado p { font-size: 1.1rem; }
.rejilla { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tarjeta { background: var(--grafito); border: 1px solid var(--humo); border-radius: var(--radio); padding: 26px; }
.seccion.alterna .tarjeta { background: var(--negro); }
.tarjeta .icono { width: 44px; height: 44px; border-radius: 12px; background: var(--rojo-suave); color: var(--rojo); display: grid; place-items: center; margin-bottom: 16px; }
.tarjeta .icono svg { width: 22px; height: 22px; }
.tarjeta p { margin: 0; font-size: .97rem; }

.pasos { counter-reset: paso; }
.paso { position: relative; padding-left: 64px; }
.paso::before { counter-increment: paso; content: counter(paso); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--rojo); color: var(--negro); font-family: var(--titulo); font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }

/* ── Precios ── */
.planes { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: stretch; max-width: 1060px; margin: 0 auto; }
.plan { background: var(--grafito); border: 1px solid var(--humo); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; }
.plan.destacado { border-color: var(--rojo); box-shadow: 0 0 0 1px var(--rojo), 0 30px 80px rgba(255, 59, 78, .16); position: relative; }
.plan .cinta { position: absolute; top: -13px; left: 30px; background: var(--rojo); color: var(--negro); font-weight: 700; font-size: .8rem; padding: 4px 12px; border-radius: 999px; font-family: var(--titulo); }
.plan .precio { font-family: var(--titulo); font-size: 2.6rem; font-weight: 700; margin: 8px 0 0; letter-spacing: -0.03em; }
.plan .precio small { font-size: 1rem; color: var(--texto-3); font-weight: 500; }
.plan .ahorro { color: var(--verde); font-size: .9rem; font-weight: 600; min-height: 1.4em; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; color: var(--texto-2); font-size: .97rem; }
.plan li::before { content: "✓"; color: var(--rojo); font-weight: 700; }
.plan li.no { color: var(--texto-3); }
.plan li.no::before { content: "—"; color: var(--texto-3); }
.medios { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; color: var(--texto-3); font-size: .9rem; }
.medios span { border: 1px solid var(--humo-2); border-radius: 999px; padding: 4px 12px; }

/* ── Preguntas ── */
.preguntas { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
details { background: var(--grafito); border: 1px solid var(--humo); border-radius: 12px; padding: 18px 22px; }
summary { cursor: pointer; font-weight: 600; font-family: var(--titulo); font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; color: var(--rojo); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; }

.llamado { text-align: center; padding: 80px 20px; border-radius: 24px; background: linear-gradient(135deg, #1a0a0e, #2a0d13 50%, #15151B); border: 1px solid rgba(255, 59, 78, .3); }

/* ── Pie ── */
.pie { border-top: 1px solid var(--humo); padding: 40px 0; color: var(--texto-3); font-size: .9rem; }
.pie .contenedor { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.pie nav { display: flex; gap: 18px; flex-wrap: wrap; }
.pie a { color: var(--texto-3); text-decoration: none; }
.pie a:hover { color: var(--blanco); }

/* ── Formularios (registro / ingreso) ── */
.acceso { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 59, 78, .14), transparent 55%); }
.caja { width: min(440px, 100%); background: var(--grafito); border: 1px solid var(--humo); border-radius: 20px; padding: 34px; }
.caja h1 { font-size: 1.9rem; }
.caja .sub { margin-bottom: 26px; }
.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo label { font-size: .9rem; font-weight: 600; color: var(--texto-2); }
input, select, textarea {
  width: 100%; background: var(--negro); border: 1px solid var(--humo-2); color: var(--blanco); border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px var(--rojo-suave); }
textarea { resize: vertical; min-height: 90px; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--texto-2); margin: 6px 0 18px; }
.casilla input { width: auto; margin-top: 4px; accent-color: var(--rojo); }
.separador { display: flex; align-items: center; gap: 12px; color: var(--texto-3); font-size: .85rem; margin: 18px 0; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--humo-2); }
.pie-caja { text-align: center; margin-top: 20px; font-size: .95rem; color: var(--texto-3); }
.pie-caja a { color: var(--rojo); font-weight: 600; text-decoration: none; }
.mensaje { padding: 12px 14px; border-radius: 10px; font-size: .93rem; margin-bottom: 16px; }
.mensaje.error { background: rgba(255, 59, 78, .1); border: 1px solid rgba(255, 59, 78, .35); color: #ffb3bb; }
.mensaje.ok { background: rgba(43, 214, 123, .1); border: 1px solid rgba(43, 214, 123, .35); color: #9ff0c4; }

/* ── Panel ── */
.panel { padding: 36px 0 80px; }
.panel-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.panel-top h1 { font-size: 2rem; margin: 0; }
.pestanas { display: flex; gap: 6px; border-bottom: 1px solid var(--humo); margin-bottom: 26px; overflow-x: auto; }
.pestanas button { background: none; border: 0; color: var(--texto-3); font: inherit; font-weight: 600; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.pestanas button[aria-selected="true"] { color: var(--blanco); border-bottom-color: var(--rojo); }
.metricas { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 26px; }
.metrica { background: var(--grafito); border: 1px solid var(--humo); border-radius: var(--radio); padding: 20px; }
.metrica .valor { font-family: var(--titulo); font-size: 1.8rem; font-weight: 700; }
.metrica .rotulo { color: var(--texto-3); font-size: .88rem; }
.barra-herramientas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.barra-herramientas input, .barra-herramientas select { width: auto; min-width: 160px; padding: 9px 12px; font-size: .93rem; }
.barra-herramientas .espacio { flex: 1; }
.tablero { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.proyecto { background: var(--grafito); border: 1px solid var(--humo); border-radius: var(--radio); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.proyecto:hover { border-color: var(--humo-2); }
.proyecto .fila { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.proyecto h3 { font-size: 1.05rem; margin: 0; word-break: break-word; }
.proyecto .meta { color: var(--texto-3); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.proyecto .notas { font-size: .9rem; color: var(--texto-2); margin: 0; white-space: pre-wrap; }
.proyecto .acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--humo); color: var(--texto-2); white-space: nowrap; }
.chip.idea { background: rgba(161, 161, 176, .15); color: #d0d0dc; }
.chip.en_edicion { background: rgba(255, 181, 71, .14); color: var(--ambar); }
.chip.revision { background: rgba(120, 150, 255, .15); color: #a9bcff; }
.chip.listo { background: rgba(43, 214, 123, .14); color: var(--verde); }
.chip.publicado { background: var(--rojo-suave); color: #ff9aa5; }
.chip.pro { background: var(--rojo); color: var(--negro); }
.vacio { text-align: center; padding: 60px 20px; border: 1px dashed var(--humo-2); border-radius: var(--radio); color: var(--texto-3); }
.aviso { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--rojo-suave); border: 1px solid rgba(255, 59, 78, .3); border-radius: var(--radio); padding: 16px 20px; margin-bottom: 22px; }
.aviso p { margin: 0; color: var(--blanco); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--humo); vertical-align: top; }
th { color: var(--texto-3); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.tabla-envoltura { overflow-x: auto; background: var(--grafito); border: 1px solid var(--humo); border-radius: var(--radio); }

/* ── Ventana emergente ── */
dialog { background: var(--grafito); color: var(--blanco); border: 1px solid var(--humo-2); border-radius: 18px; padding: 28px; width: min(520px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
dialog .botones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.dos { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .dos { grid-template-columns: 1fr; } }

/* ── Avisos flotantes ── */
.avisos { position: fixed; bottom: 22px; right: 22px; display: grid; gap: 10px; z-index: 100; }
.toast { background: var(--grafito-2); border: 1px solid var(--humo-2); border-left: 3px solid var(--rojo); padding: 12px 16px; border-radius: 10px; max-width: 360px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); font-size: .93rem; animation: entra .2s ease-out; }
.toast.ok { border-left-color: var(--verde); }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

/* ── Texto legal ── */
.legal { max-width: 820px; padding: 50px 0 90px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal li { color: var(--texto-2); margin-bottom: .5em; }

.cargando { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; vertical-align: middle; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
