/* ===== Base: Tokens, Reset, Typography ===== */
:root {
  --background: #fafafa;
  --foreground: #171717;
  --card: #ffffff;
  --card-foreground: #171717;
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #14b8a6;
  --accent-foreground: #171717;
  --border: #e2e8f0;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --ring: #3b82f6;

  --radius: 0.625rem;
  --container-max: 1280px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Space Grotesk", monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark {
  --background: #0a0a0f;
  --foreground: #f5f5f5;
  --card: #18181b;
  --card-foreground: #f5f5f5;
  --primary: #60a5fa;
  --primary-foreground: #0a0a0f;
  --secondary: #27272a;
  --secondary-foreground: #f5f5f5;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #2dd4bf;
  --accent-foreground: #f5f5f5;
  --border: #3f3f46;
  --destructive: #f87171;
  --destructive-foreground: #f5f5f5;
  --ring: #60a5fa;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.6;
  background-color: var(--background);
  color: var(--foreground);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main,
section,
header,
footer,
nav,
article,
aside {
  display: block;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hide-mobile {
  display: none;
}

.show-mobile {
  display: inline;
}

.ring {
  outline: 1px solid var(--ring);
}

@media (min-width: 640px) {
  .hide-mobile {
    display: inline;
  }

  .show-mobile {
    display: none;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.55s ease-out both;
  will-change: transform, opacity;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

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