/*
  plot Open Invite — "Night" theme layer.
  Same page, layout, type and copy as the live Open Invite homepage; only colour,
  surfaces and glow follow the plot app (night background, purple accent
  #d65cff / #9273f3, soft accent glows). Loaded by the guest and venue pages.
*/

:root[data-plot-theme="night"] {
  --plot-accent: #d65cff;
  --night-accent: #d65cff;
  --night-accent-rgb: 214 92 255;
  --night-accent-2: #9273f3;
  --night-accent-2-rgb: 146 115 243;
  --night-accent-hi: color-mix(in srgb, #d65cff 60%, white);
  --night-bg: #07060d;
  --night-surface: #110c1d;
  --night-surface-2: #181029;
  --night-border: rgb(var(--night-accent-rgb) / 26%);
  --night-gradient: linear-gradient(135deg, var(--night-accent-hi), rgb(var(--night-accent-rgb)) 50%, rgb(var(--night-accent-2-rgb)));
  --night-glow: 0 0 0 1px rgb(var(--night-accent-rgb) / 24%), 0 0 16px rgb(var(--night-accent-rgb) / 28%), 0 8px 28px rgb(var(--night-accent-2-rgb) / 20%);
  --night-glow-hover: 0 0 0 1px rgb(var(--night-accent-rgb) / 40%), 0 0 24px rgb(var(--night-accent-rgb) / 42%), 0 12px 40px rgb(var(--night-accent-2-rgb) / 30%);
  --night-text-glow: 0 0 24px rgb(var(--night-accent-rgb) / 45%);
  /* Accent sections: deep purple stage lit from above, like the app's aurora. */
  --night-stage:
    radial-gradient(120% 70% at 50% -10%, rgb(var(--night-accent-rgb) / 30%), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgb(var(--night-accent-2-rgb) / 22%), transparent 65%),
    linear-gradient(180deg, #1b1030 0%, #0d0818 100%);
}

/* Base tokens: the shared --ink/--pink/--lilac drive most of the page. */
:root[data-plot-theme="night"] body.open-invite {
  --ink: var(--night-bg);
  --pink: var(--night-accent);
  --lilac: var(--night-accent);
  --accent-ink: var(--night-accent-hi);
  --muted: #b7adc8;
  --line: rgb(255 255 255 / 12%);
  background: var(--night-bg);
}
:root[data-plot-theme="night"] ::selection { background: var(--night-accent); color: #fff; }

/* The style picker swaps the accent; the night page uses the app purple only. */
:root[data-plot-theme="night"] .style-picker { display: none; }

/* ---------- Buttons: app purple gradient + glow ---------- */
:root[data-plot-theme="night"] .open-invite .button,
:root[data-plot-theme="night"] .open-invite .invite-bottom .button,
:root[data-plot-theme="night"] .open-invite .closing > .button,
:root[data-plot-theme="night"] .open-invite .closing-copy > .button {
  background: var(--night-gradient);
  color: #fff;
  box-shadow: var(--night-glow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}
:root[data-plot-theme="night"] .open-invite .button:hover {
  background: var(--night-gradient);
  box-shadow: var(--night-glow-hover);
  filter: brightness(1.06);
}
:root[data-plot-theme="night"] .open-invite .nav-cta {
  border-color: rgb(255 255 255 / 55%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 0 14px rgb(255 255 255 / 14%);
  transition: box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
:root[data-plot-theme="night"] .open-invite .nav-cta:hover {
  background: var(--night-gradient);
  color: #fff;
  box-shadow: var(--night-glow-hover);
}

/* ---------- Header ---------- */
:root[data-plot-theme="night"] .open-invite .nav {
  background: rgb(13 8 24 / 82%);
  color: #f5f2eb;
  border-color: rgb(var(--night-accent-rgb) / 22%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- Accent sections (were coral): night stage ---------- */
:root[data-plot-theme="night"] .open-invite .invite-hero,
:root[data-plot-theme="night"] .open-invite .party-break,
:root[data-plot-theme="night"] .open-invite .sponsoring,
:root[data-plot-theme="night"] .open-invite .closing {
  background: var(--night-stage);
  color: #f5f2eb;
  --muted: #c9bfd9;
  --line: rgb(255 255 255 / 14%);
}
:root[data-plot-theme="night"] .open-invite .invite-bottom h1 > span { color: var(--night-accent-hi); text-shadow: var(--night-text-glow); }
:root[data-plot-theme="night"] .open-invite .hero-footnote { border-top-color: rgb(255 255 255 / 14%); }
:root[data-plot-theme="night"] .open-invite .photo-ribbon { box-shadow: 0 0 40px rgb(var(--night-accent-rgb) / 30%); }
:root[data-plot-theme="night"] .open-invite .photo-ribbon::after { background: linear-gradient(90deg, transparent 70%, rgb(13 8 24 / 75%)); }
:root[data-plot-theme="night"] .open-invite .ticket-edge {
  background: radial-gradient(circle at 12px 12px, var(--night-bg) 11px, transparent 11.5px) repeat-x;
  background-size: 40px 24px;
}
:root[data-plot-theme="night"] .open-invite .sponsoring h2 em,
:root[data-plot-theme="night"] .open-invite .sponsoring .eyebrow,
:root[data-plot-theme="night"] .open-invite .sponsor-steps li > span { color: var(--night-accent-hi); }
:root[data-plot-theme="night"] .open-invite .sponsor-ticket {
  background: var(--night-surface);
  border: 1px solid var(--night-border);
  box-shadow: var(--night-glow);
}
:root[data-plot-theme="night"] .open-invite .qr-link { border-top-color: rgb(255 255 255 / 14%); }

/* ---------- Light sections (were cream paper): app surface ---------- */
:root[data-plot-theme="night"] .open-invite .live-section,
:root[data-plot-theme="night"] .open-invite .founding-section {
  background:
    radial-gradient(70% 50% at 0% 0%, rgb(var(--night-accent-2-rgb) / 14%), transparent 60%),
    var(--night-surface);
  color: #f5f2eb;
  --muted: #b7adc8;
  --line: rgb(255 255 255 / 12%);
}
:root[data-plot-theme="night"] .open-invite .shot-example {
  background: var(--night-surface-2);
  border: 1px solid var(--night-border);
  box-shadow: 0 0 26px rgb(var(--night-accent-rgb) / 18%);
}
:root[data-plot-theme="night"] .open-invite .vibe-scale > .chosen { box-shadow: var(--night-glow); }
:root[data-plot-theme="night"] .open-invite .founding-pass,
:root[data-plot-theme="night"] .open-invite .distribution-source {
  background: var(--night-surface-2);
  color: #f5f2eb;
  border: 1px solid var(--night-border);
  box-shadow: var(--night-glow);
}
:root[data-plot-theme="night"] .open-invite .founding-batch { border-top-color: rgb(255 255 255 / 16%); }
:root[data-plot-theme="night"] .open-invite .founding-end { border-top-color: rgb(255 255 255 / 24%); }
:root[data-plot-theme="night"] .open-invite .founding-details li > svg { color: var(--night-accent-hi); }

/* ---------- Cards and passes ---------- */
:root[data-plot-theme="night"] .open-invite .perk-pass {
  background: var(--night-gradient);
  color: #fff;
  box-shadow: var(--night-glow), 0 24px 70px rgb(0 0 0 / 45%);
}
:root[data-plot-theme="night"] .open-invite .perk-progress > i { background: #fff; }
:root[data-plot-theme="night"] .open-invite .shot-icon { background: var(--night-gradient); color: #fff; box-shadow: 0 0 16px rgb(var(--night-accent-rgb) / 45%); }
:root[data-plot-theme="night"] .open-invite .phone {
  border-color: #2a2338;
  box-shadow: 0 0 0 1px rgb(var(--night-accent-rgb) / 18%), 0 0 60px rgb(var(--night-accent-rgb) / 22%), 0 32px 60px rgb(0 0 0 / 45%);
}
:root[data-plot-theme="night"] .open-invite .product-orbit::after { box-shadow: 0 0 25px var(--night-accent), 0 0 50px rgb(var(--night-accent-rgb) / 50%); }

/* ---------- Accent type: soft glow like app highlights ---------- */
:root[data-plot-theme="night"] .open-invite .step-number,
:root[data-plot-theme="night"] .open-invite .manifesto-open-invite h2 em,
:root[data-plot-theme="night"] .open-invite .section h2 em,
:root[data-plot-theme="night"] .open-invite .heart-symbol,
:root[data-plot-theme="night"] .open-invite .pass-symbol {
  color: var(--night-accent-hi);
  text-shadow: var(--night-text-glow);
}
:root[data-plot-theme="night"] .open-invite .manifesto-open-invite { border-block-color: rgb(var(--night-accent-rgb) / 45%); }
:root[data-plot-theme="night"] .open-invite .story-step.active::before,
:root[data-plot-theme="night"] .open-invite .reading-progress { background: var(--night-gradient); box-shadow: 0 0 12px rgb(var(--night-accent-rgb) / 60%); }

/* Focus rings stay visible on the darker accent sections. */
:root[data-plot-theme="night"] .open-invite a:focus-visible,
:root[data-plot-theme="night"] .open-invite button:focus-visible,
:root[data-plot-theme="night"] .open-invite summary:focus-visible { outline-color: var(--night-accent-hi); }

@media (prefers-reduced-motion: reduce) {
  :root[data-plot-theme="night"] .open-invite .button { transition: none; }
}

/* Hero "plot" watermark: was dark-on-coral; keep it a quiet presence on the night stage. */
:root[data-plot-theme="night"] .open-invite .invite-word > img { opacity: .16; filter: drop-shadow(0 0 30px rgb(var(--night-accent-rgb) / 60%)); }

/* ---------- Fixed colours from the light/coral build ---------- */
:root[data-plot-theme="night"] .open-invite .extras-section,
:root[data-plot-theme="night"] .open-invite .distribution-section {
  background:
    radial-gradient(60% 45% at 100% 0%, rgb(var(--night-accent-rgb) / 12%), transparent 65%),
    var(--night-bg);
}
:root[data-plot-theme="night"] .open-invite .live-grid > article > p,
:root[data-plot-theme="night"] .open-invite .featured-note p,
:root[data-plot-theme="night"] .open-invite .cover-copy > p:not(.eyebrow) { color: #cfc6dd; }
:root[data-plot-theme="night"] .open-invite .live-grid small,
:root[data-plot-theme="night"] .open-invite .demo-label { color: #9d93ad; }
:root[data-plot-theme="night"] .open-invite .perk-progress { background: rgb(255 255 255 / 28%); }

/* ---------- Vibe chips: app outline + glow (filter-visual-system.ts) ----------
   Per Vibe: aurora tint from primary->secondary on a dark base, primary-coloured
   border, white label with coloured text glow, halo growing with Vibe energy 1-4. */
:root[data-plot-theme="night"] .open-invite .vibe-scale > span {
  --vp: #c5d0dc; --vs: #7f97ad; --v-tint: 17%; --v-glow: 21%; --v-radius: 14px;
  background: linear-gradient(112deg, color-mix(in srgb, var(--vp) var(--v-tint), transparent) 0%, color-mix(in srgb, var(--vs) var(--v-tint), transparent) 100%), rgb(10 16 24 / 78%);
  border: 1px solid color-mix(in srgb, var(--vp) 62%, rgb(255 255 255 / 16%));
  color: #fff;
  text-shadow: 0 0 10px color-mix(in srgb, var(--vp) 34%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 0 calc(var(--v-radius) + 4px) color-mix(in srgb, var(--vp) var(--v-glow), transparent);
}
:root[data-plot-theme="night"] .open-invite .vibe-scale .vibe-chill   { --vp: #56a8ff; --vs: #72e0ff; --v-tint: 17%; --v-glow: 21%; --v-radius: 14px; }
:root[data-plot-theme="night"] .open-invite .vibe-scale .vibe-social  { --vp: #45d7df; --vs: #8f9dff; --v-tint: 20%; --v-glow: 26%; --v-radius: 18px; }
:root[data-plot-theme="night"] .open-invite .vibe-scale .vibe-buzzing { --vp: #ffb34c; --vs: #ff6c70; --v-tint: 23%; --v-glow: 31%; --v-radius: 22px; }
:root[data-plot-theme="night"] .open-invite .vibe-scale .vibe-wild    { --vp: #ff496d; --vs: #ff243f; --v-tint: 26%; --v-glow: 36%; --v-radius: 26px; }
/* The highlighted Vibe keeps its size and tilt, with the app's selected (stronger) halo. */
:root[data-plot-theme="night"] .open-invite .vibe-scale > .chosen {
  border-color: color-mix(in srgb, var(--vp) 82%, white 10%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%), 0 0 calc(var(--v-radius) + 8px) color-mix(in srgb, var(--vp) var(--v-glow), transparent);
}
:root[data-plot-theme="night"] .open-invite .vibe-scale > .chosen svg { color: var(--vp); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--vs) 64%, transparent)); }

/* ---------- Every other button: a subtle glow in its own colour ---------- */
:root[data-plot-theme="night"] .open-invite .nav-cta:hover,
:root[data-plot-theme="night"] .open-invite .nav-cta:focus-visible {
  background: rgb(255 255 255 / 8%);
  border-color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 0 22px rgb(255 255 255 / 24%);
}
:root[data-plot-theme="night"] .open-invite .video-toggle {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 0 14px rgb(255 255 255 / 22%);
}
:root[data-plot-theme="night"] .open-invite .store-badges img {
  filter: drop-shadow(0 0 1px rgb(255 255 255 / 30%)) drop-shadow(0 0 12px rgb(255 255 255 / 18%));
}
:root[data-plot-theme="night"] .open-invite .faq summary > span { text-shadow: 0 0 10px rgb(var(--night-accent-rgb) / 55%); }
:root[data-plot-theme="night"] .open-invite .story-step.active .step-arrow,
:root[data-plot-theme="night"] .open-invite .step-arrow { filter: drop-shadow(0 0 6px rgb(255 255 255 / 25%)); }

/* ---------- Rounded buttons, as in the app (pill shape) ---------- */
:root[data-plot-theme="night"] .open-invite .button,
:root[data-plot-theme="night"] .open-invite .invite-bottom .button,
:root[data-plot-theme="night"] .open-invite .closing > .button,
:root[data-plot-theme="night"] .open-invite .closing-copy > .button { border-radius: 999px; }
:root[data-plot-theme="night"] .open-invite .price-options { border-radius: 999px; padding: 4px; }
:root[data-plot-theme="night"] .open-invite .price-options button { border-radius: 999px; }
