/* FARO — editorial layer over the WebGL storm world.
   Palette: storm slate · rain silver · beam warm #ffe9c4 · dawn gray-rose. */
:root {
  --slate: #1a2028;
  --silver: #c9d2dc;
  --beam: #ffe9c4;
  --rose: #c9a49b;
  --ink: #262a33;
  --paper: #e7dcc0;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --serif: "Libre Caslon Text", Georgia, serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--silver) var(--slate); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--slate); }
::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 5px; }
html, body { background: var(--slate); color: var(--silver); }
body { font-family: var(--serif); overflow-x: hidden; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#track { position: relative; z-index: 1; pointer-events: none; }
#hud { display: none; position: fixed; bottom: 12px; left: 12px; z-index: 90;
  color: var(--beam); font: 11px var(--mono); white-space: pre; pointer-events: none; }
body.debug #hud { display: block; }

.mono { font-family: var(--mono); letter-spacing: 0.14em; font-size: 11px; }
.dim { opacity: .4; }

/* compass-needle cursor */
#cursor { display: none; }
@media (pointer: fine) {
  body:not(.reduced) { cursor: none; }
  body:not(.reduced) a, body:not(.reduced) button { cursor: none; }
  body:not(.reduced) #cursor { display: block; position: fixed; left: -11px; top: -11px;
    width: 22px; height: 22px; z-index: 99; pointer-events: none; color: var(--beam);
    transition: transform .12s linear; will-change: transform; }
}

/* chrome */
.chrome { position: fixed; left: 0; right: 0; z-index: 40; display: flex;
  align-items: center; justify-content: space-between; padding: 28px 40px; }
.chrome-top { top: 0; }
.chrome-bottom { bottom: 0; pointer-events: none; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--silver);
  text-decoration: none; }
.wm-glyph { width: 22px; height: 22px; color: var(--beam); }
.wm-text { font-family: var(--serif); font-size: 19px; letter-spacing: 0.46em; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--silver); text-decoration: none; opacity: 0.75; transition: opacity .3s, color .3s; }
.nav a:hover { opacity: 1; color: var(--beam); }

/* the instrument — compass + storm meter */
.inst { position: fixed; left: 30px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inst-compass { width: 68px; height: 68px; }
.inst-needle { transform-origin: 34px 34px; transition: transform .25s ease-out; }
.inst-read { font-size: 9px; letter-spacing: .2em; opacity: .8; color: var(--silver); }
#stormBars { display: flex; gap: 3px; margin-top: 2px; }
#stormBars i { width: 5px; height: 12px; background: rgba(201,210,220,.14);
  transition: background .5s; }
#stormBars i.lit { background: var(--silver); }

/* progress skip */
.skip { pointer-events: auto; background: none; border: 1px solid rgba(201,210,220,.22);
  color: var(--silver); padding: 10px 18px; letter-spacing: .18em;
  transition: border-color .3s, color .3s; border-radius: 2px; }
.skip:hover { border-color: var(--beam); color: var(--beam); }

/* editorial overlays */
.overlays { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.ov { position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 0 8vw 0 13vw; opacity: 0; visibility: hidden; }
.ov > * { transform: translateY(24px); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.ov.on > * { transform: none; }
.ov.on { visibility: visible; }
.ov-right { align-items: flex-end; text-align: right; padding-right: 10vw; }
.ov-low { justify-content: flex-end; padding-bottom: 14vh; }
.ov-center { align-items: center; text-align: center; padding: 0 6vw; }

/* cold-open brand block — small, after the first beat */
.brandline { margin-bottom: 18px; }
.brand-word { font-family: var(--serif); font-size: 17px; letter-spacing: .58em;
  color: var(--beam); }
.brand-claim { font-size: clamp(38px, 5.6vw, 84px); line-height: 1.05; font-weight: 400;
  text-shadow: 0 2px 40px rgba(8,11,16,.9); }
.brand-claim em, .display-sm em { font-style: italic; color: var(--rose); }
.sub { margin-top: 30px; opacity: .6; }

.chapnum { color: var(--beam); margin-bottom: 20px; }
.display-sm { font-size: clamp(34px, 4.6vw, 66px); line-height: 1.1; font-weight: 400;
  text-shadow: 0 2px 30px rgba(8,11,16,.85); }
.body-line { margin-top: 22px; opacity: .65; }
/* the one credibility sentence — no numbers strip, no stats */
.credo { font-size: clamp(24px, 2.9vw, 42px); font-style: italic; line-height: 1.3;
  max-width: 15em; text-shadow: 0 2px 30px rgba(8,11,16,.85); }

/* el cuaderno del farero — weathered paper pages */
.ov-page { align-items: flex-end; justify-content: center; padding-right: 8vw; }
.page { pointer-events: none; width: min(560px, 84vw); padding: 34px 38px 30px;
  color: var(--ink); transform: rotate(var(--tilt, -1.5deg));
  background:
    radial-gradient(120% 90% at 20% 8%, rgba(255,255,255,.28), transparent 55%),
    radial-gradient(150% 120% at 85% 100%, rgba(94,74,40,.24), transparent 60%),
    radial-gradient(100% 100% at 50% 50%, var(--paper) 60%, #d3c4a2 100%);
  box-shadow: 0 24px 70px rgba(5,8,12,.65), inset 0 0 60px rgba(120,95,55,.18);
  border-radius: 2px;
}
.ov.on .page { transform: rotate(var(--tilt, -1.5deg)); }
.page-head { display: flex; justify-content: space-between; gap: 12px;
  font-size: 9px; letter-spacing: .18em; color: #6d5f43;
  border-bottom: 1px solid rgba(109,95,67,.45); padding-bottom: 10px; margin-bottom: 18px; }
.entry { margin-bottom: 18px; }
.entry-date { font-size: 10px; color: #7d5b33; margin-bottom: 6px; }
.entry-body { font-size: 15px; line-height: 1.55; }
.entry-hand, .sign { font-family: var(--serif); font-style: italic; font-size: 19px;
  color: #4a3d55; margin-top: 10px; }
.sign { text-align: right; margin-top: 4px; }
.paste { margin: 16px 4px 18px; transform: rotate(var(--ph, -2deg)); position: relative;
  background: #f4efe4; padding: 8px 8px 6px; box-shadow: 0 6px 18px rgba(40,30,12,.35); }
.paste::before, .paste::after { content: ""; position: absolute; width: 62px; height: 18px;
  background: rgba(212,200,164,.75); box-shadow: 0 1px 3px rgba(40,30,12,.25); }
.paste::before { top: -9px; left: 18%; transform: rotate(-4deg); }
.paste::after { top: -9px; right: 18%; transform: rotate(5deg); }
.paste img { display: block; width: 100%; height: auto; filter: sepia(.28) contrast(.94) brightness(.96); }
.paste figcaption { font-size: 8.5px; letter-spacing: .16em; color: #6d5f43; padding-top: 6px; text-align: center; }
.stamp { position: absolute; right: 26px; bottom: 22px; transform: rotate(-8deg);
  font-size: 9px; letter-spacing: .2em; color: rgba(140, 60, 45, .55);
  border: 2px solid rgba(140, 60, 45, .45); border-radius: 3px; padding: 5px 9px; }
.page { position: relative; }

.cta { pointer-events: auto; margin-top: 44px; display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em;
  color: var(--slate); background: var(--beam); padding: 18px 38px;
  text-decoration: none; border-radius: 2px; transition: background .3s, transform .3s;
  text-transform: uppercase; }
.cta:hover { background: var(--silver); transform: translateY(-2px); }
.foot { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  opacity: .45; letter-spacing: .2em; }

/* contacto overlay — pure :target */
.contacto { display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(10,13,18,.93); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; text-align: center; }
.contacto:target { display: flex; }
.contacto-card { padding: 60px 8vw; }
.contacto-line { margin-top: 22px; opacity: .65; }
.contacto-close { display: block; margin-top: 46px; color: var(--silver);
  text-decoration: none; opacity: .6; transition: opacity .3s, color .3s; }
.contacto-close:hover { opacity: 1; color: var(--beam); }

/* reduced motion: native scroll + poster world (single rendered frame) */
@media (prefers-reduced-motion: reduce) {
  .ov > * { transition: none; transform: none; }
  .inst-needle { transition: none; }
}
body.reduced .overlays { position: static; pointer-events: auto; }
body.reduced .ov { position: relative; inset: auto; min-height: 100vh;
  opacity: 1; visibility: visible; }
body.reduced #track, body.reduced .skip, body.reduced .inst { display: none; }

@media (max-width: 768px) {
  .chrome { padding: 18px 16px; gap: 10px; }
  .nav { gap: 10px; flex: none; }
  .nav a { font-size: 9px; letter-spacing: .06em; white-space: nowrap; }
  .wm-glyph { width: 17px; height: 17px; }
  .wm-text { font-size: 13px; letter-spacing: .32em; }
  .inst { left: 10px; transform: translateY(-50%) scale(.78); transform-origin: left center; }
  .ov { padding: 0 7vw; }
  .ov-right { padding-right: 7vw; }
  .ov-page { padding: 0 5vw; align-items: center; }
  .page { padding: 22px 20px 18px; }
  .entry-body { font-size: 13.5px; }
  .chrome-bottom .dim { display: none; }
  .skip { padding: 8px 12px; font-size: 10px; }
}
