:root {
  --indigo: #2b135e;        /* from the UCU logo */
  --indigo-deep: #1a0a3d;
  --pink: #ee3696;          /* from the UCU logo */
  --pink-hot: #ff60b2;
  --paper: #f7f1fb;
  --muted: #b9a8d6;
  --display: 'Nunito', 'Arial Rounded MT Bold', sans-serif;
  --body: 'Nunito Sans', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html { background: var(--indigo-deep); color-scheme: dark; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  color: var(--paper);
  background:
    radial-gradient(80% 55% at 50% 40%, rgba(238, 54, 150, .20), transparent 70%),
    linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  overflow-x: hidden;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* film grain */
.grain {
  position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: .13; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- wall ---------- */
main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(8px, 3vw, 40px); }

.stage { width: 100%; max-width: 1280px; margin: 0 auto; }
#wall { display: block; width: 100%; height: auto; touch-action: manipulation; }

/* ---------- caption ---------- */
.caption {
  max-width: 640px; margin: clamp(8px, 2vw, 24px) auto clamp(28px, 5vw, 56px);
  padding: 0 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.caption__lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.4; font-weight: 700; }
.caption__lede em { display: block; margin-top: .25em; font-style: normal; font-weight: 400; color: var(--muted); }
.caption__lede strong {
  display: block; font-family: var(--display); font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 3.2rem); letter-spacing: -.01em; line-height: 1.05;
}
.caption__lede[hidden] { display: none; }

.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 900; font-size: 1.15rem;
  color: #fff; text-decoration: none; background: var(--pink);
  padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(238, 54, 150, .6), 0 10px 30px -10px rgba(238, 54, 150, .8);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background .2s, box-shadow .3s;
}
.cta svg { transition: transform .2s; }
.cta:hover, .cta:focus-visible { background: var(--pink-hot); transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(238, 54, 150, .25), 0 14px 34px -10px rgba(238, 54, 150, .9); outline: none; }
.cta:hover svg, .cta:focus-visible svg { transform: translateX(4px); }
.cta:active { transform: translateY(0); }


/* ---------- finale: a glossy swipe over the headline ---------- */
.is-complete .caption__lede strong {
  color: transparent;
  background: linear-gradient(100deg, var(--pink) 0 38%, #fff 50%, var(--pink) 62% 100%) 100% 0 / 280% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: swipe 5s ease-in-out infinite;
}
/* everyone has switched, so there is nothing left to ask */
.is-complete .cta { display: none; }
.is-complete .caption__lede[data-state="done"] { animation: rise .9s .5s both cubic-bezier(.2, .8, .2, 1); }
@keyframes swipe { 0%, 15% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- "why" link + dialog ---------- */
.why-link {
  font: 700 .95rem/1 var(--body); color: var(--muted); background: none; border: 0; padding: 6px 2px; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(238, 54, 150, .7); text-underline-offset: 5px; text-decoration-thickness: 2px;
  transition: color .2s, text-decoration-color .2s;
}
.why-link:hover, .why-link:focus-visible { color: #fff; text-decoration-color: var(--pink-hot); outline: none; }

.why {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto;
  margin: auto; padding: clamp(24px, 5vw, 40px); border: 0; border-top: 6px solid var(--pink); border-radius: 4px;
  color: var(--paper); background: var(--indigo-deep);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.why[open] { animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
.why::backdrop { background: rgba(12, 4, 30, .72); backdrop-filter: blur(6px); }
.why h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 4.5vw, 2.1rem); line-height: 1.1; margin-bottom: 18px; padding-right: 36px; }
.why p { font-size: 1.05rem; line-height: 1.6; color: #e6dcf2; }
.why p + p { margin-top: 1em; }
.why__close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  font: 400 1.6rem/1 var(--body); color: var(--paper); background: rgba(255, 255, 255, .08); cursor: pointer; transition: background .2s;
}
.why__close:hover, .why__close:focus-visible { background: var(--pink); outline: none; }

/* ---------- demo panel ---------- */
.demo {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center;
  width: max-content; max-width: calc(100vw - 24px);
  padding: 8px 10px; background: rgba(10, 2, 16, .88); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
  font: 600 .72rem/1 var(--body); backdrop-filter: blur(8px);
}
.demo[hidden] { display: none; }
.demo b { color: var(--pink); text-transform: uppercase; letter-spacing: .12em; margin-right: 4px; }
.demo button { font: inherit; color: var(--paper); background: rgba(255, 255, 255, .08); border: 0; padding: 7px 9px; cursor: pointer; }
.demo button:hover { background: var(--pink); }

@media (prefers-reduced-motion: reduce) {
  .is-complete .caption__lede strong { animation: none; }
  .cta, .cta svg { transition: none; }
}

/* keep the demo bar from covering the "why" link */
body:has(.demo:not([hidden])) main { padding-bottom: 96px; }
