/* ============================================================
   Global Styles
   Exact design tokens from the original app (tailwind.config.mjs)
   Fonts loaded from Google Fonts CDN
   ============================================================ */

@import url('https://fonts.bunny.net/css?family=fraunces:100,200,300,400,500,600,700,800,900|open-sans:300,400,500,600,700,800&display=swap');

/* --- Exact Design Tokens from tailwind.config.mjs --- */
:root {
    /* Colors — exact match to original */
    --color-bg: #FFFBF0;
    --color-fg: #4A2F1B;
    --color-primary: #4A2F1B;
    --color-primary-fg: #FFFBF0;
    --color-accent: #8F4A2A;
    --color-secondary: #F0F0D8;
    --color-secondary-fg: #4A2F1B;
    --color-destructive: #DF3131;
    --color-border: rgba(74, 47, 27, 0.1);
    --color-muted: rgba(74, 47, 27, 0.45);

    /* Typography — exact match */
    --font-heading: 'Fraunces', serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing & Shape */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(74, 47, 27, 0.08);
    --shadow-md: 0 4px 16px rgba(74, 47, 27, 0.12);
    --shadow-lg: 0 8px 32px rgba(74, 47, 27, 0.18);

    /* Layout */
    --transition: 0.2s ease;
    --max-w: 100rem;
    --header-h: 80px;
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-fg);
    line-height: 1.5;
    letter-spacing: 0.025em;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

input,
textarea,
select {
    font: inherit;
}

/* --- Progress Bar --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--color-primary);
    z-index: 9999;
    transition: width 0.2s ease;
}

/* --- Main content area --- */
#app {
    min-height: calc(100vh - var(--header-h) - 200px);
}

/* --- Page transition --- */
#app>* {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Utilities --- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-fg);
}

.btn-primary:hover {
    background: #3a2415;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-primary-fg);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--color-primary);
    color: var(--color-primary-fg);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--color-muted);
    font-size: 1rem;
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--color-secondary) 25%, #e4e4c8 50%, var(--color-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}