:root {
  --background: #f8f8fb;
  --foreground: #111116;
  --card: #ffffff;
  --muted: #f1f1f5;
  --muted-foreground: #6b7280;
  --primary: #6366f1;
  --primary-foreground: #ffffff;
  --secondary: #f1f1f5;
  --secondary-foreground: #111116;
  --border: #e4e4ea;
  --ring: #6366f1;
  --radius: 0.625rem;
  --hero-glow: rgba(99, 102, 241, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0d;
    --foreground: #e6e6ea;
    --card: #131318;
    --muted: #1b1b22;
    --muted-foreground: #9a9aa5;
    --secondary: #1b1b22;
    --secondary-foreground: #e6e6ea;
    --border: #23232b;
    --hero-glow: rgba(99, 102, 241, 0.18);
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.border-t {
  border-top: 1px solid var(--border);
}

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
}

header .bar {
  display: flex;
  height: 3.5rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: 28px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 1.35rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover,
.btn-outline:hover,
.btn-secondary:hover {
  background: var(--muted);
}

main {
  flex: 1;
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: -20% 20% auto;
  height: 55%;
  background: radial-gradient(ellipse at center, var(--hero-glow), transparent 70%);
  pointer-events: none;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 3.5rem);
  justify-content: center;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .hero {
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  animation: rise 0.55s ease both;
}

.hero-brand img {
  width: 56px;
  height: 56px;
}

.hero-brand h1 {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

@media (min-width: 640px) {
  .hero-brand h1 {
    font-size: 4rem;
  }
}

.hero-headline {
  margin: 0;
  max-width: 36rem;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  animation: rise 0.55s ease 0.08s both;
}

@media (min-width: 640px) {
  .hero-headline {
    font-size: 1.5rem;
  }
}

.hero-subtitle {
  margin: 0;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--muted-foreground);
  animation: rise 0.55s ease 0.16s both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.55s ease 0.24s both;
}

.stats {
  display: grid;
  gap: 1rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  transform: translateY(-2px);
}

.card-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.card-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.features {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.features > .intro h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.features > .intro p {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  color: var(--muted-foreground);
}

.group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.group h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.module-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.module-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.module-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.55;
}

footer .bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  footer .bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

footer nav {
  gap: 1rem;
}

footer a:hover {
  color: var(--foreground);
}

.legal-layout {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 220px 1fr;
  }
}

.legal-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.legal-nav-title {
  margin: 0 0 0.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.legal-nav a {
  border-radius: calc(var(--radius) - 2px);
  padding: 0.375rem 0.5rem;
}

.legal-nav a:hover,
.legal-nav a.active {
  background: var(--muted);
}

.legal-article h1 {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  font-weight: 600;
}

.legal-updated {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.legal-section {
  margin-bottom: 1.75rem;
}

.legal-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.legal-section p,
.legal-section li {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.legal-section ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.legal-lines {
  margin-bottom: 0.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand,
  .hero-headline,
  .hero-subtitle,
  .actions,
  .stat-card,
  .module-card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}
