:root {
  color-scheme: dark light;
  --bg: #212121;
  --text: #f5f5f5;
  --muted: #a1a1a1;
  --line: rgba(255, 255, 255, 0.12);
  --hover: rgba(255, 255, 255, 0.06);
  --card: rgba(255, 255, 255, 0.02);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #e8e8e8;
    --text: #111111;
    --muted: #555555;
    --line: rgba(0, 0, 0, 0.14);
    --hover: rgba(0, 0, 0, 0.045);
    --card: rgba(0, 0, 0, 0.02);
  }
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  width: min(720px, 100%);
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  animation: fadePop 520ms ease-out forwards;
}

body.is-leaving .shell {
  animation: fadeOut 180ms ease-in forwards;
}

.panel {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 28px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  width: 58px;
  margin: 0 0 20px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .brand-mark {
    width: 52px;
    margin-bottom: 18px;
  }
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4.2rem);
  line-height: 0.95;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.subtitle {
  margin: 18px 0 0;
  max-width: 32rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.link:hover,
.link:focus-visible {
  background: var(--hover);
  border-color: var(--muted);
  transform: translateY(-1px);
  outline: none;
}

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

.arrow {
  color: var(--muted);
  font-size: 0.95rem;
  transition: transform 140ms ease, color 140ms ease;
}

.link:hover .arrow,
.link:focus-visible .arrow {
  transform: translateX(2px);
  color: var(--text);
}

@keyframes fadePop {
  0%   { opacity: 0; transform: scale(0.96) translateY(8px); }
  70%  { opacity: 1; transform: scale(1.01) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.98) translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  body.is-leaving .shell {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .link,
  .arrow {
    transition: none;
  }

  .link:hover,
  .link:focus-visible {
    transform: none;
  }

  .link:hover .arrow,
  .link:focus-visible .arrow {
    transform: none;
  }
}

@media (max-width: 560px) {
  .panel { padding: 22px; }
}
