/* ===================================
   Website Design System Variables
   Dark theme with higher contrast
   =================================== */

:root {
    --radius: 0.625rem;
}

.dark {
    --background: 0 0% 4%;
    --foreground: 0 0% 98%;
    --card: 0 0% 8%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 8%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 15%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 15%;
    --muted-foreground: 0 0% 64%;
    --accent: 0 0% 15%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 15%;
    --input: 0 0% 8%;
    --ring: 0 0% 98%;
}

/* ===================================
   Base Styles
   =================================== */

*, *::before, *::after {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===================================
   Button Styles
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 150ms;
    padding: 0.5rem 1rem;
    height: 2.5rem;
}

.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

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

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

.btn-outline {
    background-color: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

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

.btn-ghost {
    background-color: transparent;
}

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

.btn-sm {
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    height: 3rem;
    padding: 0.5rem 1.5rem;
}

.btn-icon {
    width: 2.5rem;
    padding: 0;
}

/* ===================================
   Input Styles
   =================================== */

.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--input));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 150ms, box-shadow 150ms;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-lg {
    height: 3rem;
    padding: 0.75rem 1rem;
}

/* ===================================
   Focus Styles
   =================================== */

:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* ===================================
   Screen Reader Only
   =================================== */

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

/* ===================================
   Prose (Typography)
   Used for blog posts, legal pages
   =================================== */

.prose {
    line-height: 1.75;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.4;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    opacity: 0.8;
}

.prose blockquote {
    border-left: 3px solid hsl(var(--border));
    padding-left: 1em;
    font-style: italic;
    margin-top: 1.6em;
    margin-bottom: 1.6em;
}

.prose code {
    font-size: 0.875em;
    background-color: hsl(var(--muted));
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.prose pre {
    background-color: hsl(var(--muted));
    padding: 1em;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: var(--radius);
}

.prose hr {
    border-color: hsl(var(--border));
    margin-top: 2em;
    margin-bottom: 2em;
}

.prose-invert {
    color: hsl(var(--foreground));
}

.prose-invert h2, .prose-invert h3 {
    color: hsl(var(--foreground));
}

.prose-invert a {
    color: hsl(var(--primary));
}

.prose-invert blockquote {
    color: hsl(var(--muted-foreground));
}

/* ===================================
   Animations
   =================================== */

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}
