:root {
  --ground: #0f1310;
  --ground-2: #171d18;
  --ground-3: #232b24;
  --ink: #f2eee6;
  --ink-2: #b9bfb4;
  --accent: #ff7a1a;
  --accent-press: #e5640a;
  --accent-ink: #1b0c00;
  --ok: #c9f24b;
  --ok-ink: #141a05;
  --half: #4d5c2a;
  --bad: #ff6a55;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 2.4vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ok);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), opacity 160ms;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-press);
}

.btn-quiet {
  background: var(--ground-3);
  color: var(--ink);
}

.btn-big {
  min-height: 68px;
  padding: 16px 40px;
  font-size: 24px;
  font-weight: 800;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--ground-3);
  font-size: 18px;
  transition: border-color 160ms;
}

.field input::placeholder {
  color: #7f877c;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.field input:disabled {
  opacity: 0.45;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: min(640px, calc(100vw - 32px));
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  transform: translateX(-50%);
  animation: toast-in 260ms var(--ease-out);
}

.toast[data-kind='error'] {
  background: var(--bad);
  color: #1d0603;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
}

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