/* ============================================================
   Coming Soon (temporary pre-launch page)
   Deliberately self-contained — does not load site.css — so the whole
   feature stays a handful of files that can be deleted at launch without
   touching the shared stylesheet. Colors below are the same values as the
   --brand-* / --neutral-* tokens in site.css (see the comment on each),
   just inlined so this file has no dependency on it.
   ============================================================ */

:root {
  --cs-bg: #1B1128;          /* --bg-inverse / --neutral-950 */
  --cs-bg-raised: #2A1B3D;   /* --brand-color2 / --neutral-900 */
  --cs-violet: #6B4FB8;      /* --brand-color */
  --cs-violet-soft: #A68BE8; /* --brand-color3 */
  --cs-brass: #B08A38;       /* --brand-highlight */
  --cs-ink: #2A1B3D;         /* --text-primary on the (light) dialog panel */
  --cs-ink-muted: #544C67;   /* --text-secondary */
  --cs-white: #FFFFFF;
  --cs-white-muted: #CFC6DC; /* --text-inverse-secondary */
  --cs-error: #C22F3D;       /* --error-solid */
  --cs-font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cs-font-wordmark: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cs-bg);
  color: var(--cs-white);
  font-family: var(--cs-font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Ambient background: three very slow-moving glows ---- */
.cs-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cs-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}

.cs-glow--a {
  width: 46vmax;
  height: 46vmax;
  left: -14vmax;
  top: -16vmax;
  background: radial-gradient(circle, var(--cs-violet) 0%, transparent 70%);
  animation: cs-drift-a 34s ease-in-out infinite;
}

.cs-glow--b {
  width: 40vmax;
  height: 40vmax;
  right: -12vmax;
  bottom: -14vmax;
  background: radial-gradient(circle, var(--cs-violet-soft) 0%, transparent 70%);
  animation: cs-drift-b 40s ease-in-out infinite;
}

.cs-glow--c {
  width: 26vmax;
  height: 26vmax;
  left: 50%;
  top: 55%;
  background: radial-gradient(circle, var(--cs-brass) 0%, transparent 72%);
  opacity: 0.22;
  animation: cs-drift-c 46s ease-in-out infinite;
}

@keyframes cs-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vmax, 5vmax) scale(1.08); }
}

@keyframes cs-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-5vmax, -6vmax) scale(1.1); }
}

@keyframes cs-drift-c {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-46%, -54%) scale(1.15); }
}

/* ---- Centered identity ---- */
.cs-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.cs-mark {
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  animation: cs-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 150ms forwards;
}

.cs-logo {
  display: block;
  width: 56px;
  height: auto;
  margin: 0 auto;
}

.cs-word {
  margin: 0;
  font-family: var(--cs-font-wordmark);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.025em;
  color: var(--cs-white);
  opacity: 0;
  transform: translateY(10px);
  animation: cs-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 380ms forwards;
}

.cs-soon {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cs-violet-soft);
  opacity: 0;
  transform: translateY(8px);
  animation: cs-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 620ms forwards;
}

@keyframes cs-rise {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Discreet padlock, bottom-right ---- */
.cs-lock {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cs-white);
  opacity: 0.32;
  cursor: pointer;
  transition: opacity 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.cs-lock:hover,
.cs-lock:focus-visible {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.cs-lock:focus-visible {
  outline: 2px solid var(--cs-violet-soft);
  outline-offset: 2px;
}

/* ---- Password dialog ---- */
.cs-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cs-ink);
  max-width: min(360px, calc(100vw - 32px));
  width: 100%;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, overlay 180ms ease allow-discrete, display 180ms ease allow-discrete;
}

.cs-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .cs-dialog[open] {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.cs-dialog::backdrop {
  background: rgba(27, 17, 40, 0.6);
  backdrop-filter: blur(3px);
}

.cs-dialog__panel {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 24px 64px -20px rgba(27, 17, 40, 0.5);
  padding: 28px;
}

.cs-dialog__title {
  margin: 0 0 16px;
  font-family: var(--cs-font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cs-ink);
}

.cs-dialog__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cs-ink);
}

.cs-dialog__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #C9C3D5;
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--cs-font-sans);
  color: var(--cs-ink);
  background: #FFFFFF;
}

.cs-dialog__input:focus {
  outline: 2px solid var(--cs-violet);
  outline-offset: 1px;
  border-color: var(--cs-violet);
}

.cs-dialog__input.is-error {
  border-color: var(--cs-error);
}

.cs-dialog__error {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cs-error);
  min-height: 1em;
}

.cs-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--cs-font-sans);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.cs-btn--primary {
  background: var(--cs-violet);
  color: #fff;
  position: relative;
}

.cs-btn--primary:hover { background: #5A4198; }

.cs-btn--primary[aria-busy="true"] {
  color: transparent;
  pointer-events: none;
}

.cs-btn--primary[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cs-spin 0.7s linear infinite;
}

.cs-btn--ghost {
  background: transparent;
  color: var(--cs-ink-muted);
  border-color: #E2DDEB;
}

.cs-btn--ghost:hover {
  background: #F6F4FA;
  color: var(--cs-ink);
}

.cs-btn:focus-visible {
  outline: 2px solid var(--cs-violet);
  outline-offset: 2px;
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .cs-word { font-size: 2rem; }
  .cs-dialog__panel { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-glow { animation: none; }
  .cs-mark, .cs-word, .cs-soon {
    animation-duration: 0.001ms;
    animation-delay: 0s;
    opacity: 1;
    transform: none;
  }
  .cs-dialog, .cs-btn--primary[aria-busy="true"]::after {
    transition: none;
    animation-duration: 0.001ms;
  }
}
