/* ── Entry page ────────────────────────────────────────────────────────────
   The front door to the demo: what this is, and a sign-in.

   It follows DESIGN.md rather than inventing a look. Same tokens, same dark
   ground, same Aptos/Cascadia pairing, colour used sparingly. The one place it
   departs from the operator dashboard is layout: the dashboard is a fixed
   composition read whole at projector distance, whereas this is read once,
   close up, before anyone is presenting. So it scrolls and centres on a
   comfortable measure instead of filling the viewport. DESIGN.md already grants
   that to document pages; this is the same case. */

.welcome-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-primary);
  overflow-y: auto;
}

.welcome-main {
  flex: 1;
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.welcome-eyebrow {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.welcome-headline {
  margin: 0 0 var(--space-md);
  /* Sized against the page, not the fixed dashboard scale: this is the one
     piece of type someone reads before they know what they are looking at. */
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

.welcome-lede {
  margin: 0 0 var(--space-xl);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 58ch;
}

/* ── Sign in ──────────────────────────────────────────────────────────── */

/* The `hidden` attribute sets display:none through the user-agent sheet, which
   any explicit `display` in a class beats. Both sign-in controls set one, so
   without this they render regardless of being marked hidden and the page
   offers a way in that is not configured and cannot work. */
.welcome-form[hidden],
.welcome-signin[hidden] {
  display: none;
}

.welcome-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--surface-border);
}

.welcome-signin {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  /* Microsoft's sign-in button guidance is a neutral ground with the Microsoft
     logo in full colour. A saturated accent button would either fight the mark
     or invite recolouring it, and vendor marks are never altered. */
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--motion-fast, 120ms) ease;
}

.welcome-signin:hover,
.welcome-signin:focus-visible {
  background: var(--surface-border);
  border-color: var(--accent);
  outline: none;
}

.welcome-signin:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.welcome-signin-mark {
  width: 1.05rem;
  height: 1.05rem;
  /* A vendor mark, never recoloured. See CLAUDE.md brand rules. */
  flex-shrink: 0;
}

.welcome-gate-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-subtle);
}

/* Shown only when the gate is not actually enforcing anything. An unprotected
   demo that looks protected is worse than one that says so. */
.welcome-gate-warning {
  color: var(--warning);
}

/* ── What the demo shows ──────────────────────────────────────────────── */

.welcome-section-title {
  margin: var(--space-2xl) 0 var(--space-lg);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.welcome-grid {
  display: grid;
  /* Two columns, not auto-fit. Four cards across this measure wrapped 3 + 1 and
     left an orphan; 2x2 reads as one block. */
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.welcome-card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
}

.welcome-card-step {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.welcome-card-title {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.welcome-card-body {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-muted);
}

/* ── Built on ─────────────────────────────────────────────────────────── */

.welcome-stack-body {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 40rem) {
  .welcome-main {
    padding: var(--space-xl) var(--space-md);
  }

  .welcome-headline {
    max-width: none;
  }
}

/* ── Sign-in form ─────────────────────────────────────────────────────────
   Shown only when a shared demo credential is configured. Both this and the
   Microsoft button start hidden and are revealed by what /api/mode reports, so
   the page never offers a way in that cannot work. */

.welcome-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 20rem;
}

.welcome-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.welcome-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.welcome-input {
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
}

.welcome-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.welcome-submit {
  margin-top: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-fast, 120ms) ease;
}

.welcome-submit:hover:not(:disabled) { background: var(--button-primary-hover); }

.welcome-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.welcome-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Error, not evidence. The message never says which half was wrong. */
.welcome-error {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--error);
}

/* Separates the two ways in when both are offered. */
.welcome-or {
  margin: var(--space-xs) 0;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
