/* The front door (web/gateway/src/door.ts). Mobile first, light and dark. */
:root {
  --accent: #d1fe17;
  --accent-hover: #e5ff5c;
  --on-accent: #0a0a0a;
  --bg: #f6f7f2;
  --card: #ffffff;
  --border: #dfe2d8;
  --text: #15170f;
  --muted: #5d6356;
  --money-bg: #f1fbd0;
  --money-text: #2f3d00;
  --error: #c62828;
  --shadow: 0 12px 40px rgba(20, 24, 10, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11120f;
    --card: #1a1c18;
    --border: #363b33;
    --text: #f4f5ef;
    --muted: #a9afa3;
    --money-bg: rgba(209, 254, 23, 0.1);
    --money-text: #e5ff8a;
    --error: #f87171;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top { display: flex; align-items: center; height: 60px; padding: 0 16px; padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-word { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand-accent { color: var(--text); background: linear-gradient(transparent 60%, var(--accent) 60%); }
@media (prefers-color-scheme: dark) { .brand-accent { color: var(--accent); background: none; } }

.stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  text-align: center;
}
@media (min-width: 560px) {
  .card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; box-shadow: var(--shadow); }
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
.lead { color: var(--muted); margin: 0; font-size: 16px; }
.money {
  margin: 4px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--money-bg);
  color: var(--money-text);
  font-weight: 600;
  font-size: 15px;
}
.fine { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.fine a { color: inherit; }

button { font: inherit; }
.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.primary { background: var(--accent); color: var(--on-accent); border: none; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.secondary:hover { border-color: var(--text); }
.primary:disabled, .secondary:disabled { opacity: 0.6; cursor: default; }
a.primary { text-decoration: none; box-sizing: border-box; }
.link { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 14px; }

form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px: no zoom-in on iPhone */
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.big-icon { align-self: center; color: var(--muted); }
.spinner {
  align-self: center;
  width: 26px;
  height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.spinner.big { width: 44px; height: 44px; border-width: 4px; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }

.error { color: var(--error); max-width: 420px; text-align: center; margin: 16px 0 0; font-size: 14px; }
