@import url("https://fonts.googleapis.com/css2?family=Anton&family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --fg: #0a0e1a;
  --muted: #5a6075;
  --border: #c9ccd6;
  --accent: #0033ff;
  --accent-hover: #0029cc;
  --signal: #ffd600;
  --danger: #e53935;
  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font-body: "Poppins", "Avenir Next", system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --motion-fast: 150ms;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--fg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 620px);
  place-items: center;
  padding: clamp(24px, 6vw, 80px);
  background: var(--fg);
}

.shell.app-mode {
  display: block;
  padding: 0;
  background: var(--surface);
}

.auth-panel {
  width: 100%;
  border: 3px solid var(--fg);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--accent);
  padding: clamp(32px, 6vw, 64px);
}

.auth-copy {
  width: 100%;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.subtitle {
  margin: 24px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

.login-card {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--fg);
}

.field {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 2px solid var(--fg);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
}

.input:focus-visible,
.button:focus-visible {
  outline: 4px solid var(--signal);
  outline-offset: 3px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-wrap: pretty;
}

.button-row {
  display: flex;
  align-items: center;
  margin-top: 24px;
}

.button {
  min-height: 48px;
  appearance: none;
  border: 2px solid var(--fg);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform var(--motion-fast) ease-out, box-shadow var(--motion-fast) ease-out;
}

.button:hover {
  transform: translate(-2px, -2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--signal);
}

.button-primary:hover {
  background: var(--accent-hover);
  box-shadow: 7px 7px 0 var(--signal);
}

.button-secondary {
  color: #ffffff;
  background: var(--fg);
}

.status {
  min-height: 24px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  text-wrap: pretty;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--accent);
}

.viewer-shell {
  position: relative;
  min-height: 100dvh;
  width: 100%;
}

.viewer-bar {
  position: absolute;
  inset: 18px 18px auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 2px solid var(--signal);
  border-radius: var(--radius-md);
  background: var(--fg);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--accent);
}

.viewer-copy {
  min-width: 0;
}

.viewer-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.viewer-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  text-wrap: balance;
}

.viewer-meta {
  margin: 2px 0 0;
  color: var(--border);
  font-size: 12px;
  text-wrap: pretty;
}

.viewer-logout {
  min-height: 40px;
  padding: 8px 14px;
}

.viewer {
  width: 100%;
  height: 100dvh;
  border: 0;
  background: var(--surface);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .shell {
    padding: 24px 16px 32px;
  }

  .shell.app-mode {
    padding: 0;
  }

  .auth-panel {
    padding: 32px 24px;
    box-shadow: 6px 6px 0 var(--accent);
  }

  .title {
    font-size: clamp(48px, 18vw, 68px);
  }

  .login-card {
    margin-top: 32px;
    padding-top: 24px;
  }

  .button-primary {
    width: 100%;
  }

  .viewer-bar {
    inset: 12px 12px auto;
  }

  .viewer-meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
