/* --- Wrapper Transform Isolation (required for Phase XXI.b) --- */
#page-wrapper {
  transform-origin: center center;
  will-change: transform, filter, opacity;
  position: relative;
  z-index: 1;
}


/* --- Sigil Bar Layout --- */
#sigil-bar {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0;
  padding: 0.5rem 0;
  opacity: 0.95;
}

/* --- Base Sigil Style --- */
.sigil {
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.55;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    text-shadow 0.4s ease;
  position: relative;
}

/* --- Idle Breathing (very subtle) --- */
.sigil {
  animation: idleBreath 6s ease-in-out infinite;
}
@keyframes idleBreath {
  0%   { opacity: 0.55; }
  50%  { opacity: 0.65; }
  100% { opacity: 0.55; }
}

/* --- Hover Shimmer --- */
.sigil:hover {
  opacity: 1;
  transform: scale(1.1);
  text-shadow: 0 0 4px rgba(255,255,255,0.4);
}

/* --- Active Glow + Pulse --- */
.sigil.active {
  opacity: 1;
  transform: scale(1.2);
  text-shadow: 0 0 12px rgba(255,255,255,0.9);
  animation: sigilPulse 2.8s ease-in-out infinite;
}

@keyframes sigilPulse {
  0%   { transform: scale(1.2); opacity: 1; }
  50%  { transform: scale(1.28); opacity: 0.85; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* --- Glow Decay (when deactivated) --- */
.sigil.deactivating {
  animation: glowFade 0.5s ease-out forwards;
}
@keyframes glowFade {
  0%   { text-shadow: 0 0 12px rgba(255,255,255,0.9); opacity: 1; }
  100% { text-shadow: none; opacity: 0.55; }
}

/* --- Activation Ripple --- */
.sigil::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.sigil.ripple::after {
  animation: ripple 0.4s ease-out;
}

@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* --- Page Ambient Glow (based on heat) --- */
#page-wrapper.heat-1 { box-shadow: inset 0 0 20px rgba(255,255,255,0.05); }
#page-wrapper.heat-2 { box-shadow: inset 0 0 40px rgba(255,255,255,0.08); }
#page-wrapper.heat-3 { box-shadow: inset 0 0 60px rgba(255,255,255,0.12); }
#page-wrapper.heat-4 { box-shadow: inset 0 0 80px rgba(255,255,255,0.16); }
#page-wrapper.heat-5 { box-shadow: inset 0 0 100px rgba(255,255,255,0.2); }

/* --- Page Effects (NOW ON #page-wrapper) --- */
#page-wrapper.effect-invert { filter: invert(1); }

#page-wrapper.effect-drift { animation: drift 6s ease-in-out infinite; }
@keyframes drift { 0%{transform:translateX(0)}50%{transform:translateX(6px)}100%{transform:translateX(0)} }

#page-wrapper.effect-hue { animation: hueShift 8s linear infinite; }
@keyframes hueShift { 0%{filter:hue-rotate(0)}100%{filter:hue-rotate(360deg)} }

#page-wrapper.effect-tilt { transform: rotate(0.5deg); }

#page-wrapper.effect-glitch { animation: glitch 0.35s steps(2,end) infinite; }
@keyframes glitch { 0%{transform:translate(0,0)}50%{transform:translate(-2px,1px)}100%{transform:translate(0,0)} }

#page-wrapper.effect-float { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%{transform:translateY(0)}50%{transform:translateY(-4px)}100%{transform:translateY(0)} }

#page-wrapper.effect-mirror { transform: scaleX(-1); }

#page-wrapper.effect-font { font-family: "Courier New", monospace; }

#page-wrapper.effect-collapse { letter-spacing: -1px; }

#page-wrapper.effect-pulse { animation: pagePulse 3s ease-in-out infinite; }
@keyframes pagePulse { 0%{opacity:1}50%{opacity:0.92}100%{opacity:1} }


/* ───────────────────────────────────────────── */
/* BEACON LED — ARBITRARY CORPORATE BLINK        */
/* ───────────────────────────────────────────── */

.beacon-led {
  fill: #b30000;
  opacity: 0.25;
  animation: beaconBlink 2.8s infinite ease-in-out;
}

@keyframes beaconBlink {
  0%   { opacity: 0.20; }
  7%   { opacity: 0.95; }
  14%  { opacity: 0.30; }
  100% { opacity: 0.20; }
}


/* ───────────────────────────────────────────── */
/* BEACON LOGO — SVG STROKE WITH APERTURE        */
/* ───────────────────────────────────────────── */

.beacon-logo {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto;
}

.beacon-ring {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 6;
  stroke-dasharray: 220 31;
  stroke-dashoffset: -125;
}

.beacon-inner {
  fill: none;
  stroke: rgba(0,0,0,0.35);
  stroke-width: 2;
  opacity: 0.6;
}


/* ───────────────────────────────────────────── */
/* GLOBAL CRT EFFECTS                            */
/* ───────────────────────────────────────────── */

html, body {
  overflow: hidden;
}

body {
  animation: none;
}

body::after {
  animation: crtJitter 4s infinite;
}

@keyframes crtJitter {
  0%   { opacity: 0.98; transform: translateX(0); }
  50%  { opacity: 1;    transform: translateX(0.3px); }
  100% { opacity: 0.99; transform: translateX(0); }
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #d8d8d8;
  font-family: "Verdana", "Geneva", sans-serif;
  color: #1a1a1a;
  text-shadow:
    0.4px 0 0 rgba(255,0,0,0.10),
   -0.4px 0 0 rgba(0,255,255,0.10);
  animation: crtFlicker 4s infinite;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.00) 4px
  );
  filter: blur(0.3px);
  z-index: 9999;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0) 45%,
    rgba(0,0,0,0.22) 100%
  );
  z-index: 9998;
}

@keyframes crtFlicker {
  0%   { opacity: 0.98; transform: translateX(0); }
  50%  { opacity: 1;    transform: translateX(0.3px); }
  100% { opacity: 0.99; transform: translateX(0); }
}


/* ───────────────────────────────────────────── */
/* PAGE STRUCTURE                                */
/* ───────────────────────────────────────────── */

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

.frame {
  width: 50vw;
  max-width: 760px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0,0,0,0.08);
  text-align: center;
  backdrop-filter: blur(0.6px);
}


/* ───────────────────────────────────────────── */
/* HEADER                                         */
/* ───────────────────────────────────────────── */

.header {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(to right, #111, #444);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.4),
    0 0 6px rgba(255, 255, 255, 0.15),
    0.4px 0 0 rgba(255,0,0,0.10),
   -0.4px 0 0 rgba(0,255,255,0.10);
}

.subline {
  font-size: 13px;
  margin-top: 6px;
  color: #555;
  letter-spacing: 0.8px;
}


/* ───────────────────────────────────────────── */
/* CONTENT PANEL                                  */
/* ───────────────────────────────────────────── */

.content {
  background: rgba(255, 255, 255, 0.70);
  padding: 32px 36px;
  border: 1px solid #bfbfbf;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.6) inset,
    0 0 12px rgba(0,0,0,0.08);
  backdrop-filter: blur(0.6px);
  font-size: 14px;
  line-height: 1.7;
}

.content p {
  margin-bottom: 20px;
}

.note {
  font-style: italic;
  color: #555;
}


/* ───────────────────────────────────────────── */
/* FOOTER                                         */
/* ───────────────────────────────────────────── */

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  color: #555;
  opacity: 0.8;
}
