/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-h1);
    line-height: var(--leading-h1);
    letter-spacing: -0.5px;
}

h2 {
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
    letter-spacing: -0.3px;
}

h3 {
    font-size: var(--text-h3);
    line-height: var(--leading-h3);
    letter-spacing: -0.2px;
}

p {
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-inverse {
    color: var(--text-inverse);
}

.text-gold {
    color: var(--brand-accent-gold);
}

.text-primary {
    color: var(--brand-primary);
}

.fw-bold {
    font-weight: 700;
}

.text-small {
    font-size: var(--text-small);
    line-height: var(--leading-small);
}

.text-label {
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.bg-alt {
    background-color: var(--bg-section-alt);
}

.bg-primary {
    background-color: var(--brand-primary);
    color: var(--text-inverse);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-sidebar {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-sidebar {
        grid-template-columns: 2fr 1fr;
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: var(--text-body);
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-card);
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--brand-primary);
    border: 1px solid var(--ui-border);
}

.btn-secondary:hover {
    background-color: var(--bg-section-alt);
}

.btn-gold {
    background-color: var(--brand-accent-gold);
    color: var(--text-primary);
}

.btn-gold:hover {
    background-color: #C99B3F;
    transform: translateY(-2px);
}

/* Base Card */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Badge */
.badge {
    display: inline-block;
    background: var(--bg-section-alt);
    color: var(--brand-primary);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-pill);
    padding: 6px 10px;
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

/* Input */
.input-field {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    outline: none;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(213, 165, 0, 0.25);
    border-color: var(--brand-accent-gold);
}

/* Specific Utilities */
.w-full {
    width: 100%;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* Accordion base styles (functionality via JS) */
details.accordion-item {
    border-bottom: 1px solid var(--ui-divider);
    padding: var(--space-md) 0;
}

details.accordion-item summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details.accordion-item summary::-webkit-details-marker {
    display: none;
}

details.accordion-item summary::after {
    content: '+';
    font-weight: 300;
    font-size: 1.5rem;
}

details.accordion-item[open] summary::after {
    content: '-';
}

details.accordion-item p {
    margin-top: var(--space-sm);
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}