/* PowerMatch shell. The embedded event app keeps its own styling. */
:root {
  color-scheme: light;
  --page-bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #202b3b;
  --muted: #687384;
  --border: #dfe4ec;
  --accent: #293d56;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; }
body { color: var(--text); }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}
img { display: block; max-width: 100%; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Root PowerMatch landing page */
.landing-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--page-bg);
  padding: clamp(24px, 5vw, 56px) 20px;
}
.landing-card {
  width: min(100%, 680px);
  padding: clamp(36px, 7vw, 68px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: 0 20px 70px rgb(27 36 55 / 7%);
}
.landing-brand {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(34px, 6vw, 48px);
}
.powermatch-logo {
  width: min(100%, 370px);
  height: auto;
}
.landing-copy {
  max-width: 555px;
  margin: 0 auto;
  text-align: center;
}
.product-description {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.65;
  color: var(--text);
}
.access-instruction {
  margin: 26px auto 0;
  max-width: 500px;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}
.peg-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(42px, 7vw, 58px);
  padding-top: clamp(28px, 5vw, 38px);
  border-top: 1px solid #edf0f4;
  text-align: center;
  opacity: 0.34;
}
.peg-logo {
  width: min(100%, 190px);
  height: auto;
}

/* Simple 404 */
.error-title {
  margin: 0 0 22px;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}

/* Full-height event embed, with no duplicate event logo, header, or navigation. */
.event-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #ffffff;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
.event-viewport {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
}
.event-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}
.display-help {
  flex: 0 0 auto;
  padding: 0 12px env(safe-area-inset-bottom, 0px);
  text-align: center;
  background: #ffffff;
  opacity: 1;
  transition: opacity 500ms ease;
}
.display-help.is-hiding {
  opacity: 0;
  pointer-events: none;
}
.display-help p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 8px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.help-label { color: var(--muted); }
.display-help a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  font-weight: 600;
}
.skip-link {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

@media (max-width: 520px) {
  .landing-page { padding: 18px 14px; }
  .landing-card {
    padding: 34px 25px 30px;
    border-radius: 20px;
  }
  .landing-brand { margin-bottom: 30px; }
  .powermatch-logo { width: min(100%, 285px); }
  .product-description { line-height: 1.58; }
  .access-instruction { margin-top: 22px; }
  .peg-credit { margin-top: 36px; padding-top: 26px; }
  .peg-logo { width: min(100%, 165px); }
  .help-label { display: none; }
}

/* PowerMatch branded loading intro */
.pm-intro {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 34% 24%, rgb(211 226 246 / 62%) 0, rgb(230 238 248 / 38%) 24%, transparent 52%),
    #f4f6f9;
  opacity: 1;
  visibility: visible;
  transition: opacity 650ms ease, visibility 650ms ease;
}
.pm-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pm-intro-lockup {
  --shield-size: clamp(116px, 14vw, 176px);
  --wordmark-width: clamp(260px, 34vw, 475px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 720px);
  min-height: 220px;
  transform: translateZ(0);
}
.pm-shield-stage {
  position: relative;
  z-index: 2;
  flex: 0 0 var(--shield-size);
  width: var(--shield-size);
  height: var(--shield-size);
  transform: translateX(0);
  animation: pm-shield-position 900ms cubic-bezier(.2,.75,.2,1) 3s forwards;
}
.pm-shield {
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: #bac3ce;
  opacity: 0;
  animation: pm-shield-in 520ms ease-out 80ms forwards;
}
.pm-connections {
  position: absolute;
  inset: 11%;
  width: 78%;
  height: 78%;
  overflow: visible;
  pointer-events: none;
}
.pm-route {
  fill: none;
  stroke: #8e9baa;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: .92;
  animation: pm-draw-route 1050ms cubic-bezier(.32,.01,.15,1) 1.45s forwards;
}
.pm-node {
  fill: #8e9baa;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation:
    pm-node-in 320ms ease-out 540ms forwards,
    pm-node-pulse 620ms ease-in-out 900ms 1;
}
.node-2 { animation-delay: 600ms, 960ms; }
.node-3 { animation-delay: 660ms, 1020ms; }
.node-4 { animation-delay: 720ms, 1080ms; }
.pm-center-node {
  fill: #7e8c9d;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pm-center-lock 650ms cubic-bezier(.2,.8,.2,1) 2.45s forwards;
}
.pm-wordmark-mask {
  position: absolute;
  z-index: 1;
  left: 50%;
  width: var(--wordmark-width);
  overflow: hidden;
  transform: translateX(calc(var(--shield-size) * -0.02));
  opacity: 0;
  animation: pm-wordmask-in 80ms linear 3.02s forwards;
}
.pm-wordmark {
  width: 100%;
  height: auto;
  transform: translateX(calc(var(--wordmark-width) * -0.22));
  opacity: 0;
  animation: pm-wordmark-reveal 900ms cubic-bezier(.2,.72,.2,1) 3.04s forwards;
}
@keyframes pm-shield-in {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: .46; transform: scale(1); }
}
@keyframes pm-node-in {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pm-node-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  48% { transform: scale(1.85); opacity: .42; }
}
@keyframes pm-draw-route {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pm-center-lock {
  0% { opacity: 0; transform: scale(.25); }
  45% { opacity: 1; transform: scale(1.75); }
  72% { opacity: .5; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pm-shield-position {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--wordmark-width) * -0.49)); }
}
@keyframes pm-wordmask-in {
  to { opacity: 1; }
}
@keyframes pm-wordmark-reveal {
  from { opacity: 0; transform: translateX(calc(var(--wordmark-width) * -0.22)); }
  to { opacity: .78; transform: translateX(0); }
}

@media (max-width: 620px) {
  .pm-intro-lockup {
    --shield-size: 100px;
    --wordmark-width: min(68vw, 300px);
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-shield-stage,
  .pm-shield,
  .pm-route,
  .pm-node,
  .pm-center-node,
  .pm-wordmark-mask,
  .pm-wordmark {
    animation-duration: 1ms !important;
    animation-delay: 1ms !important;
  }
  .pm-shield-stage { transform: translateX(calc(var(--wordmark-width) * -0.49)); }
  .pm-shield { opacity: .46; }
  .pm-route { stroke-dashoffset: 0; }
  .pm-node, .pm-center-node { opacity: 1; }
  .pm-wordmark-mask { opacity: 1; }
  .pm-wordmark { opacity: .78; transform: translateX(0); }
}
