/* opener.css: the vault-door opener on the home page (Lilac & Co., 2026-10-23).
   Markup: templates/partials/opener.html. Behaviour: assets/js/opener.js. Art: art/scenes/opener-door.js.
   The overlay is night in both themes (it is the dark before the vault). Only transform and opacity animate. */

.eaf-op[hidden] { display: none !important; }
html.eaf-op-open, html.eaf-op-open body { overflow: hidden; }
.eaf-op {
  position: fixed; inset: 0; z-index: 2147482000; overflow: hidden; color: #EADFC8;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: contain; will-change: opacity;
}
/* until the art paints (or without it): a dark vault ground with a faint ring, so the page never flashes through */
.eaf-op::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 50% 40%, transparent 0 26vmin, rgb(120 128 138 / 0.22) 26.5vmin 30vmin, transparent 30.5vmin),
    radial-gradient(ellipse 80% 70% at 50% 40%, #16120E 0%, #0A0807 60%, #050405 100%);
}
.eaf-op.is-live::before { display: none; }
.eaf-op__art { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #07060A; transform-origin: 50% 40%; will-change: transform; }
.eaf-op__art > canvas { position: absolute; left: 0; top: 0; display: block; image-rendering: crisp-edges; image-rendering: pixelated; }

/* the cover: one line of copy and Enter, low in the frame, below the door */
.eaf-op__cover {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px max(5vh, 24px); text-align: center; will-change: opacity;
}
.eaf-op__cover::before {   /* a calm dark floor under the words */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(5 4 5 / 0) 0%, rgb(5 4 5 / 0.78) 45%, rgb(5 4 5 / 0.92) 100%);
}
.eaf-op__kicker { margin: 0 0 6px; font: 400 12px/1.4 var(--font-label, "Silkscreen", monospace); letter-spacing: 0.08em; text-transform: uppercase; color: #F4B04A; }
.eaf-op__title { margin: 0; font: 600 clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem)/1.1 var(--font-title, "Pixelify Sans", monospace); color: #FFF4DE; text-shadow: 0 2px 0 #000; }
.eaf-op__line { margin: 8px 0 0; max-width: 46ch; font: 400 16px/1.5 var(--font-body, "IBM Plex Sans", system-ui, sans-serif); color: #CDBFA4; }
.eaf-op__enter {
  margin-top: 20px; min-height: 48px; min-width: 200px; padding: 0 28px; border: 0; border-radius: 0; cursor: pointer;
  background: #F0A62C; color: #1A1208; font: 600 1rem/1 var(--font-title, "Pixelify Sans", monospace); letter-spacing: 0.04em;
  /* a stepped pixel border and a hard drop step */
  box-shadow: 0 -4px 0 0 #1A1208, 0 4px 0 0 #1A1208, -4px 0 0 0 #1A1208, 4px 0 0 0 #1A1208, inset 0 -4px 0 0 #B8741A, 0 8px 0 0 rgb(0 0 0 / 0.5);
  transition: transform 90ms steps(2), background-color 90ms steps(2);
}
@media (hover: hover) { .eaf-op__enter:hover { background: #FFC25A; } }
.eaf-op__enter:active { transform: translateY(2px); }
.eaf-op__enter:focus-visible { outline: 3px solid #FFF4DE; outline-offset: 6px; }
.eaf-op__skip {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 3; min-width: 44px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 0; cursor: pointer; background: rgb(10 8 7 / 0.7); color: #CDBFA4;
  font: 400 12px/1 var(--font-label, "Silkscreen", monospace); letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: inset 0 0 0 2px #3A3026;
}
@media (hover: hover) { .eaf-op__skip:hover { color: #FFF4DE; box-shadow: inset 0 0 0 2px #7A6448; } }
.eaf-op__skip:focus-visible { outline: 3px solid #F0A62C; outline-offset: 2px; }

/* the cover rises in (not under reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .eaf-op[data-state="cover"] .eaf-op__cover > * { animation: eaf-op-in 600ms steps(6) both; }
  .eaf-op[data-state="cover"] .eaf-op__cover > :nth-child(2) { animation-delay: 120ms; }
  .eaf-op[data-state="cover"] .eaf-op__cover > :nth-child(3) { animation-delay: 220ms; }
  .eaf-op[data-state="cover"] .eaf-op__cover > :nth-child(4) { animation-delay: 360ms; }
}
@keyframes eaf-op-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html[data-motion="reduce"] .eaf-op .eaf-op__cover > *, .eaf-op.is-frozen .eaf-op__cover > * { animation: none !important; }
/* once Enter is pressed the words step aside (opener.js fades them) */
.eaf-op[data-state="open"] .eaf-op__cover { pointer-events: none; }
@media (max-width: 479px) { .eaf-op__enter { width: 100%; max-width: 320px; } }
