/* ============================================================================
   The private-preview door.

   Self-contained on purpose: it reads brand.css tokens and nothing else, so it
   cannot drift when the product's own stylesheet changes underneath it, and it
   follows the light and dark themes for free.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

.gate {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  font-family: var(--font-body);
  color: var(--text);

  /* Two soft lenses of brand colour over the page ground. No photograph and no
     product copy, because either would start telling people what this is. */
  background:
    radial-gradient(60rem 40rem at 12% -10%, color-mix(in srgb, var(--brand-teal) 18%, transparent), transparent 60%),
    radial-gradient(52rem 38rem at 92% 108%, color-mix(in srgb, var(--brand-navy) 20%, transparent), transparent 62%),
    var(--ground);
}

.gate__card {
  width: 100%;
  max-width: 30rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-lg);
  animation: gate-rise 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gate-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.gate__logo { display: flex; margin-bottom: 2rem; }
.gate__logo img { width: 172px; height: auto; }

.gate__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-700);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gate__eyebrow { color: var(--teal-300); }
}
:root[data-theme="dark"] .gate__eyebrow { color: var(--teal-300); }

.gate__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
}

.gate__lede {
  margin: 0 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.gate__label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-strong);
}

.gate__input {
  width: 100%;
  padding: 0.8125rem 0.9375rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.gate__input:hover { border-color: var(--action); }

.gate__input:focus-visible {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 45%, transparent);
}

.gate__input.is-wrong {
  border-color: var(--danger);
  animation: gate-nudge 320ms ease both;
}

@keyframes gate-nudge {
  0%, 100% { transform: none; }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

.gate__hint,
.gate__error {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.gate__hint  { color: var(--text-muted); }
.gate__error { color: var(--danger); font-weight: 600; }

.gate__button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.8125rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--action-text);
  background: var(--action);
  border: 1.5px solid var(--action);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.gate__button:hover  { background: var(--action-hover); border-color: var(--action-hover); }
.gate__button:active { transform: translateY(1px); }

.gate__button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.gate__foot {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.gate__foot a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* A visitor who asked for less motion gets none of it. */
@media (prefers-reduced-motion: reduce) {
  .gate__card,
  .gate__input.is-wrong { animation: none; }
}
