/* Cuba Despierta · Arquitectura (views/arquitectura.php). Se carga solo en /descubre-cuba/arquitectura.
   Paleta de site.css más el azul de cianotipo de los planos y el papel de las láminas.
   Animaciones comunes de redesign.css (kenburns, fadeup, lineup, data-reveal). Sin JS propio. */
.az { --blueprint: #143d66; --blueprint-dark: #0d2b49; --line-w: rgba(255,255,255,.85); --grid: rgba(255,255,255,.07); --sheet: #f6f4ee; }
/* Todos los dibujos se trazan con stroke-dashoffset sobre pathLength="1" */
.az svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }

/* ---------- 1. Cabecera: el alzado se dibuja ---------- */
.ah { position: relative; display: flex; align-items: flex-end; min-height: min(100svh, 900px); padding: calc(var(--hdr-h) + 4rem) 0 5rem; background: var(--ink-950); color: #fff; overflow: hidden; isolation: isolate; }
.ah-media { position: absolute; inset: 0; z-index: -3; }
.ah-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; transform-origin: 60% 35%; }
html.js .ah-media img { animation: kenburns 26s var(--ease-out) both, hx-drift 46s ease-in-out 26s infinite alternate; }
/* Velo azul de plano con su cuadrícula sobre la foto */
.ah::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(13,43,73,.95) 0%, rgba(13,43,73,.78) 45%, rgba(13,43,73,.35) 100%), linear-gradient(to top, rgba(14,14,14,.8) 0%, rgba(14,14,14,0) 50%); }
.ah::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 95%); mask-image: linear-gradient(90deg, #000 30%, transparent 95%); }
.ah-in { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 2rem; }
@media (min-width: 1024px) { .ah-in { grid-template-columns: minmax(0, 1fr) 300px; } }
.ah-kicker { margin-top: 1.8rem; display: flex; align-items: center; gap: .9rem; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.ah-title { margin-top: 1.2rem; font-size: clamp(2.4rem, .6rem + 6vw, 6.2rem); font-weight: 800; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.ah-title .serif { color: #9cc4ec; font-size: 1.08em; text-transform: none; }
.ah-lead { margin-top: 1.4rem; max-width: 34rem; font-size: clamp(1rem, .95rem + .35vw, 1.2rem); line-height: 1.65; color: #e0e6ee; }
.ah-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.ah-plan { display: none; margin: 0; }
@media (min-width: 1024px) { .ah-plan { display: block; } }
.ah-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ah-svg path { stroke: var(--line-w); stroke-width: 1.4; }
.ah-svg text { fill: #9cc4ec; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-anchor: middle; }
.ah-plan figcaption { margin-top: .9rem; padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.3); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #9cc4ec; }
html.js .ah-svg path { animation: az-draw 1.3s var(--ease-io, ease-in-out) both; animation-delay: calc(.5s + var(--i) * 160ms); }
html.js .ah-svg text, html.js .ah-plan figcaption { animation: fadeup 1s var(--ease-out) 2.4s both; }
@keyframes az-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- 2. Láminas ---------- */
.al { padding-block: clamp(4rem, 3rem + 4vw, 7rem); scroll-margin-top: var(--hdr-h); }
.al-note { max-width: 22rem; font-size: 15px; line-height: 1.6; color: var(--muted); }
.al-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(4rem, 3rem + 3vw, 6rem); }
.al-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 900px) {
  .al-item { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
  .al-item:nth-child(even) .al-sheet { order: 2; }
}
/* La lámina: foto con marcas de registro; al aparecer se retira el velo de cianotipo */
.al-sheet { position: relative; display: block; aspect-ratio: 4 / 5; max-height: 640px; width: 100%; overflow: hidden; background: var(--blueprint); outline: 1px solid var(--line); outline-offset: 10px; }
.al-sheet:focus-visible { outline: 2px solid var(--brand); }
.al-sheet img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.al-sheet:hover img { transform: scale(1.05); }
.al-blue, .al-sheet::after { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); transition: clip-path 1.6s cubic-bezier(.7,0,.2,1) .5s; pointer-events: none; }
.al-blue { background: var(--blueprint); mix-blend-mode: color; }
.al-sheet::after { content: ''; background-color: rgba(20,61,102,.35); background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 28px 28px; }
html.js .al-item[data-reveal]:not(.is-in) .al-blue, html.js .al-item[data-reveal]:not(.is-in) .al-sheet::after { clip-path: inset(0); }
/* Al pasar el ratón vuelve una franja de plano por la derecha */
.al-sheet:hover .al-blue, .al-sheet:hover::after { clip-path: inset(0 0 0 82%); transition-delay: 0s; transition-duration: .7s; }
.al-marks i { position: absolute; z-index: 1; width: 22px; height: 22px; border-color: #fff; border-style: solid; border-width: 0; opacity: .9; }
.al-marks i:nth-child(1) { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.al-marks i:nth-child(2) { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.al-marks i:nth-child(3) { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.al-marks i:nth-child(4) { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }
.al-body { display: flex; flex-direction: column; gap: 1.1rem; max-width: 36rem; }
/* Cajetín del plano */
.al-box { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); margin: 0 0 .6rem; border: 2px solid var(--ink); }
.al-box > div { padding: .55rem .8rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.al-box > div:last-child, .al-box > .is-o { border-right: 0; }
.al-box > div:nth-last-child(-n+2):not(.is-n):not(.is-o) { border-bottom: 0; }
.al-box .is-n { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; border-bottom: 0; background: var(--ink); color: #fff; }
.al-box .is-o { grid-column: span 2; }
.al-box dt { font-size: 9.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.al-box .is-n dt { color: #bbb; }
.al-box dd { margin: .15rem 0 0; font-size: 14px; font-weight: 800; }
.al-box .is-n dd { font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; }
.al-box .is-o dd { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.35rem; line-height: 1.15; }
.al-t { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.al-t a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--brand), var(--brand)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease-out); }
.al-t a:hover { background-size: 100% 2px; }
.al-d { font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.al-pts { list-style: none; margin: .2rem 0 0; padding: 1.1rem 0 0; display: flex; flex-direction: column; gap: .7rem; border-top: 1px dashed var(--line-strong); }
.al-pts li { position: relative; padding-left: 1.6rem; font-size: 15px; line-height: 1.6; color: var(--muted); }
.al-pts li::before { content: ''; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; border: 2px solid var(--blueprint); }
.al-pts strong { color: var(--ink); }
.al-go { margin-top: .4rem; align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; padding-bottom: .15rem; border-bottom: 2px solid var(--brand); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); text-decoration: none; }
.al-go svg { transition: transform .45s var(--ease-out); }
.al-go:hover svg { transform: translateX(5px); }
.al-empty { padding: 2rem; border: 1px dashed var(--line-strong); color: var(--muted); }

/* ---------- 2b. Archivo de planos: láminas pequeñas ---------- */
.aa { padding-block: 0 clamp(4rem, 3rem + 4vw, 7rem); scroll-margin-top: var(--hdr-h); }
.ah + .aa { padding-top: clamp(4rem, 3rem + 4vw, 7rem); }
.aa-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem 1.4rem; }
@media (min-width: 560px) { .aa-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .aa-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .aa-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.aa-card { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.aa-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.aa-sheet { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blueprint); }
.aa-sheet img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.aa-sheet::after { content: ''; position: absolute; inset: 0; clip-path: inset(0 0 0 100%); transition: clip-path 1.4s cubic-bezier(.7,0,.2,1) .4s; pointer-events: none; background-color: rgba(20,61,102,.35); background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 22px 22px; }
html.js .aa-item[data-reveal]:not(.is-in) .al-blue, html.js .aa-item[data-reveal]:not(.is-in) .aa-sheet::after { clip-path: inset(0); }
.aa-card:hover .aa-sheet img { transform: scale(1.06); }
.aa-card:hover .al-blue, .aa-card:hover .aa-sheet::after { clip-path: inset(0 0 0 70%); transition-delay: 0s; transition-duration: .6s; }
/* Cajetín en una sola franja */
.aa-box { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'n o' 'n p'; border: 2px solid var(--ink); border-top: 0; }
.aa-n { grid-area: n; display: flex; align-items: center; padding: 0 .7rem; background: var(--ink); color: #fff; font-size: 1.2rem; letter-spacing: -.02em; }
.aa-o { grid-area: o; padding: .45rem .7rem 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.15; }
.aa-p { grid-area: p; padding: .1rem .7rem .45rem; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.aa-t { margin-top: .9rem; font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.aa-card:hover .aa-t { color: var(--brand-dark); }

/* ---------- 3. Los estilos de Cuba ---------- */
.ae { padding-block: clamp(4rem, 3rem + 4vw, 7rem); color: #fff; scroll-margin-top: var(--hdr-h); background-color: var(--blueprint); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; }
.ae .kicker-light, .ae .h-display .serif { color: #9cc4ec; }
.ae-note { max-width: 26rem; font-size: 15px; line-height: 1.6; color: #c9d6e4; }
.ae-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { .ae-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ae-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ae-list a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.4rem 1.4rem 1.3rem; border: 1px solid rgba(255,255,255,.28); background: rgba(13,43,73,.55); color: #fff; text-decoration: none; transition: border-color .3s, background-color .3s, transform .5s var(--ease-out); }
.ae-svg { width: 96px; height: 96px; margin-bottom: .6rem; }
.ae-svg path { stroke: var(--line-w); stroke-width: 1.5; transition: stroke-dashoffset 1.3s var(--ease-io, ease-in-out), stroke .3s; transition-delay: calc(.35s + var(--i) * 170ms), 0s; }
html.js .ae-list li[data-reveal]:not(.is-in) .ae-svg path { stroke-dashoffset: 1; }
.ae-when { font-size: 10.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #9cc4ec; }
.ae-n { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.75rem; line-height: 1.05; }
.ae-txt { font-size: 14px; line-height: 1.6; color: #c9d6e4; }
.ae-ej { margin-top: auto; padding-top: .8rem; display: inline-flex; align-items: center; gap: .35rem; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.ae-ej svg { transition: transform .45s var(--ease-out); }
.ae-list a:hover { border-color: #fff; background: rgba(13,43,73,.85); transform: translateY(-4px); }
.ae-list a:hover .ae-svg path { stroke: #ffb4a8; }
.ae-list a:hover .ae-ej svg { transform: translateX(5px); }
.ae-list a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- 4. Sigue descubriendo ---------- */
.ax { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.ax ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
@media (min-width: 560px) { .ax ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ax ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .ax ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ax a { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .5s var(--ease-out); }
.ax-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; background: var(--soft); color: var(--brand-dark); transition: background-color .35s, color .35s, transform .5s var(--ease-out); }
.ax-txt { display: flex; flex: 1; flex-direction: column; gap: .15rem; min-width: 0; }
.ax-n { font-size: 14.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.ax-c { font-size: 12px; color: var(--muted); }
.ax a > svg { color: var(--brand); transition: transform .45s var(--ease-out); }
.ax a:hover { border-color: var(--ink); transform: translateY(-3px); }
.ax a:hover .ax-ico { background: var(--brand); color: #fff; transform: rotate(-8deg); }
.ax a:hover > svg { transform: translateX(5px); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .ah-svg path, html.js .ah-svg text, html.js .ah-plan figcaption { animation: none; }
  .al-sheet img, .al-blue, .al-sheet::after, .ae-svg path, .ae-list a, .ax a { transition: none; }
  html.js .al-item[data-reveal]:not(.is-in) .al-blue, html.js .al-item[data-reveal]:not(.is-in) .al-sheet::after { clip-path: inset(0 0 0 100%); }
  html.js .ae-list li[data-reveal]:not(.is-in) .ae-svg path { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .aa-sheet img, .aa-sheet::after { transition: none; }
  html.js .aa-item[data-reveal]:not(.is-in) .al-blue, html.js .aa-item[data-reveal]:not(.is-in) .aa-sheet::after { clip-path: inset(0 0 0 100%); }
}
