/* Rango Lab · portal de proyectos: banda diagonal de franjas azules arriba y las tarjetas de cada proyecto */
:root {
  color-scheme: light;
  --tinta: #0A2540; --azul: #0057FF; --azul-fuerte: #0047D6; --cielo: #00B4FF;
  --bg: #F6F9FC; --surface: #FFFFFF; --surface-2: #F0F4F9; --border: #E3E8EE;
  --text: #0A2540; --text-2: #425466; --muted: #6B7C93; --acento-suave: #EAF1FF; --acento-texto: #0047D6; --acento-borde: #BCD3FF;
  --sombra: 0 1px 1px rgba(10, 37, 64, .04), 0 12px 30px -16px rgba(10, 37, 64, .35);
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #0A1424; --surface: #0F1D33; --surface-2: #15263F; --border: #22385A;
    --text: #F6F9FC; --text-2: #B8C4D6; --muted: #8494AD; --acento-suave: rgba(76, 141, 255, .14); --acento-texto: #9DC0FF; --acento-borde: rgba(76, 141, 255, .4);
    --sombra: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 30px -16px rgba(0, 0, 0, .6); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* la banda: degradado tinta → azul → cielo, inclinada, con franjas que entran al cargar */
.banda { position: absolute; left: 0; right: 0; top: 0; height: 430px; transform: skewY(-7deg); transform-origin: 0 0; overflow: hidden; z-index: 0;
  background: linear-gradient(118deg, #0A2540 0%, #0B3A8C 36%, #0057FF 66%, #00B4FF 100%); }
.banda span { position: absolute; bottom: 0; height: 46px; animation: franja .9s cubic-bezier(.2, .8, .2, 1) both; }
.banda span:nth-child(1) { left: 0; width: 26%; background: #0B3A8C; bottom: 46px; animation-delay: .05s; }
.banda span:nth-child(2) { left: 18%; width: 30%; background: #0057FF; animation-delay: .15s; }
.banda span:nth-child(3) { right: 0; width: 34%; background: #2EA6FF; bottom: 46px; animation-delay: .25s; }
.banda span:nth-child(4) { right: 12%; width: 18%; background: #7FD6FF; animation-delay: .35s; }
@keyframes franja { from { transform: translateX(-110%); } }
@media (prefers-reduced-motion: reduce) { .banda span { animation: none; } }

.pag { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 22px 24px 64px; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #fff; }
.marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.marca .wm { font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
.marca .wm span { font-weight: 400; opacity: .8; }
.salir { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.salir:hover { background: rgba(255, 255, 255, .24); }
.intro { color: #fff; margin: 84px 0 48px; max-width: 560px; }
.intro h1 { font-size: 46px; line-height: 1.05; letter-spacing: -.035em; font-weight: 650; margin: 0 0 12px; }
.intro p { margin: 0; font-size: 17px; color: rgba(255, 255, 255, .82); }

.proyectos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.proy { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  box-shadow: var(--sombra); color: inherit; text-decoration: none; min-height: 210px; }
a.proy:hover { border-color: var(--acento-borde); }
a.proy:focus-visible, .proy button:focus-visible, .nuevo:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
.proy .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 650; font-size: 18px; letter-spacing: -.02em; flex: none; }
.proy .nom { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin: 16px 0 4px; }
.proy .des { color: var(--text-2); font-size: 14px; margin: 0; flex: 1; }
.proy .pie > span:last-child { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.proy .pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.estado { white-space: nowrap; font-size: 12.5px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.estado.uso { background: var(--acento-suave); color: var(--acento-texto); }
.abrir { font-size: 14px; font-weight: 600; color: var(--acento-texto); text-decoration: none; }
.abrir:hover { text-decoration: underline; }
.editar { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.editar:hover { color: var(--acento-texto); background: var(--surface-2); }
.nuevo { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 210px; padding: 22px; border-radius: 12px;
  border: 1.5px dashed var(--acento-borde); background: var(--surface); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.nuevo b { color: var(--acento-texto); font-size: 16px; font-weight: 600; }
.nuevo:hover { border-color: var(--azul); }
.error { margin-top: 18px; color: #C0312B; }

/* agregar o editar un proyecto */
dialog { border: 0; border-radius: 12px; padding: 24px; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 70px rgba(10, 37, 64, .35); }
dialog::backdrop { background: rgba(10, 37, 64, .42); }
dialog h2 { margin: 0 0 16px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
dialog label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
dialog input, dialog select, dialog textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--text); }
dialog textarea { resize: vertical; min-height: 64px; }
dialog input:focus-visible, dialog select:focus-visible, dialog textarea:focus-visible { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 87, 255, .2); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.acc .izq { margin-right: auto; }
.btn { font: inherit; font-size: 14px; font-weight: 550; padding: 8px 16px; border-radius: 6px; border: 1px solid transparent; background: var(--azul); color: #fff; cursor: pointer; }
.btn:hover { background: var(--azul-fuerte); }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.sec:hover { background: var(--surface-2); }
.btn.peligro { background: none; color: #C0312B; border-color: transparent; padding-left: 0; }
.btn:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.msg { font-size: 13px; color: #C0312B; min-height: 18px; margin: 0; }

@media (max-width: 860px) { .proyectos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .pag { padding: 16px 16px 48px; }
  .banda { height: 360px; }
  .intro { margin: 56px 0 36px; } .intro h1 { font-size: 36px; } .intro p { font-size: 16px; }
  .proyectos { grid-template-columns: minmax(0, 1fr); }
  .proy, .nuevo { min-height: 0; }
}
