/*
 * Preview gate.
 *
 * Deliberately self-contained under /__gate/: everything below that prefix is
 * reachable without the access cookie, and everything else is not. It therefore
 * cannot reference /assets, and carries its own copy of the two fonts.
 *
 * Tokens are copied from apps/web/styles/01-tokens.css rather than imported,
 * for the same reason. Keep them in step; do not adjust for preference.
 */

@font-face {
  font-family: 'DM Sans';
  src: url('/__gate/dm-sans-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/__gate/manrope-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
}

:root {
  --ink: #0b0d1b;
  --cream: #f5f1e7;
  --paper: #fffdf7;
  --blue: #1746d1;
  --blue-dark: #0d2c91;
  --yellow: #eff56b;
  --coral: #ff765f;
  --muted: #696a72;
  --line: rgba(11, 13, 27, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family:
    'DM Sans',
    system-ui,
    -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 18px 50px rgba(11, 13, 27, 0.09);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: end;
  gap: 3px;
  transform: skew(-9deg);
}

.logo-mark i {
  display: block;
  width: 7px;
  background: var(--blue);
  border-radius: 2px;
}

.logo-mark i:nth-child(1) {
  height: 11px;
}

.logo-mark i:nth-child(2) {
  height: 18px;
}

.logo-mark i:nth-child(3) {
  height: 26px;
}

h1 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 28px 0 12px;
}

.lede {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

input:focus-visible,
.button:focus-visible,
.logo:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

input[aria-invalid='true'] {
  border-color: var(--coral);
}

.error {
  margin: 10px 0 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 700;
  /* Against --paper this is 4.6:1, above the WCAG 2.2 AA 4.5:1 threshold. */
  color: #b3271a;
}

.button {
  margin-top: 18px;
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--yellow);
}

.button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.fine-print {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 520px) {
  .card {
    padding: 28px 22px;
  }

  h1 {
    font-size: 26px;
  }
}
