/* Marc J Gilbert: version 9, Impact. The page is Classic's (../classic/classic.css); this adds the live
   background and the intro's own layers. The logos stay exactly as flat as Classic's. */

html, body { background: var(--ink); }
html.intro-open { background: var(--night); }

/* The live background sits behind everything; the page's own parts stack above it */
.field {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}
main, .site-footer { position: relative; z-index: 1; }
.site-header { background: rgba(15, 24, 48, 0.72); }

/* While the intro plays the page waits unseen; it fades in as the logo glides onto the hero */
.site-header, main, .site-footer { transition: opacity 0.7s ease; }
html.intro-open .site-header, html.intro-open main, html.intro-open .site-footer { opacity: 0; }

/* The intro has no backdrop of its own: the background canvas behind it is the night */
.intro.impact { background: transparent; transition: opacity 0.7s ease; }
.intro.impact.out.handoff { background: transparent; }
.intro.impact .i-word { opacity: 0; }
.intro.impact .i-block { opacity: 0; will-change: transform; }
.intro.impact .i-stage { will-change: transform; }
.intro.impact .i-sparks { z-index: 2; }
.intro.impact .i-beam, .intro.impact .i-shine { will-change: opacity; }

/* Sound and Skip, together in the top corner */
.i-corner {
  position: absolute; z-index: 3;
  right: clamp(16px, 3vw, 40px); top: clamp(16px, 3vw, 36px);
  display: flex; gap: 10px;
}
.intro.impact .i-skip { position: static; }
.i-sound {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px;
  background: transparent; border: 1px solid rgba(141, 182, 222, 0.45); color: var(--muted);
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.3em; cursor: pointer;
}
.i-sound:hover { color: var(--ivory); border-color: var(--sky); }
.i-sound[aria-pressed="true"] { color: var(--ivory); border-color: var(--sky); }

/* A small speaker, with sound waves when on and a slash when off */
.snd-icon {
  position: relative; flex: none; width: 16px; height: 14px;
  background: currentColor;
  -webkit-mask: var(--snd-off) center / contain no-repeat;
  mask: var(--snd-off) center / contain no-repeat;
  --snd-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 21' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M2 7.5h4l5-4.5v15l-5-4.5H2z'/%3E%3Cpath d='M16 7l6 7M22 7l-6 7'/%3E%3C/svg%3E");
  --snd-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 21' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M2 7.5h4l5-4.5v15l-5-4.5H2z'/%3E%3Cpath d='M15.5 7.2a4.5 4.5 0 0 1 0 6.6M18.5 4.2a8.5 8.5 0 0 1 0 12.6'/%3E%3C/svg%3E");
}
[aria-pressed="true"] > .snd-icon { -webkit-mask-image: var(--snd-on); mask-image: var(--snd-on); }

/* The two named versions, Fire and Ice: word buttons rather than numbered squares */
.versions a { width: auto; padding: 0 14px; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin-top: clamp(20px, 4vh, 36px); }
.hero-actions .link-btn { margin-top: 0; }

@media (max-width: 420px) {
  .i-corner { gap: 8px; }
  .i-sound, .intro.impact .i-skip { padding: 0 12px; letter-spacing: 0.22em; font-size: 12px; }
  .hero-actions { gap: 0 18px; }
  .hero-actions .link-btn { letter-spacing: 0.2em; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, main, .site-footer { transition: none; }
}
