@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* Dark / luxury default per Section 14 design law */
    --bg-page: 14 14 18;
    --bg-surface: 22 22 28;
    --bg-elevated: 28 28 36;
    --border-quiet: 60 60 72;
    --text-primary: 244 240 232;
    --text-body: 198 195 188;
    --text-muted: 140 138 134;
    --accent-primary: 230 178 86;
    --accent-on-primary: 18 18 22;
    --status-success: 96 168 122;
    --status-warn: 220 168 78;
    --status-locked: 160 160 168;
    --status-error: 220 100 92;
    --font-sans: "Inter", "Helvetica Neue", system-ui, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  }

  html,
  body {
    background: rgb(var(--bg-page));
    color: rgb(var(--text-body));
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  body {
    min-height: 100vh;
  }

  *:focus-visible {
    outline: 2px solid rgb(var(--accent-primary) / 0.85);
    outline-offset: 2px;
  }

  ::selection {
    background: rgb(var(--accent-primary) / 0.25);
  }
}

@layer components {
  .eyebrow {
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--text-muted));
  }

  .h-display {
    font-size: 36px;
    line-height: 40px;
    font-weight: 600;
    color: rgb(var(--text-primary));
  }

  @media (min-width: 1024px) {
    .h-display {
      font-size: 56px;
      line-height: 60px;
    }
  }

  .h1 {
    font-size: 28px;
    line-height: 32px;
    font-weight: 600;
    color: rgb(var(--text-primary));
  }
  @media (min-width: 1024px) {
    .h1 {
      font-size: 40px;
      line-height: 44px;
    }
  }

  .h2 {
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    color: rgb(var(--text-primary));
  }
  @media (min-width: 1024px) {
    .h2 {
      font-size: 28px;
      line-height: 36px;
    }
  }

  .h3 {
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: rgb(var(--text-primary));
  }
  @media (min-width: 1024px) {
    .h3 {
      font-size: 20px;
      line-height: 28px;
    }
  }

  .body-lg {
    font-size: 17px;
    line-height: 26px;
    color: rgb(var(--text-body));
  }
  @media (min-width: 1024px) {
    .body-lg {
      font-size: 18px;
      line-height: 28px;
    }
  }

  .body {
    font-size: 15px;
    line-height: 24px;
    color: rgb(var(--text-body));
  }
  @media (min-width: 1024px) {
    .body {
      font-size: 16px;
      line-height: 26px;
    }
  }

  .body-sm {
    font-size: 13px;
    line-height: 20px;
    color: rgb(var(--text-muted));
  }

  .caption {
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    color: rgb(var(--text-muted));
    letter-spacing: 0.04em;
  }

  .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    background: rgb(var(--accent-primary));
    color: rgb(var(--accent-on-primary));
    border-radius: 12px;
    font-weight: 600;
    transition: transform 120ms ease-out, box-shadow 120ms ease-out;
  }
  .btn-primary:hover {
    box-shadow: 0 6px 20px rgb(var(--accent-primary) / 0.25);
  }
  .btn-primary:active {
    transform: scale(0.98);
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgb(var(--border-quiet));
    color: rgb(var(--text-primary));
    border-radius: 12px;
    font-weight: 500;
    transition: background 120ms ease-out;
  }
  .btn-secondary:hover {
    background: rgb(var(--bg-surface));
  }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgb(var(--bg-surface));
    color: rgb(var(--text-body));
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgb(var(--border-quiet));
  }
  .pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
  }

  .card {
    background: rgb(var(--bg-surface));
    border-radius: 12px;
    border: 1px solid rgb(var(--border-quiet));
  }

  .card-elevated {
    background: rgb(var(--bg-elevated));
    border-radius: 12px;
    border: 1px solid rgb(var(--border-quiet));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
