/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-hover), var(--color-accent));
  color: #fff;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover), var(--color-accent-hover));
  box-shadow: var(--shadow-md), 0 0 20px color-mix(in srgb, var(--color-accent) 45%, transparent);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.btn-block {
  width: 100%;
}

/* Cards */
.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.card-hover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--color-accent), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}

.card-hover:hover::before {
  opacity: 1;
}

/* Badges / status pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-dot {
  color: var(--dot-color, var(--color-text-muted));
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  padding: var(--space-3);
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

.field-errors {
  color: var(--color-danger);
  font-size: 0.8rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

/* Page header */
.page-header {
  margin-bottom: var(--space-6);
}

.page-header h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.page-header p {
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

/* Auth card */
.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  font-size: 1.4rem;
  margin-bottom: var(--space-1);
}

.auth-card .subhead {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-5);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-muted);
}

/* Hero (home page) */
.hero {
  position: relative;
  padding-block: var(--space-8) var(--space-7);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80px;
  left: 50%;
  width: 640px;
  height: 640px;
  translate: -50% 0;
  background: conic-gradient(from 0deg, transparent 0deg, color-mix(in srgb, var(--color-accent) 22%, transparent) 40deg, transparent 90deg);
  border-radius: 50%;
  filter: blur(40px);
  animation: hero-sweep 12s linear infinite;
}

@keyframes hero-sweep {
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-inline: auto;
  background: linear-gradient(135deg, var(--color-text), var(--color-text) 60%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 60ch;
  margin: var(--space-4) auto 0;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* Live stat strip under the hero */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: var(--space-7) auto 0;
  max-width: 720px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero-stat {
  flex: 1 1 150px;
  padding: var(--space-4) var(--space-5);
  border-left: 1px solid var(--color-border);
  text-align: center;
}

.hero-stat:first-child {
  border-left: none;
}

.hero-stat .hero-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-stat .hero-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-stat-label .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: hero-live-pulse 2s var(--ease-in-out) infinite;
}

@keyframes hero-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

@media (max-width: 640px) {
  .hero-stat {
    flex: 1 1 50%;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .hero-stat:nth-child(-n+2) {
    border-top: none;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.feature-grid .card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.feature-grid .card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--color-accent) 24%, transparent),
    color-mix(in srgb, var(--color-accent) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* Prose (privacy / terms / about) */
.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: 1.2rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.prose p,
.prose li {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}
