/* ==========================================================================
   COMPONENTS
   Appearance only. Position and sizing per-section live in layout.css.
   ========================================================================== */

/* Button: deliberately matches the game's own .btn exactly (padding,
   border, radius, letter-spacing, transition) so the CTA doesn't feel like
   a different product's design system. */
   .btn {
    display: inline-block;
    padding: 14px 36px;
    border: 2px solid var(--navy);
    background: var(--navy);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 2px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--duration-quick) ease, transform var(--duration-quick) ease;
  }
  
  .btn:hover { background: var(--navy-2); }
  .btn:active { transform: translateY(1px); }
  
  .btn--primary {
    border-color: var(--orange);
    background: var(--orange);
  }
  .btn--primary:hover { background: #ea6a0e; }
  
  .btn--on-dark {
    border-color: var(--bg);
    background: transparent;
    color: var(--bg);
  }
  .btn--on-dark:hover { background: rgba(255,255,255,0.08); }
  
  /* Shared small label used above section headings: one definition, reused
     everywhere it appears, rather than redefined per section. */
  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--slate-2);
    margin-bottom: var(--space-2);
  }
  
  /* ---------- Gate transition component ----------
     Visual states mirror the game's own gate object exactly:
     closed = solid pink block + white ring icon
     open   = translucent dashed block
     contact = expanding amber ring
     The DOM nodes are positioned/animated by gate-transition.js (built later);
     this file only defines their appearance. */
  
  .gate {
    position: absolute;
    width: 26px;
    height: 46%;
    top: 27%;
    border-radius: 4px;
    background: var(--pink);
    border: 3px solid var(--pink-dark);
    transition: background var(--duration-gate) var(--ease-echo),
                border-color var(--duration-gate) var(--ease-echo),
                opacity var(--duration-gate) var(--ease-echo);
  }
  
  .gate::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 14px; height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  
  .gate.is-open {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.35);
    border-style: dashed;
  }
  .gate.is-open::after { opacity: 0; }
  
  .echo-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--teal);
    border: 3px solid var(--teal-dark);
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    will-change: left, top, opacity;
  }
  
  .player-dot {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--orange);
    border: 3px solid var(--navy);
    transform: translate(-50%, -50%);
  }
  
  /* Anticipation: the same principle as the game's pre-launch indicator:
     quiet at first, then visibly intensifying right before the payoff.
     Duration is tied to --duration-anticipation (900ms) rather than a
     separately-tuned number, so it can't drift out of sync with the
     actual delay it's representing. */
  .player-dot.is-anticipating {
    animation: anticipate var(--duration-anticipation) var(--ease-echo) 1;
  }
  
  @keyframes anticipate {
    0%   { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
    60%  { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.12); }
    80%  { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0.22); }
    100% { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.35); }
  }
  
  @media (prefers-reduced-motion: reduce) {
    .player-dot.is-anticipating { animation: none; }
  }
  
  .contact-ring {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 3px solid var(--amber);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
  }
  
  .contact-ring.is-active {
    animation: ring-expand 480ms var(--ease-echo) forwards;
  }
  
  @keyframes ring-expand {
    0%   { width: 10px;  height: 10px;  opacity: 0.9; }
    100% { width: 90px;  height: 90px;  opacity: 0; }
  }
  
  @media (prefers-reduced-motion: reduce) {
    .contact-ring.is-active { animation: none; opacity: 0; }
  }