/* Propuesta 05 · Tove — etapa 2
   Tinta Bordó sobre Crema; campos de color de la paleta (como la lámina «Tierra»);
   signos grandes en campos de color; radio 0; sin sombras. Movimiento casi todo en CSS. */

:root { --ink: var(--bordo); --pad: clamp(1rem, 4vw, 3rem); --wide: 1280px; }

/* Tokens de la propuesta (trasladables a theme.json). Escala ~1.25, tinta Bordó. */
:root {
  --fs-h1: clamp(2.2rem, 1.6rem + 2.2vw, 3.6rem);
  --fs-hero: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  --fs-h2: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  --fs-h3: clamp(1.3rem, 1.1rem + .9vw, 1.7rem);
  --fs-body: 1.0625rem; --fs-small: .9375rem;
  --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem; --sp-5: 3rem; --sp-6: 4rem; --sp-7: 6rem;
  --section: clamp(3.5rem, 2rem + 5vw, 6rem);
  --measure: 62ch;
}
body { background: var(--crema); color: var(--ink); font-size: var(--fs-body); font-weight: 450; line-height: 1.65; }
::selection { background: var(--mandarina); color: var(--chocolate); }
:focus-visible { outline-color: var(--chocolate); }
a { color: var(--ink); text-underline-offset: .2em; }
.h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -.02em; color: var(--chocolate); }
.h2 { font-size: var(--fs-h2); line-height: 1.05; color: var(--chocolate); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.h3 { font-size: var(--fs-h3); line-height: 1.2; color: var(--chocolate); }
.link-btn { border: 0; background: none; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; color: inherit; }


/* Botón con la sombra del estilo «shaded» de Tove */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .65rem 1.2rem; border: 2px solid var(--ink); background: var(--damasco); color: var(--ink); font-weight: 700; text-decoration: none; transition: background-color .2s; }
.btn:hover { background: var(--mandarina); }
.btn:active { background: var(--naranja); }
.btn--plain { border-color: transparent; background: none; text-decoration: underline; padding-inline: 0; }
.btn--plain:hover { background: none; text-decoration-thickness: 2px; }

/* Cabecera horizontal */
.hd { display: flex; align-items: center; gap: 2rem; padding: 1.1rem var(--pad); border-bottom: 2px solid var(--ink); }
.hd__logo img { width: 150px; }
.hd__nav { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
.hd__nav ul { list-style: none; display: flex; gap: 1.6rem; }
.hd__nav ul a { font-weight: 600; text-decoration: none; background: linear-gradient(var(--mandarina), var(--mandarina)) 0 100% / 0 .4em no-repeat; transition: background-size .3s; }
.hd__nav ul a:hover, .hd__nav ul a[aria-current] { background-size: 100% .4em; }
.hd__menu { display: none; }
@media (max-width: 820px) {
  .hd { position: relative; }
  .hd__menu { display: block; margin-left: auto; padding: .5rem 1rem; border: 2px solid var(--ink); background: var(--damasco); color: var(--ink); font-weight: 700; }
  .hd__nav { display: none; position: absolute; left: var(--pad); right: var(--pad); top: calc(100% + .5rem); z-index: 50; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem; background: var(--crema); border: 2px solid var(--ink); }
  .hd__nav.is-open { display: flex; }
  .hd__nav ul { flex-direction: column; gap: .5rem; }
  .hd__nav ul a { font-size: 1.3rem; }
}

/* Hero con texto desplazado (hero-text-displaced de Tove) */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: end; max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4rem) var(--pad) clamp(2rem, 3vw, 2.5rem); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero__t { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.02em; color: var(--chocolate); max-width: 22ch; }
.hero__aside { display: grid; gap: 1rem; justify-items: start; align-self: end; padding-bottom: .4rem; font-size: clamp(1.1rem, 1rem + .3vw, 1.25rem); }

.sec { max-width: var(--wide); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--pad); }
.sec--flush { padding-top: 0; }

/* Campos de color: los ejes como láminas de la paleta */
.sw { list-style: none; display: flex; gap: 6px; height: clamp(24rem, 56vh, 34rem); }
.sw__i { flex: 1 1 0; min-width: 0; }
.sw a { display: grid; grid-template-rows: minmax(0, 1fr) auto 4.6rem; height: 100%; text-decoration: none; color: var(--chocolate); }
.sw__field { display: grid; place-items: center; overflow: hidden; background: var(--c); }
.sw__field img { width: 78%; transition: transform .6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sw__i:hover .sw__field img { transform: scale(1.06) rotate(-6deg); } }
.sw__n { padding-top: .75rem; font-weight: 700; font-size: .95rem; }
.sw__t { font-family: var(--font-title); font-weight: 700; font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.15; }
.sw a:focus-visible { outline-offset: 4px; }
@media (max-width: 760px) { .sw { flex-wrap: wrap; height: auto; } .sw__i { flex: 1 1 calc(50% - 6px); } .sw__i:hover, .sw__i:focus-within { flex-grow: 1; } .sw__field { aspect-ratio: 1; } }

/* Recursos: filas con el campo de color del eje */
.res-list { list-style: none; border-top: 2px solid var(--ink); max-width: 64rem; }
.res { display: grid; grid-template-columns: clamp(4.5rem, 8vw, 6.5rem) 1fr auto; gap: clamp(1rem, 3vw, 2rem); align-items: center; padding: .9rem 0; border-bottom: 2px solid var(--ink); }
.res__f { display: grid; place-items: center; aspect-ratio: 1; background: var(--c); }
.res__f img { width: 80%; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .res:hover .res__f img { transform: rotate(-8deg) scale(1.06); } }
.res__t { font-family: var(--font-title); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.15; color: var(--chocolate); }
.res__a { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; white-space: nowrap; }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(2rem, 4vw, 3rem); padding: clamp(1.5rem, 3vw, 2rem); background: var(--damasco); }
.band__t { font-family: var(--font-title); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--chocolate); }
.access { display: grid; gap: 1rem; padding: clamp(1.5rem, 3vw, 2rem); background: var(--damasco); --error: var(--bordo); }
.access__t { font-family: var(--font-title); font-weight: 700; font-size: 1.6rem; line-height: 1.15; color: var(--chocolate); }
.access__alt { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.access__alt a { font-weight: 700; }
.f-input { border-color: var(--ink); background: var(--crema); }
.f-input:focus { outline: 2px solid var(--chocolate); outline-offset: 1px; }
.f-status { background: var(--crema); border-left-color: var(--ink); }
.f-reveal { color: var(--ink); }
.demo-notice { font-size: .85rem; }

/* Páginas interiores */
.phead { max-width: var(--wide); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--pad) clamp(2rem, 4vw, 3rem); display: grid; gap: 1rem; }
.two { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-top: 0; }
.two__txt { margin-top: 1.25rem; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

.eh { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; padding: clamp(2rem, 6vw, 4.5rem) var(--pad); background: var(--c); color: var(--chocolate); overflow: hidden; }
.eh.on-dark { color: var(--crema); }
.eh__s { width: clamp(14rem, 32vw, 28rem); margin-bottom: calc(-1 * clamp(2rem, 6vw, 4.5rem)); transition: transform .6s var(--ease-out); }
.eh:hover .eh__s { transform: rotate(-6deg); }
.eh__n { display: block; font-size: .35em; margin-bottom: .3em; }
.eh__t { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.02em; max-width: 14ch; }
@media (max-width: 700px) { .eh { grid-template-columns: 1fr; } .eh__s { width: 12rem; margin: 0; order: -1; } }
.ebody { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.ebody__intro { display: grid; gap: var(--sp-2); max-width: var(--measure); font-size: 1.15rem; }
.mod p { max-width: var(--measure); }
.mods { list-style: none; display: grid; max-width: 52rem; border-bottom: 2px solid var(--ink); }
.mod { display: grid; gap: .9rem; padding: 1.75rem 0; border-top: 2px solid var(--ink); }
.mod .access { margin-inline: 0; }
.mod__n { font-family: var(--font-text); font-weight: 700; font-size: .7em; margin-right: .4rem; }
.locked.fade .locked__content { display: grid; gap: .9rem; margin-top: .9rem; }
html:not([data-session="on"]) .locked.fade .locked__content { --preview-h: 4rem; }
.fade .locked__gate { margin-top: 1rem; }
.pn { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad) clamp(3.5rem, 8vw, 6rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.pn a { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 0; border-top: 2px solid var(--ink); text-decoration: none; font-family: var(--font-title); font-weight: 700; font-size: 1.3rem; line-height: 1.15; color: var(--chocolate); transition: background-color .2s; }
.pn a:hover { background: var(--damasco); }
.pn__k { display: block; font-family: var(--font-text); font-size: .85rem; color: var(--ink); }
.pn__next { justify-content: flex-end; text-align: right; }
.pn__s { width: 3.5rem; height: 3.5rem; flex: none; }
@media (max-width: 640px) { .pn { grid-template-columns: 1fr; } }

.auth { display: grid; grid-template-columns: 1fr minmax(0, 30rem); gap: clamp(2rem, 6vw, 5rem); align-items: center; max-width: var(--wide); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.auth__s { width: min(100%, 26rem); justify-self: center; padding: clamp(1.5rem, 4vw, 3rem); background: var(--c); }
.auth__p { display: grid; gap: 1.25rem; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth__s { width: 12rem; justify-self: start; padding: 1.25rem; } }

/* Pie */
.ft { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem var(--pad); padding: clamp(3rem, 6vw, 4.5rem) var(--pad) 5rem; background: var(--damasco); border-top: 2px solid var(--ink); }
.ft__logo { width: 180px; }
.ft__nav { list-style: none; display: grid; gap: .4rem; font-weight: 600; }
.ft__nav a { text-decoration: none; }
.ft__nav a:hover { text-decoration: underline; }
.ft__inst { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; align-content: start; }
.ft__inst img:first-child { width: 170px; } .ft__inst img:last-child { width: 56px; }
.ft__prog { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--ink); font-size: .9rem; }
@media (max-width: 820px) { .ft { grid-template-columns: 1fr; } }

/* Sesión simulada */
.demo { position: fixed; right: 12px; bottom: 12px; z-index: 80; display: flex; align-items: center; border: 2px solid var(--ink); background: var(--crema); font-size: .82rem; font-weight: 600; }
.demo__k { padding: .4rem .7rem; }
.demo__btn { border: 0; border-left: 2px solid var(--ink); padding: .4rem .8rem; background: var(--mandarina); color: var(--ink); font-weight: 700; }
.demo__btn:hover { background: var(--damasco); }

/* Aparición de los campos de color: escalonada, una sola vez */
@media (prefers-reduced-motion: no-preference) {
  html.motion .sw__field { animation: grow .8s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 80ms); transform-origin: bottom; }
  html.motion .sw__field img { animation: settle-in .9s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 80ms + .25s); }
  html.motion .sw__i:nth-child(2) .sw__field, html.motion .sw__i:nth-child(2) .sw__field img { --k: 1; } .sw__i:nth-child(3) { --k: 2; } .sw__i:nth-child(4) { --k: 3; } .sw__i:nth-child(5) { --k: 4; } .sw__i:nth-child(6) { --k: 5; } .sw__i:nth-child(2) { --k: 1; }
}
/* Los campos de color crecen desde la base y el signo se asienta: una muestra que se completa */
@keyframes grow { from { transform: scaleY(0); } }
@keyframes settle-in { from { opacity: 0; transform: translateY(18%) rotate(-8deg); } }


/* Etapa 3 · revisión */
.access .btn { background: var(--crema); }
.access .btn:hover { background: var(--mandarina); }
/* Página de eje: los seis campos de la paleta; el del eje actual se ensancha con su signo */
.eh2 { max-width: var(--wide); margin: clamp(2rem, 4vw, 3rem) auto 0; padding: 0 var(--pad); display: grid; gap: var(--sp-3); }
.eh2__f { list-style: none; display: flex; gap: 6px; height: clamp(14rem, 36vh, 22rem); }
.eh2__f li { flex: 1 1 0; background: var(--c); display: grid; place-items: center; overflow: hidden; }
.eh2__f li.is-cur { flex-grow: 6; }
.eh2__f img { width: min(70%, 15rem); }
@media (prefers-reduced-motion: no-preference) { html.motion .eh2__f li.is-cur { animation: widen .8s var(--ease-out) both; } html.motion .eh2__f img { animation: settle-in .9s var(--ease-out) .3s both; } }
@keyframes widen { from { flex-grow: 1; } }
.eh2 .eh__t { color: var(--chocolate); }

/* Etapa 4 · moderación: campos de color más bajos para que título y ejes convivan en la primera pantalla */
@media (min-width: 761px) { .sw { height: clamp(17rem, 38vh, 24rem); } }
.sw__field img { width: 62%; }

/* Etapa 4 · revisión: los signos de recursos como marcas de índice, no como segunda tira de imágenes */
.res { grid-template-columns: 3rem 1fr auto; }

::selection { background: var(--mandarina); color: var(--chocolate); }

/* ===== Etapa 5 · espacio y ritmo =====
   Formas próximas dentro de cada grupo (6px entre campos), grupos bien separados:
   el hero se aparta de los campos, la puerta pertenece a la lista y comparte su borde
   derecho, y el último bloque se separa del pie Damasco. */
.sec--flush { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
#recursos { padding-top: var(--sp-6); padding-bottom: calc(var(--sp-7) + 2rem); }
.band { max-width: 64rem; margin-top: var(--sp-4); }
@media (max-width: 760px) {
  .sec--flush { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
  .sw__field { aspect-ratio: 4 / 3; }
  #recursos { padding-bottom: var(--sp-6); }
}
