/* COMS COUPLER host page: the CC blue stage and the pitch's logo animation (as the CC sign-in), all files local. */
@font-face { font-family: 'ANTICLIMAX'; font-display: swap; src: url('../fonts/ANTICLIMAX.woff2') format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-display: swap; src: url('../fonts/press-start-2p-latin-400-normal.woff2') format('woff2'); }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow-x: hidden;
  font-family: Consolas, 'Courier New', Courier, monospace; /* as the live CC app (comscoupler.wollerp.com) */
  background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.16), transparent 26%),
              radial-gradient(circle at 88% 92%, rgba(196,13,255,.18), transparent 38%),
              linear-gradient(135deg, #07527d 0%, #005387 48%, #073f63 100%);
  background-attachment: fixed;
}

.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 12px; text-align: center; }

/* ---- logo animation (copied from the CC sign-in / pitch CC Snapshot slide) ---- */
.cco-logo-frame {
  --logo-ratio: 3347 / 808; --stamp-duration: 520ms; --stamp-delay: 0ms; --spin-delay: 620ms; --slide-duration: 1000ms; --slide-delay: 2240ms;
  --rattle-delay: 3240ms; --rattle-duration: 620ms; --word-hold-offset: 4%; --word-settle-duration: 420ms;
  position: relative; width: min(88vw, 760px); aspect-ratio: var(--logo-ratio); margin: 0 auto; cursor: pointer;
  transition: width 900ms cubic-bezier(.22,.72,.22,1), margin 900ms cubic-bezier(.22,.72,.22,1);
}
.cco-logo-frame.is-rattling { animation: ccx-logo-rattle .1s linear infinite; }
.cco-logo-frame .logo-part { display: block; pointer-events: none; position: absolute; top: 0; user-select: none; }
.cco-logo-frame .logo-c-outer, .cco-logo-frame .logo-c-inner { height: 100%; left: 0; width: calc(808 / 3347 * 100%); }
.cco-logo-frame .logo-wordmark { height: 100%; left: calc(774 / 3347 * 100%); width: calc(2640 / 3347 * 100%); }
.cco-logo-frame .logo-c-outer { opacity: 0; transform: translateX(-2%) rotate(-720deg) scale(.54); transform-origin: 50% 50%; }
.cco-logo-frame .logo-c-inner { opacity: 0; transform: translateY(-12%) scale(1.22); transform-origin: 50% 50%; }
.cco-logo-frame .logo-wordmark { opacity: 0; transform: translateX(18%); }
.cco-logo-frame.is-playing .logo-c-outer { animation: ccx-outer-spin-lock 1500ms cubic-bezier(.18,.9,.28,1) var(--spin-delay) forwards; }
.cco-logo-frame.is-playing .logo-c-inner { animation: ccx-inner-stamp var(--stamp-duration) cubic-bezier(.16,1,.3,1) var(--stamp-delay) forwards; }
.cco-logo-frame.is-playing .logo-wordmark { animation: ccx-word-slide var(--slide-duration) cubic-bezier(.22,.72,.22,1) var(--slide-delay) forwards; }
.cco-logo-frame.is-complete .logo-c-outer, .cco-logo-frame.is-complete .logo-c-inner { opacity: 1; transform: none; }
.cco-logo-frame.is-complete .logo-wordmark { animation: ccx-word-settle var(--word-settle-duration) cubic-bezier(.22,.72,.22,1) forwards; opacity: 1; }
@keyframes ccx-inner-stamp {
  0% { opacity: 0; transform: translateY(-12%) scale(1.22); }
  58% { filter: drop-shadow(0 0 18px rgba(255,255,255,.76)); opacity: 1; transform: translateY(1.8%) scale(.96); }
  76% { transform: translateY(-.6%) scale(1.015); }
  100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); opacity: 1; transform: none; }
}
@keyframes ccx-outer-spin-lock {
  0% { opacity: 0; transform: translateX(-2%) rotate(-720deg) scale(.54); }
  18% { opacity: 1; }
  64% { transform: translateX(.4%) rotate(-78deg) scale(1.07); }
  82% { transform: translateX(-.2%) rotate(12deg) scale(.985); }
  100% { opacity: 1; transform: none; }
}
@keyframes ccx-logo-rattle {
  0% { transform: translate(1px,1px) rotate(0); } 20% { transform: translate(-3px,0) rotate(1deg); } 40% { transform: translate(1px,-1px) rotate(1deg); }
  60% { transform: translate(-3px,1px) rotate(0); } 80% { transform: translate(-1px,-1px) rotate(1deg); } 100% { transform: translate(1px,-2px) rotate(-1deg); }
}
@keyframes ccx-word-slide { 0% { opacity: 0; transform: translateX(20%); } 72% { opacity: 1; transform: translateX(calc(var(--word-hold-offset) - .5%)); } 100% { opacity: 1; transform: translateX(var(--word-hold-offset)); } }
@keyframes ccx-word-settle { 0% { transform: translateX(var(--word-hold-offset)); } 100% { transform: none; } }

/* ---- after the animation: logo shrinks a little, the words, sound and footer fade in ---- */
body.settled .cco-logo-frame { width: min(70vw, 520px); }
.details, .footer { opacity: 0; transform: translateY(14px); transition: opacity .8s ease .2s, transform .8s ease .2s; }
body.settled .details, body.settled .footer { opacity: 1; transform: none; }

.details { max-width: 820px; margin-top: 44px; font-size: 1.2rem; line-height: 1.5; }
.details p { margin: 6px 0 0; }
.wollerp-text { font-family: 'Press Start 2P', Arial, sans-serif; font-size: 1.1rem; text-shadow: 0 0 8px rgba(196,13,255,.55); }
.apos { margin: 0 4px 0 1px; }
.tm { font-size: .4em; vertical-align: super; }
.wollerp-text { display: inline-block; font-size: .95rem; line-height: 1; vertical-align: -0.06em; }
.blurb { display: block; width: 100%; }
.stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* tap-to-play pill (as Rememberr.in), in CC colours; it fades away once the sound is on */
.cc-sound {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); background: rgba(0,40,70,.45); color: #fff; cursor: pointer;
  font: 700 14px/1 Consolas, 'Courier New', Courier, monospace;
  opacity: 0; transition: opacity .6s ease .4s, border-color .2s, box-shadow .2s;
  animation: ccx-glow 1.6s ease-in-out infinite;
}
.cc-sound:hover { border-color: #fff; }
.cc-sound:focus-visible { outline: 3px solid #dfff00; outline-offset: 3px; }
body.settled .cc-sound { opacity: 1; }
body.has-sound .cc-sound { opacity: 0 !important; pointer-events: none; transition: opacity .4s ease; }
@keyframes ccx-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(196,13,255,.30), 0 0 8px rgba(196,13,255,.2); }
  50%      { box-shadow: 0 0 0 4px rgba(196,13,255,.65), 0 0 16px rgba(196,13,255,.4); }
}

.footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 12px 22px; font-family: 'Press Start 2P', Arial, sans-serif; font-size: .6rem; }
.footer .pb, .footer .neon { line-height: 1; display: inline-block; padding-top: 2px; }
.footer img { height: 26px; width: auto; }
.footer .neon { color: #fff; }

@media (max-width: 600px) { .details { font-size: 1rem; margin-top: 30px; } .wollerp-text { font-size: .9rem; } body.settled .cco-logo-frame { width: 84vw; } }
@media (prefers-reduced-motion: reduce) { .details, .footer, .cco-logo-frame, .cc-sound { transition: none; animation: none; } }
