/**
 * Appily Fifty-One — Canopy Beacon (track & support)
 * Unique layout: radar hero + split console (vault form + vertical ladder)
 * + foil ticket result + ribbon support stack
 */

.page-track-beacon {
  --bc-ink: #0E1F18;
  --bc-canopy: #0B3D2E;
  --bc-deep: #062820;
  --bc-lime: #C8E86C;
  --bc-mint: #F1F6EF;
  --bc-paper: #FAFCF8;
  --bc-muted: #5A6B62;
  --bc-line: rgba(11, 61, 46, 0.12);
  --bc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bc-snap: cubic-bezier(0.34, 1.45, 0.64, 1);
  background:
    radial-gradient(860px 400px at 0% 0%, rgba(200, 232, 108, 0.14), transparent 55%),
    radial-gradient(720px 360px at 100% 40%, rgba(26, 92, 69, 0.08), transparent 50%),
    var(--bc-mint);
}
.page-track-beacon .page-main {
  padding-top: 0;
  overflow-x: clip;
}
.a51-beacon { padding-bottom: 0; }

.a51-beacon-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--bc-ease) var(--bc-delay, 0s), transform .65s var(--bc-ease) var(--bc-delay, 0s);
}
.a51-beacon-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ——— Radar hero ——— */
.a51-beacon-hero {
  position: relative;
  color: #fff;
  padding: clamp(2.6rem, 6vw, 4.2rem) 0 clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, var(--bc-deep) 0%, var(--bc-canopy) 55%, #14523c 100%);
}
.a51-beacon-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.a51-beacon-ring {
  position: absolute;
  left: 72%;
  top: 50%;
  border: 1px dashed rgba(200, 232, 108, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: a51BcSpin 18s linear infinite;
}
.a51-beacon-ring--a { width: 180px; height: 180px; }
.a51-beacon-ring--b { width: 280px; height: 280px; animation-duration: 28s; animation-direction: reverse; opacity: .7; }
.a51-beacon-ring--c { width: 400px; height: 400px; animation-duration: 40s; opacity: .45; }
.a51-beacon-sweep {
  position: absolute;
  left: 72%;
  top: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(200, 232, 108, 0.35) 50deg, transparent 90deg);
  border-radius: 50%;
  animation: a51BcSpin 4.5s linear infinite;
  mix-blend-mode: screen;
}
@keyframes a51BcSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.a51-beacon-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 2rem;
  align-items: center;
}
.a51-beacon-kicker {
  margin: 0 0 .75rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(200, 232, 108, 0.85);
}
.a51-beacon-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}
.a51-beacon-hero h1 span { color: var(--bc-lime); }
.a51-beacon-lede {
  margin: 0;
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.02rem;
}

.a51-beacon-radar {
  width: min(220px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 232, 108, 0.2), transparent 60%),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(200, 232, 108, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: a51BcFloat 5s ease-in-out infinite alternate;
}
@keyframes a51BcFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
.a51-beacon-radar-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  position: relative;
  background: rgba(6, 40, 32, 0.55);
  border: 1px solid rgba(200, 232, 108, 0.25);
}
.a51-beacon-radar-face::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--bc-lime) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
  transition: background 1.2s var(--bc-ease);
}
.a51-beacon-radar-face strong,
.a51-beacon-radar-face span {
  position: relative;
  z-index: 1;
}
.a51-beacon-radar-face strong {
  font-family: var(--a51-font-display);
  font-size: 1.8rem;
  color: var(--bc-lime);
  line-height: 1;
}
.a51-beacon-radar-face span {
  display: block;
  margin-top: .35rem;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ——— Console split ——— */
.a51-beacon-console {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1.35rem;
  margin-top: -2.25rem;
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
}
.a51-beacon-vault {
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--bc-line);
  box-shadow: 0 22px 50px rgba(11, 61, 46, 0.12);
  padding: 1.5rem 1.4rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.a51-beacon-chip {
  display: inline-flex;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: rgba(200, 232, 108, 0.35);
  color: var(--bc-canopy);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.a51-beacon-vault-head h2 {
  margin: .55rem 0 .4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}
.a51-beacon-vault-head p {
  margin: 0;
  color: var(--bc-muted);
  font-size: .92rem;
}
.a51-beacon-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.a51-beacon-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.a51-beacon-field span {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bc-canopy);
}
.a51-beacon-field input {
  border: 1px solid var(--bc-line);
  border-radius: 16px;
  padding: .9rem 1rem;
  font: inherit;
  background: var(--bc-mint);
  color: var(--bc-ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.a51-beacon-field input:focus {
  border-color: var(--bc-canopy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 232, 108, 0.35);
}
.a51-beacon-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: .25rem;
}
.a51-beacon-ghost {
  font-weight: 800;
  color: var(--bc-canopy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.a51-beacon-desk {
  margin-top: auto;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--bc-canopy), var(--bc-deep));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.a51-beacon-desk > span:first-child {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bc-lime);
  font-weight: 800;
}
.a51-beacon-desk a { color: rgba(255, 255, 255, 0.88); font-size: .9rem; }
.a51-beacon-desk a:hover { color: var(--bc-lime); }
.a51-beacon-desk small { color: rgba(255, 255, 255, 0.55); font-size: .75rem; }

/* Vertical ladder */
.a51-beacon-ladder {
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--bc-line);
  box-shadow: 0 22px 50px rgba(11, 61, 46, 0.1);
  padding: 1.35rem 1.25rem 1.4rem;
}
.a51-beacon-ladder-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.15rem;
}
.a51-beacon-ladder-head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.a51-beacon-pill {
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--bc-mint);
  color: var(--bc-canopy);
}
.a51-beacon-pill--is-found { background: var(--bc-lime); color: var(--bc-deep); }
.a51-beacon-pill--is-miss { background: #fde8e8; color: #8a1f1f; }
.a51-beacon-pill--is-idle { background: var(--bc-mint); }

.a51-beacon-steps {
  list-style: none;
  margin: 0;
  padding: 0 0 0 .25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  position: relative;
}
.a51-beacon-stem {
  position: absolute;
  left: 23px;
  top: 18px;
  bottom: 18px;
  width: 3px;
  background: rgba(11, 61, 46, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.a51-beacon-stem-fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--bc-lime), var(--bc-canopy));
  border-radius: 3px;
  transition: height 1.1s var(--bc-ease);
}
.a51-beacon-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-items: start;
  position: relative;
  z-index: 1;
  padding: .55rem .4rem;
  border-radius: 16px;
  transition: background .25s, transform .25s var(--bc-snap);
}
.a51-beacon-step.is-current {
  background: rgba(200, 232, 108, 0.22);
  transform: translateX(4px);
}
.a51-beacon-step-orb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid rgba(11, 61, 46, 0.18);
  color: var(--bc-muted);
  font-family: var(--a51-font-display);
  font-weight: 700;
  font-size: .85rem;
  transition: .25s ease;
}
.a51-beacon-step.is-done .a51-beacon-step-orb {
  background: var(--bc-canopy);
  border-color: var(--bc-canopy);
  color: var(--bc-lime);
}
.a51-beacon-step.is-current .a51-beacon-step-orb {
  background: var(--bc-lime);
  border-color: var(--bc-lime);
  color: var(--bc-deep);
  box-shadow: 0 0 0 6px rgba(200, 232, 108, 0.3);
  animation: a51BcPulse 2.2s ease-in-out infinite;
}
@keyframes a51BcPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(200, 232, 108, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(200, 232, 108, 0.05); }
}
.a51-beacon-step.is-muted .a51-beacon-step-orb { opacity: .55; }
.a51-beacon-step-copy {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-top: .15rem;
}
.a51-beacon-step-copy strong {
  font-size: .98rem;
  color: var(--bc-ink);
}
.a51-beacon-step-copy span {
  font-size: .82rem;
  color: var(--bc-canopy);
  font-weight: 700;
}
.a51-beacon-step-copy small {
  font-size: .78rem;
  color: var(--bc-muted);
}

/* ——— Stage / ticket ——— */
.a51-beacon-stage {
  padding-bottom: 2.5rem;
}
.a51-beacon-ticket {
  display: grid;
  grid-template-columns: 140px 1fr;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--bc-line);
  box-shadow: 0 22px 50px rgba(11, 61, 46, 0.12);
}
.a51-beacon-ticket-stub {
  background: linear-gradient(180deg, var(--bc-canopy), var(--bc-deep));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  text-align: center;
  padding: 1.5rem .75rem;
  position: relative;
}
.a51-beacon-ticket-stub::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 16px;
  background:
    radial-gradient(circle at 0 12px, transparent 7px, #fff 8px) 0 0 / 16px 24px repeat-y;
}
.a51-beacon-ticket-stub span {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bc-lime);
  font-weight: 800;
}
.a51-beacon-ticket-stub strong {
  font-family: var(--a51-font-display);
  font-size: 2rem;
  color: var(--bc-lime);
  line-height: 1;
}
.a51-beacon-ticket-stub small {
  font-size: .72rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.a51-beacon-ticket-body { padding: 1.4rem 1.5rem 1.35rem; }
.a51-beacon-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.a51-beacon-ticket-head h2 {
  margin: .2rem 0 .35rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}
.a51-beacon-ticket-status {
  margin: 0;
  display: inline-flex;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(200, 232, 108, 0.35);
  color: var(--bc-canopy);
  font-size: .78rem;
  font-weight: 800;
}
.a51-beacon-ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1.15rem;
}
.a51-beacon-ticket-grid > div {
  padding: .9rem 1rem;
  border-radius: 16px;
  background: var(--bc-mint);
  border: 1px solid var(--bc-line);
}
.a51-beacon-ticket-grid span {
  display: block;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bc-muted);
  margin-bottom: .3rem;
}
.a51-beacon-ticket-grid strong {
  font-size: 1rem;
  color: var(--bc-ink);
}
.a51-beacon-ticket-wide { grid-column: 1 / -1; }
.a51-beacon-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  align-items: center;
}
.a51-beacon-ticket-actions a:not(.a51-btn) {
  font-weight: 800;
  color: var(--bc-canopy);
  font-size: .9rem;
}
.a51-beacon-ticket-actions a:not(.a51-btn):hover { color: var(--bc-deep); }

.a51-beacon-miss,
.a51-beacon-idle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: center;
  padding: 1.5rem 1.6rem;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--bc-line);
  box-shadow: 0 18px 40px rgba(11, 61, 46, 0.08);
}
.a51-beacon-miss-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fde8e8;
  color: #8a1f1f;
  font-size: 1.6rem;
  font-weight: 800;
}
.a51-beacon-miss h2,
.a51-beacon-idle h2 { margin: 0 0 .45rem; }
.a51-beacon-miss p,
.a51-beacon-idle p {
  margin: 0 0 1rem;
  color: var(--bc-muted);
}
.a51-beacon-idle-pulse {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid var(--bc-lime);
  box-shadow: 0 0 0 0 rgba(200, 232, 108, 0.5);
  animation: a51BcRing 2s ease-out infinite;
}
@keyframes a51BcRing {
  0% { box-shadow: 0 0 0 0 rgba(200, 232, 108, 0.5); }
  100% { box-shadow: 0 0 0 18px rgba(200, 232, 108, 0); }
}
.a51-beacon-tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.a51-beacon-tips li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  background: var(--bc-mint);
  border: 1px solid var(--bc-line);
  font-size: .82rem;
  color: var(--bc-ink);
}
.a51-beacon-tips span {
  font-weight: 800;
  color: var(--bc-canopy);
  font-size: .72rem;
}

/* Ribbons */
.a51-beacon-ribbons {
  padding: 0 0 3.5rem;
}
.a51-beacon-ribbon-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.a51-beacon-ribbon {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .7rem;
  row-gap: .15rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--bc-line);
  transition: transform .25s var(--bc-snap), border-color .2s, box-shadow .25s;
}
.a51-beacon-ribbon:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: var(--bc-lime);
  box-shadow: 0 16px 36px rgba(11, 61, 46, 0.1);
}
.a51-beacon-ribbon em {
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-weight: 800;
  font-size: .75rem;
  color: var(--bc-lime);
  background: var(--bc-canopy);
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.a51-beacon-ribbon strong {
  font-size: .95rem;
  color: var(--bc-ink);
}
.a51-beacon-ribbon span {
  font-size: .78rem;
  color: var(--bc-muted);
}

@media (max-width: 960px) {
  .a51-beacon-hero-inner,
  .a51-beacon-console,
  .a51-beacon-ticket { grid-template-columns: 1fr; }
  .a51-beacon-radar { margin: 0 auto; }
  .a51-beacon-ring,
  .a51-beacon-sweep { left: 50%; top: 70%; opacity: .35; }
  .a51-beacon-ticket-stub::after {
    right: 0; left: 0; top: auto; bottom: -8px;
    width: 100%; height: 16px;
    background: radial-gradient(circle at 12px 0, transparent 7px, #fff 8px) 0 0 / 24px 16px repeat-x;
  }
  .a51-beacon-ticket-grid { grid-template-columns: 1fr 1fr; }
  .a51-beacon-ribbon-stack { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .a51-beacon-ticket-grid,
  .a51-beacon-ribbon-stack,
  .a51-beacon-miss,
  .a51-beacon-idle { grid-template-columns: 1fr; }
  .a51-beacon-console { margin-top: -1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .a51-beacon-ring,
  .a51-beacon-sweep,
  .a51-beacon-radar,
  .a51-beacon-idle-pulse,
  .a51-beacon-step.is-current .a51-beacon-step-orb { animation: none !important; }
  .a51-beacon-reveal { opacity: 1 !important; transform: none !important; }
}
