/* Main Styles - Age Gate, Modals, and Utilities */

/* =====================
   Age Gate
   ===================== */

.age-gate {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.age-gate__backdrop {
    position: absolute;
    inset: 0;
    background-color: var(--color-primary-dark);
    backdrop-filter: blur(20px);
}

.age-gate__content {
    position: relative;
    background-color: var(--color-white);
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.age-gate__logo {
    max-width: 250px;
    margin: 0 auto var(--space-8);
}

.age-gate__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.age-gate__text {
    font-size: var(--font-size-lg);
    color: var(--color-gray-700);
    margin-bottom: var(--space-2);
}

.age-gate__subtext {
    font-size: var(--font-size-base);
    color: var(--color-gray-600);
    margin-bottom: var(--space-8);
}

.age-gate__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
    .age-gate__buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.age-gate__disclaimer {
    font-size: var(--font-size-xs);
    color: var(--color-gray-500);
    line-height: var(--line-height-relaxed);
}

/* =====================
   Exit Page
   ===================== */

.exit-page {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.exit-page__content {
    text-align: center;
    color: var(--color-white);
    max-width: 600px;
}

.exit-page__logo {
    max-width: 150px;
    margin: 0 auto var(--space-8);
    opacity: 0.8;
}

.exit-page__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-5xl);
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}

.exit-page__text {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-4);
}

.exit-page__subtext {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--space-12);
}

.exit-page .btn--secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.exit-page .btn--secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

/* =====================
   Utility Classes
   ===================== */

/* Display */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.pt-0 { padding-top: 0; }
.pt-4 { padding-top: var(--space-4); }
.pt-8 { padding-top: var(--space-8); }
.pt-12 { padding-top: var(--space-12); }

.pb-0 { padding-bottom: 0; }
.pb-4 { padding-bottom: var(--space-4); }
.pb-8 { padding-bottom: var(--space-8); }
.pb-12 { padding-bottom: var(--space-12); }

/* Width */
.w-full {
    width: 100%;
}

.max-w-sm {
    max-width: 640px;
}

.max-w-md {
    max-width: 768px;
}

.max-w-lg {
    max-width: 1024px;
}

.max-w-xl {
    max-width: 1280px;
}

/* Flex Utilities */
.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: var(--space-4);
}

.gap-8 {
    gap: var(--space-8);
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}

/* Accessibility - 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-width: 0;
}

/* Focus Visible Utility */
.focus-visible:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* =====================
   Loading States
   ===================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--color-gray-300);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* =====================
   Responsive Utilities
   ===================== */

/* Hide on mobile */
@media (max-width: 639px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on tablet and up */
@media (min-width: 640px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Hide on desktop and up */
@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }
}

/* =====================
   Print Styles
   ===================== */

@media print {
    .age-gate,
    .header,
    .footer,
    .hero__cta,
    .hero__form,
    .form-section {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}

/* =====================
   Smooth Reveal Animations
   ===================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for child elements */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-stagger.active > * {
    animation: revealItem 0.6s ease-out forwards;
}

.reveal-stagger.active > *:nth-child(1) { animation-delay: 0.1s; }
.reveal-stagger.active > *:nth-child(2) { animation-delay: 0.2s; }
.reveal-stagger.active > *:nth-child(3) { animation-delay: 0.3s; }
.reveal-stagger.active > *:nth-child(4) { animation-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(5) { animation-delay: 0.5s; }
.reveal-stagger.active > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes revealItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   High Contrast Mode Support
   ===================== */

@media (prefers-contrast: high) {
    .btn {
        border-width: 3px;
    }
    
    input,
    select,
    textarea {
        border-width: 3px;
    }
}
