/*
 * registry-utilities.css — committed static stylesheet for PUBLISHED client sites
 * ================================================================================
 * The self-serve registry render fns (`lib/registry/components.tsx`) emit a
 * BOUNDED, KNOWN set of Tailwind v4 utility classes (every class is a literal
 * string — no dynamic class construction), plus inline `style` for user hex
 * colors. A published static site cannot borrow the platform's dashboard CSS, so
 * it must ship its own stylesheet.
 *
 * `lib/services/site-export.ts` first ATTEMPTS a fresh Tailwind v4 compile over
 * the exported HTML (perfect fidelity, `degraded:false`). When the Tailwind CLI
 * is unavailable in the runtime, it falls back to THIS committed file
 * (`degraded:true`) so the export NEVER fails over CSS. This file is a hand-kept
 * safelist covering exactly the utilities the registry can emit — keep it in sync
 * with `components.tsx` (Sprint-D adds a lint/generator to enforce that).
 *
 * Values match Tailwind v4 defaults (0.25rem spacing unit; slate/blue palette).
 */

/* ── minimal reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { min-height: 100vh; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: inherit; }
h1, h2, h3, h4, p { overflow-wrap: break-word; }

/* ── display / layout ── */
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

/* ── grid columns ── */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── gap ── */
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ── max width ── */
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-full { max-width: 100%; }

/* ── padding ── */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* ── margin ── */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* ── height ── */
.h-4 { height: 1rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-20 { height: 5rem; }
.h-32 { height: 8rem; }

/* ── typography size ── */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

/* ── font weight ── */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── text alignment / spacing ── */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }

/* ── border radius ── */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* ── border ── */
.border { border-width: 1px; border-style: solid; border-color: currentColor; }
.border-slate-600 { border-color: #475569; }
.border-slate-700 { border-color: #334155; }

/* ── background color ── */
.bg-white { background-color: #ffffff; }
.bg-blue-600 { background-color: #2563eb; }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-800\/60 { background-color: rgba(30, 41, 59, 0.6); }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }

/* ── text color ── */
.text-white { color: #ffffff; }
.text-blue-100 { color: #dbeafe; }
.text-blue-700 { color: #1d4ed8; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }

/* ── gradients (bg-gradient-to-br + from/via/to stops) ── */
.bg-gradient-to-br {
  background-image: linear-gradient(
    to bottom right,
    var(--sd-gradient-from, transparent),
    var(--sd-gradient-via, var(--sd-gradient-to, transparent)),
    var(--sd-gradient-to, transparent)
  );
}
.from-slate-900 { --sd-gradient-from: #0f172a; }
.via-blue-950 { --sd-gradient-via: #172554; }
.to-slate-900 { --sd-gradient-to: #0f172a; }
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }

/* ── transitions ── */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ── hover states ── */
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-slate-600:hover { background-color: #475569; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:text-white:hover { color: #ffffff; }

/* ── responsive: md ≥ 768px ── */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* ── responsive: lg ≥ 1024px ── */
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
