/* Luz del faro: proyección, bloom acotado y reflejo sobre el cristal.
   Giro original de 15s y tres paneles: el haz llega por oleadas suaves. */
.landing { --beacon-cycle: 15s; }
.brand-note.rights { justify-content: center; text-align: center; letter-spacing: .06em; text-transform: none; line-height: 1.7; }
/* En tablet el título termina antes de la torre; en móvil queda bajo la luz. */
@media(min-width:700px) and (max-width:959px) {
  .hero h1 { font-size: clamp(50px, calc((37.19vw - 87px) / 4.2), 64px); }
  .hero-copy { max-width: calc(37.19vw - 90px); }
}
.atmosphere-mode { overflow: hidden; }
.atmosphere-mode .shell { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-9px); }
.atmosphere-mode .ambient-controls, .atmosphere-mode .preview-note { display: none; }
.shell { transition: opacity .6s ease, transform .6s ease, visibility .6s; }
.reduce .shell { transition: none; }
.ambient-controls { position: absolute; z-index: 2; top: 82px; right: 24px; display: grid; justify-items: end; gap: 5px; }
.ambient-toggle { min-height: 38px; padding: 0 12px; font: 400 10px/1.2 var(--mono); color: #c5c9cd; background: #06080bba; box-shadow: 0 3px 12px #0003; }
.ambient-volume { display: none; align-items: center; gap: 9px; min-height: 34px; padding: 0 12px; border: 1px solid #2f3a46; border-radius: 999px; background: #06080bba; color: var(--dim); font: 400 9px/1 var(--mono); }
.ambient-toggle[aria-pressed=true] + .ambient-volume { display: flex; }
html:not(.atmosphere-mode) .ambient-controls > .ambient-volume { display: none; }
.ambient-volume input { width: 82px; height: 22px; margin: 0; accent-color: var(--amber); cursor: pointer; }
.ambient-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(min-width:560px) and (max-width:959px) { .ambient-controls { top: 99px; right: 40px; } }
@media(min-width:960px) { .ambient-controls { top: 104px; right: max(64px, calc((100% - 1152px) / 2)); } }
@media(max-width:359px) { .ambient-controls { right: 19px; } }
.glass-plate { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; }
.scene::before { z-index: 1; }
.scene::after { z-index: 2; }
.reduce .glass-plate { display: none; }
@media(prefers-reduced-motion:reduce) { .glass-plate { display: none; } }
.blood-glass {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .94;
  -webkit-mask-image: linear-gradient(90deg, transparent 47%, #0009 60%, #000 76%), linear-gradient(180deg, #000, #000 87%, transparent);
  mask-image: linear-gradient(90deg, transparent 47%, #0009 60%, #000 76%), linear-gradient(180deg, #000, #000 87%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media(min-width:960px) {
  .blood-glass {
    -webkit-mask-image: linear-gradient(90deg, transparent 58%, #0009 69%, #000 79%), linear-gradient(180deg, #000, #000 89%, transparent);
    mask-image: linear-gradient(90deg, transparent 58%, #0009 69%, #000 79%), linear-gradient(180deg, #000, #000 89%, transparent);
  }
}
.weather {
  top: 0;
  height: 720px;
  opacity: .95;
  -webkit-mask-image: linear-gradient(180deg, #000b, #000 12%, #000 55%, #0004 78%, transparent 100%), linear-gradient(90deg, #0002, #0008 42%, #000 72%);
  mask-image: linear-gradient(180deg, #000b, #000 12%, #000 55%, #0004 78%, transparent 100%), linear-gradient(90deg, #0002, #0008 42%, #000 72%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media(min-width:560px) and (max-width:959px) { .weather { height: 950px; } }
@media(min-width:960px) { .weather { height: clamp(820px, 60vw, 1000px); } }
.lighthouse {
  --beacon-cycle: 15s;
  --beam-reach: min(1100px, 240vw);
  --beam-height: clamp(180px, 48vw, 260px);
  --halo-size: 116px;
  contain: layout style;
}

.beam {
  top: calc(var(--beam-height) / -2);
  width: var(--beam-reach);
  height: var(--beam-height);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  background:
    radial-gradient(ellipse at 0 50%, #fff4dba8 0%, #ffe0a759 15%, #f2ce8926 44%, #ddc69909 77%, transparent 100%);
  -webkit-mask-image: linear-gradient(0deg, transparent, #0004 25%, #000 46%, #000 54%, #0004 75%, transparent);
  mask-image: linear-gradient(0deg, transparent, #0004 25%, #000 46%, #000 54%, #0004 75%, transparent);
  filter: none;
  transform-origin: 0 50%;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: beaconSweep var(--beacon-cycle) linear infinite;
}

.beam::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff7dfa6, #ffecc63b 25%, #ffecc608 67%, transparent);
  clip-path: polygon(0 50%, 100% 43%, 100% 57%);
}

/* El contrahaz es más tenue que el paso dirigido hacia el visitante. */
.beam-counter {
  background: radial-gradient(ellipse at 0 50%, #ffeac67a, #f2dba522 35%, transparent 88%);
  animation-name: beaconCounterSweep;
}
.beam-counter::after { opacity: .36; }

.lamp {
  width: 20px;
  height: 20px;
  left: -10px;
  top: -10px;
  background: radial-gradient(circle, #fffbed 0 14%, #ffe7b2 22%, #f2be6566 45%, transparent 73%);
  box-shadow: 0 0 18px 5px #f2bd5754, 0 0 35px 11px #e6b16220;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  animation: beaconLamp var(--beacon-cycle) linear infinite;
}

.flare {
  position: absolute;
  width: var(--halo-size);
  height: var(--halo-size);
  left: calc(var(--halo-size) / -2);
  top: calc(var(--halo-size) / -2);
  border-radius: 50%;
  background:
    radial-gradient(circle, #fffbea 0 4%, #fff5dce6 7%, #ffdea98a 17%, #f5c77636 31%, #e8b36c0d 50%, transparent 72%);
  opacity: 0;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: beaconFlare var(--beacon-cycle) linear infinite;
}
.flare::after {
  content: '';
  position: absolute;
  left: 9%;
  top: calc(50% - 1px);
  width: 82%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffe8b826 15%, #fff9dda6 50%, #ffe8b826 85%, transparent);
  border-radius: 50%;
}

.lightpass {
  top: 0;
  height: 720px;
  background:
    radial-gradient(ellipse 220px 160px at var(--lamp-x) var(--lamp-y), #ffefbe19, transparent 74%),
    linear-gradient(109deg, transparent 8%, #d8e7ef03 34%, #ffe8b911 54%, #d8e7ef07 65%, transparent 91%);
  mix-blend-mode: screen;
  will-change: opacity;
  animation: beaconGlass var(--beacon-cycle) linear infinite;
}
.lightpass::before {
  content: '';
  position: absolute;
  top: calc(var(--lamp-y) - 1px);
  left: calc(var(--lamp-x) - 36px);
  width: min(57vw, 620px);
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff1ca5c 12%, #ffe2a72e 32%, #e4dccc05 79%, transparent);
  border-radius: 50%;
}

@keyframes beaconSweep {
  0% { transform: rotate(-7deg) rotateY(0deg); opacity: .74; }
  18% { opacity: 1; }
  25% { transform: rotate(-7deg) rotateY(90deg); opacity: .58; }
  33% { opacity: .38; }
  50% { transform: rotate(-7deg) rotateY(180deg); opacity: .23; }
  70% { opacity: .09; }
  75% { transform: rotate(-7deg) rotateY(270deg); opacity: .08; }
  88% { opacity: .46; }
  100% { transform: rotate(-7deg) rotateY(360deg); opacity: .74; }
}
@keyframes beaconCounterSweep {
  0% { transform: rotate(-7deg) rotateY(180deg); opacity: .17; }
  25% { transform: rotate(-7deg) rotateY(270deg); opacity: .08; }
  50% { transform: rotate(-7deg) rotateY(360deg); opacity: .29; }
  75% { transform: rotate(-7deg) rotateY(450deg); opacity: .11; }
  100% { transform: rotate(-7deg) rotateY(540deg); opacity: .17; }
}
@keyframes beaconLamp {
  0%, 100% { opacity: .8; transform: scale(1); }
  18% { opacity: .87; transform: scale(1.03); }
  22% { opacity: 1; transform: scale(1.23); }
  25% { opacity: 1; transform: scale(1.65); }
  28% { opacity: 1; transform: scale(1.24); }
  33% { opacity: .76; transform: scale(1); }
  50% { opacity: .57; transform: scale(.88); }
  75% { opacity: .47; transform: scale(.82); }
}
@keyframes beaconFlare {
  0%, 15%, 35%, 100% { opacity: 0; transform: scale(.66); }
  19.3%, 25%, 30.7% { opacity: 1; transform: scale(1.18); }
  22.1%, 27.9% { opacity: .46; transform: scale(.96); }
  17%, 33% { opacity: .18; transform: scale(.82); }
}
@keyframes beaconGlass {
  0%, 17%, 36%, 100% { opacity: 0; }
  21% { opacity: .22; }
  25.5% { opacity: 1; }
  29% { opacity: .54; }
  33% { opacity: .07; }
}

@media (min-width: 560px) and (max-width: 959px) {
  .lighthouse { --halo-size: 132px; }
  .lightpass { height: 950px; }
}
@media (min-width: 960px) {
  .lighthouse { --beam-reach: min(1550px, 130vw); --beam-height: 310px; --halo-size: 142px; }
  .lightpass { height: clamp(820px, 60vw, 1000px); }
  .lamp { width: 22px; height: 22px; left: -11px; top: -11px; }
}

.ambient-paused .beam,
.ambient-paused .lamp,
.ambient-paused .flare,
.ambient-paused .lightpass { animation-play-state: paused; }

.reduce .beam,
.reduce .lamp,
.reduce .flare,
.reduce .lightpass { animation: none; will-change: auto; }
.reduce .beam { opacity: .35; transform: rotate(-7deg); }
.reduce .beam-counter { opacity: .08; transform: rotate(-7deg) rotateY(180deg); }
.reduce .lamp { opacity: .85; transform: scale(1); }
.reduce .flare { opacity: .17; transform: scale(.75); }
.reduce .lightpass { display: none; }

@media (prefers-reduced-motion: reduce) {
  .beam, .lamp, .flare, .lightpass { animation: none; will-change: auto; }
  .beam { opacity: .35; transform: rotate(-7deg); }
  .beam-counter { opacity: .08; transform: rotate(-7deg) rotateY(180deg); }
  .lamp { opacity: .85; transform: scale(1); }
  .flare { opacity: .17; transform: scale(.75); }
  .lightpass { display: none; }
}
.prize-mystery { color: #d1bea0; max-width: 49ch; }
.lockline { display: grid; gap: 2px; text-align: center; min-height: 43px; padding: 8px 12px; border-radius: 13px; }
.lockline strong { font: 600 12px/1.3 var(--mono); letter-spacing: .03em; }
.lockline span { font: 400 8px/1.4 var(--mono); letter-spacing: .02em; }
.lockline.access-confirmed { border-color: #5c8065; color: #abd0b6; }
.lockline:not(.access-confirmed) { animation: accessWarning 2.6s ease-in-out infinite; }
.lockline:not(.access-confirmed)::before { animation: accessLamp 2.6s ease-in-out infinite; }
.lockline.access-confirmed::before { background: #91c29e; box-shadow: 0 0 12px #91c29e70; }
@keyframes accessWarning {
  0%, 42%, 100% { border-color: #6d3028; box-shadow: 0 0 0 0 #e2463a00; }
  17%, 27% { border-color: #df685b; box-shadow: 0 0 19px 2px #e2463a35, inset 0 0 12px #e2463a14; }
  22% { border-color: #853d32; box-shadow: 0 0 7px #e2463a18; }
}
@keyframes accessLamp { 0%, 42%, 100% { opacity: .55; } 17%, 27% { opacity: 1; box-shadow: 0 0 15px 3px #f27361b0; } 22% { opacity: .72; } }
.reduce .lockline, .reduce .lockline::before, .ambient-paused .lockline, .ambient-paused .lockline::before { animation-play-state: paused; }
@media(prefers-reduced-motion:reduce) { .lockline, .lockline::before { animation: none !important; } }
.access-gate { margin-top: 27px; padding: 20px; background: linear-gradient(135deg,#111821dc,#070b11eb); border: 1px solid #564632; border-radius: 14px; box-shadow: inset 0 1px #ffe0ae0c; }
.access-gate h3 { margin: 0; font: 800 29px/1.05 var(--display); text-transform: uppercase; color: #e0d7c3; }
.access-gate > p { margin: 10px 0 16px; color: #a5a59e; font-size: 12px; line-height: 1.5; }
.access-fields { display: grid; grid-template-columns: 1fr; gap: 13px; }
.access-fields label { display: grid; gap: 7px; color: #b3b7b8; font: 10px/1.4 var(--mono); }
.access-fields input { box-sizing: border-box; width: 100%; min-height: 45px; padding: 9px 11px; border: 1px solid #38424d; border-radius: 7px; color: #f1d6a4; background: #070c11da; font: 15px/1.4 var(--mono); outline: none; }
.access-fields input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px #f2a54117; }
.access-fields input::placeholder { color: #777e84; font-size: 12px; }
.access-submit { width: 100%; margin-top: 17px; min-height: 45px; }
.access-submit:disabled { opacity: .6; cursor: wait; }
.access-gate .access-status { margin-bottom: 0; color: #cebaa0; font-size: 11px; }
@media(min-width:560px) { .access-fields { grid-template-columns: 1fr 1fr; } .lockline strong { font-size: 15px; } .lockline span { font-size: 10px; } }
@media(min-width:960px) { .lockline { padding: 11px 18px; } .lockline strong { font-size: 18px; } .lockline span { font-size: 11px; } }
@media(max-width:359px) { .lockline { padding: 7px 8px; } .lockline strong { font-size: 10px; } .lockline span { font-size: 7px; } }
