/* MERIDIANA · estilos compartidos. Los colores vienen de la hora (core.js). */
:root {
  --bg: #f3efe5; --ink: #14140f; --soft: #6d6a5f; --luz: #ff5b1f;
  --sol: #ff5b1f; --viento: #13a594; --bateria: #5b54f0; --red: #e4b400;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --linea: color-mix(in srgb, var(--ink) 16%, transparent);
  --gutter: clamp(16px, 3.2vw, 48px);
  color-scheme: light dark;
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.9s cubic-bezier(.7, 0, .2, 1) both sale; }
::view-transition-new(root) { animation: 0.9s cubic-bezier(.7, 0, .2, 1) both entra; }
@keyframes entra { from { clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%)); } to { clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); } }
@keyframes sale { to { opacity: .35; transform: scale(.97); } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; font-variation-settings: 'wdth' 100; -webkit-font-smoothing: antialiased; transition: background-color .25s linear, color .25s linear; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--luz); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
img, svg, canvas { display: block; }

/* cabecera */
.cabeza { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; justify-content: space-between; align-items: flex-start; padding: 22px var(--gutter); pointer-events: none; mix-blend-mode: normal; }
.cabeza > * { pointer-events: auto; }
/* una franja del color del fondo para que el texto que pasa por debajo no choque con la marca */
.cabeza::before { content: ''; position: absolute; inset: 0 0 -28px 0; z-index: -1; pointer-events: none; background: linear-gradient(var(--bg) 52%, color-mix(in srgb, var(--bg) 0%, transparent)); }
.marca { display: flex; flex-direction: column; gap: 4px; }
.marca b { font-weight: 800; font-size: 17px; letter-spacing: .14em; font-variation-settings: 'wdth' 125; }
.marca span { color: var(--soft); }
.nav-paginas { display: flex; gap: 22px; }
.nav-paginas a { position: relative; padding: 4px 0; color: var(--soft); transition: color .3s; }
.nav-paginas a:hover, .nav-paginas a[aria-current] { color: var(--ink); }
.nav-paginas a[aria-current]::before { content: ''; position: absolute; left: -12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--luz); }
.nav-paginas a i { font-style: normal; color: var(--luz); margin-right: 6px; }
.menu-boton { display: none; }

/* reloj de 24 h: instrumento fijo en todas las páginas */
.reloj { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100vw - 2 * var(--gutter))); display: grid; grid-template-columns: 34px 1fr 64px; align-items: center; gap: 16px; padding: 10px 16px 10px 12px; border: 1px solid var(--linea); border-radius: 999px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.reloj-play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--linea); display: grid; place-items: center; }
.reloj-play i { width: 0; height: 0; border-left: 9px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.reloj-corre .reloj-play i { width: 10px; height: 12px; border: 0; margin: 0; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.reloj-pista { position: relative; height: 38px; cursor: ew-resize; touch-action: none; }
.reloj-arco { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arco-dia { fill: none; stroke: var(--linea); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.horizonte { stroke: var(--linea); vector-effect: non-scaling-stroke; }
.reloj-marcas span { position: absolute; bottom: -2px; width: 1px; height: 4px; background: var(--linea); }
.reloj-marcas span { font-size: 0; }
.reloj-marcas span.mayor { height: 7px; background: var(--soft); font: 9px/1 var(--mono); color: var(--soft); text-indent: 4px; white-space: nowrap; overflow: visible; }
.reloj-astro { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--luz); box-shadow: 0 0 0 5px color-mix(in srgb, var(--luz) 22%, transparent), 0 0 22px var(--luz); transition: background .3s; }
.reloj-astro.luna { background: var(--bg); box-shadow: inset 4px -2px 0 0 var(--ink), 0 0 16px color-mix(in srgb, var(--ink) 40%, transparent); }
.reloj-hora { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }

/* mira del cursor */
.mira { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; mix-blend-mode: difference; color: #fff; transition: opacity .3s; }
.mira i { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1px solid currentColor; border-radius: 50%; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.mira i::before, .mira i::after { content: ''; position: absolute; background: currentColor; }
.mira i::before { left: 50%; top: -6px; bottom: -6px; width: 1px; }
.mira i::after { top: 50%; left: -6px; right: -6px; height: 1px; }
.mira.sobre i { transform: scale(1.9) rotate(45deg); }
.mira span { position: absolute; left: 20px; top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.mira.fuera { opacity: 0; }
@media (pointer: fine) { body, a, button, [role=slider] { cursor: none; } }

/* apariciones */
.aparece { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.8,.2,1); }
.aparece.visto { opacity: 1; transform: none; }

/* pie común */
.pie { padding: 80px var(--gutter) 120px; border-top: 1px solid var(--linea); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.pie p { color: var(--soft); font-size: 13px; max-width: 420px; }
.pie .marca b { font-size: 40px; letter-spacing: .06em; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

@media (max-width: 860px) {
  .nav-paginas { display: none; position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; padding: 0 var(--gutter); gap: 14px; font-size: 22px; }
  .nav-paginas.abierta { display: flex; }
  .nav-paginas a { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 34px; font-weight: 700; color: var(--ink); }
  .menu-boton { display: block; position: relative; z-index: 2; padding: 6px 0; }
  .cabeza .marca { position: relative; z-index: 2; }
  .sig-t { font-size: 13vw !important; }
  .menu-abierto .reloj, .menu-abierto .cuadrante { visibility: hidden; }
  .reloj { grid-template-columns: 30px 1fr 52px; gap: 10px; bottom: 12px; padding: 8px 12px 8px 10px; }
  .pie { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
  .aparece { opacity: 1; transform: none; }
}
