@import url('./tokens.css');

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--ff-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.005em;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }

::selection { background: hsl(var(--primary) / 0.4); color: hsl(var(--foreground)); }

/* Typography — sharp business hierarchy */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  color: hsl(var(--foreground));
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.025em; }
h3 { font-size: 1.125rem; font-weight: 500; }
h4 { font-size: 0.875rem; font-weight: 500; }

p { color: hsl(var(--foreground) / 0.82); margin: 0; }

.text-muted { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-mono { font-family: var(--ff-mono); font-feature-settings: "tnum"; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* Eyebrow — small uppercase label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.eyebrow::before {
  content: ""; width: 12px; height: 1px; background: hsl(var(--primary));
}

/* Layout primitives */
.container {
  max-width: var(--container-max);
  padding-inline: var(--container-gutter);
  margin-inline: auto;
}
section { padding-block: clamp(3rem, 6vw, 5rem); }

/* shadcn-style Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding-inline: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  transition: background 160ms, border-color 160ms, color 160ms, opacity 160ms;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { height: 2.75rem; padding-inline: 1.25rem; font-size: 0.875rem; }
.btn-sm { height: 2rem;    padding-inline: 0.75rem; font-size: 0.75rem; }
.btn-icon { width: 2.25rem; padding: 0; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background: hsl(var(--primary) / 0.92); }

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

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-link {
  height: auto; padding: 0;
  color: hsl(var(--primary));
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

/* shadcn Card */
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.card-header  { padding: 1.25rem 1.25rem 0.5rem; }
.card-content { padding: 0 1.25rem 1.25rem; }
.card-footer  { padding: 0.5rem 1.25rem 1.25rem; display: flex; gap: 0.5rem; }
.card-title   { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.card-desc    { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

/* shadcn Badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  height: 1.375rem;
  padding-inline: 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  white-space: nowrap;
}
.badge-primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.3); }
.badge-success { background: hsl(var(--success) / 0.12); color: hsl(var(--success)); border-color: hsl(var(--success) / 0.3); }
.badge-outline { background: transparent; }
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.badge.live .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

/* shadcn Separator */
.separator {
  height: 1px;
  background: hsl(var(--border));
}
.separator-vertical {
  width: 1px;
  background: hsl(var(--border));
}

/* shadcn KBD */
kbd {
  display: inline-flex; align-items: center;
  height: 1.25rem; padding-inline: 0.375rem;
  border-radius: 4px;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
}
