@font-face { font-family: Manrope; src: url("assets/manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --paper: #eeece4;
  --ink: #223c33;
  --muted: #5f685f;
  --line: #c9ccc0;
  --water: #1e5b56;
  --rust: #89583c;
  --white: #faf9f4;
  --night: #0f1a1c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --g: clamp(18px, 3.4vw, 56px);
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 450 16px/1.65 Manrope, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 450; line-height: 1.04; letter-spacing: -.055em; }
h1 { font-size: clamp(3.2rem, 6.6vw, 7rem); }
h2 { font-size: clamp(2rem, 4vw, 4.4rem); }
h3 { font-size: 1.6rem; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #ab623d; outline-offset: 4px; }
::selection { background: #d8b98c; color: #142b24; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 650; line-height: 1.6; }
.skip-link { position: fixed; top: -120px; left: 1rem; padding: 1rem; background: var(--ink); color: #fff; z-index: 50; }
.skip-link:focus { top: 1rem; }

/* ---------- barra ---------- */
.top { position: fixed; z-index: 30; inset: 0 0 auto; display: flex; align-items: center; gap: 2rem; padding: 1.1rem var(--g); color: var(--white); transition: color .5s, background .5s; background: linear-gradient(rgba(10, 18, 16, .5), transparent); }
.top.claro { color: var(--ink); background: linear-gradient(rgba(238, 236, 228, .94), rgba(238, 236, 228, 0)); }
.brand { font-weight: 650; font-size: 1.7rem; line-height: 1; letter-spacing: -.075em; white-space: nowrap; }
.brand span { display: block; letter-spacing: .09em; font-size: .5rem; font-weight: 600; margin-top: .45rem; text-transform: uppercase; }
.top nav { margin-left: auto; display: flex; gap: clamp(1rem, 1.8vw, 2rem); font-size: .85rem; }
.top nav a { position: relative; padding: .35rem 0; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.top nav a:hover::after { transform: scaleX(1); }
.hud { margin: 0; font: 400 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; padding: .5rem .7rem; border-radius: 2px; opacity: .85; font-variant-numeric: tabular-nums; min-width: 9.5rem; text-align: center; }
.hud b { font-weight: 400; }

/* ---------- 1 · horizonte ---------- */
.horizonte { position: relative; height: 1600vh; background: var(--night); }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--paper); color: var(--white); }
.still, .frames { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aerea { -webkit-mask-image: radial-gradient(circle at 50% 43%, #000 var(--r, 0%), transparent calc(var(--r, 0%) + 14%)); mask-image: radial-gradient(circle at 50% 43%, #000 var(--r, 0%), transparent calc(var(--r, 0%) + 14%)); }
.frames { opacity: 0; will-change: transform; }
.tinta { mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.aro { position: absolute; left: 50%; top: 43%; width: 0; height: 0; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 0 2px rgba(255, 248, 232, .95), 0 0 80px 26px rgba(255, 232, 190, .5), inset 0 0 90px 24px rgba(255, 232, 190, .4); transition: opacity .4s; }
.anot { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.anot-lines { fill: none; stroke: #8a4d2c; stroke-width: 1.2; stroke-dasharray: 1200; stroke-dashoffset: var(--dash, 1200); }
.anot-text { font: 500 11px var(--mono); letter-spacing: .14em; fill: #8a4d2c; opacity: var(--to, 0); }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 16, 14, .86), rgba(8, 16, 14, .58) 30%, rgba(8, 16, 14, .14) 50%, transparent 62%), linear-gradient(rgba(8, 16, 14, .35), transparent 22%); opacity: 0; }
.papel { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(238, 236, 228, .94), rgba(238, 236, 228, .8) 30%, rgba(238, 236, 228, .2) 50%, transparent 60%); }
.fin { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; }
.beat { position: absolute; left: var(--g); top: 50%; width: min(520px, 40vw); transform: translateY(calc(-50% + 26px)); opacity: 0; transition: opacity .9s var(--ease), transform 1.1s var(--ease); pointer-events: none; }
.beat.on { opacity: 1; transform: translateY(-50%); }
.beat h2 { font-size: clamp(2rem, 3.8vw, 4rem); margin: .4rem 0 1.2rem; }
.beat p:not(.eyebrow) { color: rgba(250, 249, 244, .8); font-size: 1.05rem; max-width: 26rem; }
.beat.claro { color: var(--ink); }
.beat.claro p:not(.eyebrow) { color: var(--muted); }
.beat h1 { margin: .6rem 0 1.2rem; }
.lede { font-size: 1.2rem !important; }
.hint { display: flex; gap: .8rem; align-items: center; margin-top: 2.2rem; font: 500 .72rem/1 var(--mono) !important; letter-spacing: .16em; text-transform: uppercase; }
.hint span { width: 1px; height: 36px; background: currentColor; transform-origin: top; animation: baja 1.8s var(--ease) infinite; }
@keyframes baja { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.marco i { position: absolute; width: 22px; height: 22px; border: 1px solid currentColor; opacity: .55; pointer-events: none; }
.marco i:nth-child(1) { left: var(--g); top: 92px; border-width: 1px 0 0 1px; }
.marco i:nth-child(2) { right: var(--g); top: 92px; border-width: 1px 1px 0 0; }
.marco i:nth-child(3) { left: var(--g); bottom: 26px; border-width: 0 0 1px 1px; }
.marco i:nth-child(4) { right: var(--g); bottom: 26px; border-width: 0 1px 1px 0; }
.ruta { position: absolute; right: calc(var(--g) + 34px); bottom: 34px; width: min(360px, 40vw); font: 500 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.ruta ol { list-style: none; margin: 0 0 .7rem; padding: 0; display: flex; justify-content: space-between; opacity: .8; }
.ruta-bar { height: 1px; background: rgba(250, 249, 244, .3); position: relative; }
.ruta-bar i { position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(0); }
.stage.claro { color: var(--ink); }
.stage.claro .ruta-bar { background: rgba(34, 60, 51, .25); }

/* ---------- 2 · parcela ---------- */
.parcela { padding: 16vh var(--g) 12vh; }
.parcela-head { max-width: 900px; margin: 0 0 3.2rem; }
.parcela-head h2 { margin-top: .8rem; }
.landscape-workbench { --scene-bg: #e1e2d5; background: var(--scene-bg); position: relative; border-radius: 2px; overflow: hidden; box-shadow: 0 50px 90px -60px rgba(34, 60, 51, .45); }
.scene-topline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.7rem 0; position: relative; z-index: 1; }
.view-controls { display: flex; padding: 3px; gap: 3px; border: 1px solid #a7b3a4; border-radius: 3px; }
.view-controls button { font-size: .8125rem; padding: .4rem .8rem; min-height: 2.15rem; border-radius: 2px; transition: background .3s, color .3s; }
.view-controls button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.view-controls button:hover { box-shadow: inset 0 0 0 1px #7e9383; }
.scene-row { display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; }
.canvas-wrap { position: relative; height: clamp(360px, 36vw, 560px); min-width: 0; }
.landscape-canvas { display: block; width: 100%; height: 100%; position: relative; z-index: 0; }
.canvas-fallback { display: none; min-height: 250px; padding: 3rem; align-content: center; }
.map-coordinates { position: absolute; left: 1.7rem; right: 1.7rem; top: 1.5rem; display: flex; justify-content: space-between; pointer-events: none; font: .8rem/1.5 var(--mono); opacity: .7; }
.map-coordinates > span:last-child { text-align: right; }
.scene-scale { position: absolute; left: 1.7rem; bottom: 1rem; display: flex; align-items: center; gap: 1rem; font: .75rem var(--mono); color: #354e3b; pointer-events: none; }
.canvas-wrap[data-light="night"] .scene-scale, .canvas-wrap[data-light="night"] .map-coordinates { color: #cfdbba; }
.scene-scale span { letter-spacing: -.08em; }
.postal { position: relative; margin: 1.1rem 1.1rem 1.1rem 0; overflow: hidden; border-radius: 2px; background: #000; }
.postal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; opacity: 0; transform: scale(var(--ps, 1.04)); transition: opacity 1.1s var(--ease), transform 1.6s var(--ease); }
.postal img[data-foto="med-tarde"] { opacity: 1; }
.postal-luz { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; background: linear-gradient(var(--la, 100deg), rgba(255, 214, 160, var(--li, .25)), transparent 60%); transition: background 1s var(--ease); }
.postal figcaption { position: absolute; left: 1rem; bottom: 1rem; right: 1rem; color: var(--white); display: flex; flex-direction: column; gap: .2rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.postal figcaption strong { font-weight: 500; font-size: 1.05rem; letter-spacing: -.02em; }
.postal::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, .45), transparent 40%); }
.postal figcaption { z-index: 2; }
.scene-key { display: flex; gap: 1.5rem; align-items: center; padding: .8rem 1.7rem; border-top: 1px solid #bac4b5; font-size: .75rem; flex-wrap: wrap; position: relative; }
.scene-key > span { display: flex; gap: .5rem; align-items: center; }
.scene-key i { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.key-water { background: #295d57; } .key-plant { background: #657a48; } .key-stone { background: #b5a786; } .key-path { background: #967342; }
.scene-phase { margin-left: auto; font-size: .75rem; color: #3e5646; }
.instruments { display: grid; grid-template-columns: 1fr .8fr 1fr 1.1fr 1.3fr auto; align-items: end; gap: 1rem; padding: 1.3rem 1.7rem; background: #e8e8dd; border-top: 1px solid #bac4b5; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; font-size: .875rem; }
.field > span:first-child { font-size: .8125rem; font-weight: 550; display: flex; justify-content: space-between; }
.field output { font: .8rem var(--mono); color: var(--rust); }
.field select { background: transparent; border: 0; border-bottom: 1px solid #8d9d8b; border-radius: 0; width: 100%; padding: .65rem 1.5rem .65rem 0; min-height: 2.7rem; font-size: .875rem; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%233b5244' stroke-width='1.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .5rem center; background-size: 10px; }
.hora input { -webkit-appearance: none; appearance: none; width: 100%; height: 2.7rem; background: transparent; cursor: pointer; margin: 0; }
.hora input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, #c99a5b, #b07a4f 30%, #30475a 70%, #142430); }
.hora input::-moz-range-track { height: 2px; background: linear-gradient(90deg, #c99a5b, #b07a4f 30%, #30475a 70%, #142430); }
.hora input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); }
.hora input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); }
.reset-button { min-height: 2.75rem; font-size: .875rem; text-decoration: underline; text-underline-offset: 5px; padding: .55rem; }
.reset-button:hover { color: var(--rust); }
.scene-reading { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; background: var(--paper); padding: 1.6rem 0 0; }
.scene-reading p { display: flex; flex-direction: column; gap: .45rem; font-size: .9rem; color: #526052; }
.scene-reading strong { font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.scene-reading p:last-child { border-left: 1px solid var(--line); padding-left: 2rem; }
.nota-modelo { margin-top: 1.4rem; font: .72rem var(--mono); color: var(--muted); letter-spacing: .04em; }
.landscape-workbench.pulso { animation: pulso 1.2s var(--ease); }
@keyframes pulso { 30% { box-shadow: 0 0 0 3px rgba(137, 88, 60, .45), 0 50px 90px -60px rgba(34, 60, 51, .45); } }

/* ---------- 3 · estudios ---------- */
.estudios { padding: 14vh var(--g) 12vh; border-top: 1px solid var(--line); }
.estudios header { margin-bottom: 3.4rem; }
.estudios h2 { margin-top: .8rem; }
.atlas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 40px); }
.estudio figure { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; margin-bottom: 1.2rem; background: #0e1714; position: relative; }
.estudio figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease), filter .8s; filter: saturate(.9); }
.estudio:hover figure img { transform: scale(1.13); filter: saturate(1.05); }
.estudio figure::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(250, 249, 244, .0); transition: border-color .8s, inset .8s var(--ease); }
.estudio:hover figure::after { border-color: rgba(250, 249, 244, .55); inset: 20px; }
.estudio .eyebrow { color: var(--rust); }
.estudio h3 { margin: .3rem 0 .6rem; font-size: 2rem; }
.estudio p:not(.eyebrow) { color: var(--muted); font-size: .95rem; }
.cargar { margin-top: 1rem; border-bottom: 1px solid currentColor; padding: 0 0 .3rem; font-size: .9rem; transition: color .3s; }
.cargar:hover { color: var(--rust); }

/* ---------- 4 · materia ---------- */
.materia { padding: 14vh var(--g) 16vh; background: var(--ink); color: var(--paper); }
.materia header { max-width: 640px; margin-bottom: 4rem; }
.materia h2 { margin: .8rem 0 1.2rem; }
.materia header p:not(.eyebrow) { color: rgba(238, 236, 228, .72); }
.mosaico { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 9vw; gap: clamp(12px, 1.6vw, 26px); }
.m { position: relative; overflow: hidden; border-radius: 2px; }
.m > div { position: absolute; inset: -12% 0; }
.m img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--y, 0)) scale(1.02); transition: filter .8s; filter: brightness(.86); }
.m:hover img { filter: brightness(1.02); }
.m1 { grid-column: 1 / 8; grid-row: span 4; }
.m2 { grid-column: 8 / 13; grid-row: span 3; }
.m3 { grid-column: 8 / 13; grid-row: span 3; }
.m4 { grid-column: 2 / 8; grid-row: span 2; }
.m figcaption { position: absolute; left: 1.1rem; bottom: 1rem; display: flex; flex-direction: column; font-size: .9rem; color: rgba(250, 249, 244, .85); text-shadow: 0 1px 14px rgba(0, 0, 0, .5); transform: translateY(8px); opacity: .85; transition: transform .6s var(--ease), opacity .6s; }
.m figcaption b { font-weight: 500; font-size: 1.5rem; letter-spacing: -.04em; color: var(--white); }
.m:hover figcaption { transform: none; opacity: 1; }

/* ---------- pie ---------- */
.site-footer { background: #17291f; color: var(--paper); padding: 9vh var(--g) 2.4rem; }
.footer-top { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(238, 236, 228, .18); }
.footer-top p { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -.055em; }
.footer-action { border-bottom: 1px solid currentColor; padding-bottom: .3rem; font-size: .9rem; }
.footer-index { display: grid; grid-template-columns: auto auto 1fr; gap: 3rem; align-items: start; padding: 2.4rem 0; }
.footer-brand { font-weight: 650; font-size: 2.4rem; letter-spacing: -.075em; line-height: 1; }
.footer-index p { font-size: .8rem; color: rgba(238, 236, 228, .7); }
.footer-index .small { justify-self: end; max-width: 30rem; text-align: right; }
.footer-base { display: flex; justify-content: space-between; font-size: .72rem; color: rgba(238, 236, 228, .6); }

@media (max-width: 900px) {
  .top nav { display: none; }
  .hud { margin-left: auto; min-width: 0; }
  .shade { background: linear-gradient(0deg, rgba(10, 20, 18, .85), rgba(10, 20, 18, .3) 55%, transparent); }
  .papel { background: linear-gradient(0deg, rgba(238, 236, 228, .95), rgba(238, 236, 228, .75) 45%, transparent 70%); }
  .beat { left: var(--g); right: var(--g); width: auto; top: auto; bottom: 12vh; transform: translateY(24px); }
  .beat.on { transform: none; }
  .ruta { left: var(--g); right: var(--g); width: auto; bottom: 22px; }
  .marco { display: none; }
  .scene-topline { display: block; padding: 1rem; }
  .view-controls { width: fit-content; margin-top: .8rem; }
  .scene-row { grid-template-columns: 1fr; }
  .canvas-wrap { height: 320px; }
  .postal { margin: 0 1rem 1rem; aspect-ratio: 16 / 10; }
  .map-coordinates { display: none; }
  .instruments { grid-template-columns: 1fr 1fr; padding: 1rem; }
  .instruments .hora { grid-column: 1 / -1; }
  .instruments .reset-button { grid-column: 1 / -1; justify-self: end; }
  .scene-reading { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem 1rem 1rem; }
  .scene-reading p:last-child { border: 0; padding: 0; }
  .scene-phase { display: none; }
  .atlas { grid-template-columns: 1fr; }
  .mosaico { grid-auto-rows: 22vw; }
  .m1 { grid-column: 1 / -1; } .m2 { grid-column: 1 / 7; } .m3 { grid-column: 7 / -1; } .m4 { grid-column: 1 / -1; }
  .footer-top, .footer-index { display: block; }
  .footer-index > * { margin-bottom: 1rem; }
  .footer-index .small { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .beat { transition: opacity .3s; }
  .hint span { animation: none; }
  .postal img { transition: opacity .3s; }
}
