/**
 * AmericanInklings - Main Stylesheet
 * A modern, elegant design inspired by literary tradition
 */

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
    /* Colors */
    --color-primary: #722F37;        /* Deep burgundy/maroon */
    --color-primary-dark: #5a252c;
    --color-primary-light: #8b3d47;
    --color-secondary: #2c3e50;      /* Dark slate */
    --color-accent: #c9a227;         /* Gold */
    --color-accent-light: #d4b440;

    /* Neutrals */
    --color-white: #ffffff;
    --color-cream: #faf8f5;
    --color-ivory: #f5f2ed;
    --color-light: #e8e4de;
    --color-gray: #6b7280;
    --color-gray-dark: #374151;
    --color-charcoal: #1f2937;
    --color-black: #111827;

    /* Semantic */
    --color-success: #059669;
    --color-error: #dc2626;
    --color-warning: #d97706;
    --color-info: #2563eb;

    /* Typography */
    --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1280px;
    --container-narrow: 800px;
    --header-height: 80px;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-black);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.25rem;
    font-family: var(--font-serif);
    color: var(--color-gray-dark);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-4xl) 0;
    overflow-x: hidden;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-light);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-primary);
}

.logo:hover {
    color: var(--color-primary-dark);
}

.logo-icon svg {
    width: 40px;
    height: 40px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-gray);
    letter-spacing: 0.02em;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--space-xs);
}

.nav-list > li > a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
    color: var(--color-charcoal);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: var(--color-primary);
    background: var(--color-ivory);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: none;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    list-style: none;
    padding: var(--space-sm) 0;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: var(--color-charcoal);
}

.dropdown li a:hover {
    background: var(--color-ivory);
    color: var(--color-primary);
}

.dropdown .divider {
    height: 1px;
    background: var(--color-light);
    margin: var(--space-sm) 0;
}

/* User menu */
.user-menu > a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: var(--space-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--space-sm);
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-charcoal);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-charcoal);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        padding: var(--space-md) var(--space-xl);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        height: auto;
    }

    .nav-list > li {
        border-bottom: 1px solid var(--color-light);
    }

    .nav-list > li:last-child {
        border-bottom: none;
    }

    .nav-list > li > a {
        padding: var(--space-sm) var(--space-md);
    }

    .has-dropdown {
        display: flex;
        flex-wrap: wrap;
    }

    .has-dropdown > a {
        flex: 1;
        min-width: 0;
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-gray);
    }

    .dropdown-toggle:active {
        background: var(--color-ivory);
    }

    .dropdown-toggle::after {
        content: '';
        display: block;
        width: 7px;
        height: 7px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .has-dropdown.is-open > .dropdown-toggle::after {
        transform: rotate(-135deg);
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--space-lg);
        display: none;
        width: 100%;
    }

    .has-dropdown.is-open > .dropdown {
        display: block;
    }

    .dropdown li a {
        padding: var(--space-sm) var(--space-lg);
    }

    .main-nav {
        overscroll-behavior: contain;
    }

    .user-menu > a {
        flex-direction: row !important;
    }

    .logo-tagline {
        display: none;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

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

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-gold {
    background: var(--color-accent);
    color: var(--color-black);
    border-color: var(--color-accent);
}

.btn-gold:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent-light);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: var(--space-md) 0;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-quote {
    margin-top: var(--space-3xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 500px;
    text-align: left;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
}

.hero-quote cite {
    display: block;
    font-style: normal;
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    color: var(--color-accent);
}

/* Hero Logo Watermark */
.hero-logo-watermark {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 340px;
    height: 340px;
    opacity: 0;
    animation: hero-logo-fade-in 1.5s ease-out 0.6s forwards;
    pointer-events: none;
    z-index: 1;
}

.hero-logo-watermark svg {
    width: 100%;
    height: 100%;
    fill: var(--color-accent);
    opacity: 0.25;
    filter: drop-shadow(0 0 40px rgba(201, 162, 39, 0.4));
}

@keyframes hero-logo-fade-in {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@media (max-width: 1200px) {
    .hero-logo-watermark {
        width: 280px;
        height: 280px;
        right: 2%;
    }
}

@media (max-width: 992px) {
    .hero-logo-watermark {
        width: 200px;
        height: 200px;
        right: 2%;
        top: 45%;
        opacity: 0;
        animation: hero-logo-fade-in 1.5s ease-out 0.6s forwards;
    }

    .hero-logo-watermark svg {
        opacity: 0.18;
    }

    .hero-quote {
        margin-top: var(--space-2xl);
        font-size: 0.9375rem;
    }

    .hero-content {
        position: relative;
        z-index: 2;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: var(--space-3xl) 0;
    }

    .hero-quote {
        display: none;
    }

    .hero-logo-watermark {
        display: none;
    }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--color-gray-dark);
    font-size: 1.125rem;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-divider::before,
.section-divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: var(--color-accent);
}

.section-divider span {
    color: var(--color-accent);
    font-size: 1.5rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.card-title a {
    color: var(--color-black);
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-excerpt {
    color: var(--color-gray-dark);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--color-gray);
}

.card-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-author img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
}

/* ============================================
   Work Gallery Grid
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: var(--space-xl);
    justify-content: center;
}

.work-card {
    position: relative;
    cursor: pointer;
}

/* Stretched link - makes entire card clickable */
.work-card .card-title a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Ensure category badge stays above the stretched link */
.work-card .card-category {
    z-index: 2;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================
   About Section
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image::after {
        display: none;
    }
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.about-image::after {
    content: '';
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    right: calc(var(--space-lg) * -1);
    bottom: calc(var(--space-lg) * -1);
    border: 3px solid var(--color-accent);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.about-content h2 {
    margin-bottom: var(--space-lg);
}

.about-content p {
    color: var(--color-gray-dark);
    margin-bottom: var(--space-lg);
}

/* ============================================
   Features/Pillars
   ============================================ */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xl);
}

.feature-card {
    flex: 0 1 280px;
    max-width: 300px;
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

@media (max-width: 640px) {
    .features-grid {
        flex-direction: column;
        align-items: center;
    }

    .feature-card {
        flex: 0 1 auto;
        width: 100%;
        max-width: 350px;
    }
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-ivory);
    border-radius: var(--radius-full);
    color: var(--color-primary);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--color-gray-dark);
    font-size: 0.9375rem;
    margin: 0;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-4xl) 0;
}

.cta-section h2 {
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    font-size: 1.125rem;
}

/* ============================================
   Events Section
   ============================================ */
.event-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.event-item {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.event-item:hover {
    box-shadow: var(--shadow-md);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: var(--space-md);
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    text-align: center;
}

.event-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.event-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-details h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.event-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-bottom: var(--space-sm);
}

.event-description {
    color: var(--color-gray-dark);
    font-size: 0.9375rem;
}

@media (max-width: 640px) {
    .event-item {
        flex-direction: column;
        gap: var(--space-md);
    }

    .event-date {
        flex-direction: row;
        gap: var(--space-sm);
        justify-content: flex-start;
        min-width: auto;
    }
}

/* ============================================
   Members Grid
   ============================================ */
.members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xl);
}

.member-card {
    flex: 0 1 280px;
    max-width: 320px;
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.member-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.member-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 4px solid var(--color-ivory);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
}

.member-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.member-role {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.member-focus {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.focus-tag {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-ivory);
    color: var(--color-gray-dark);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-charcoal);
}

.form-label .required {
    color: var(--color-error);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-charcoal);
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.875rem;
    color: var(--color-error);
    margin-top: var(--space-xs);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox input {
    margin-top: 4px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2xl);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-col h3,
.footer-col h4 {
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.footer-col h3 {
    font-size: 1.5rem;
}

.footer-col h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-col ul a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--color-accent);
    color: var(--color-black);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.footer-quote {
    font-family: var(--font-serif);
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xl);
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-md);
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-md);
    color: var(--color-charcoal);
    transition: all var(--transition-fast);
}

.pagination li a:hover,
.pagination li.active a {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================
   Page Headers
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.page-header .lead {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
    color: var(--color-white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Modals
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active,
.modal-overlay.is-visible {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}

.modal-dialog {
    background: var(--color-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
}

.modal-dialog h2 {
    margin: 0 0 var(--space-md);
    font-size: 1.25rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray);
    padding: var(--space-xs);
}

.modal-close-btn:hover {
    color: var(--color-text);
}

.modal-errors {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: #fee2e2;
    color: #991b1b;
    display: none;
}

.modal-errors p {
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-lg);
}

.modal-success-icon {
    width: 80px;
    height: 80px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: #065f46;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================
   Utilities
   ============================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.py-1 { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-2 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-3 { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-4 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.bg-cream { background-color: var(--color-cream); }
.bg-ivory { background-color: var(--color-ivory); }
.bg-white { background-color: var(--color-white); }

.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-gray); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   Contact Page Grid
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* ============================================
   Apply Page Form Grid
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 640px) {
    .interests-grid {
        grid-template-columns: 1fr;
    }
}

.interest-option {
    padding: var(--space-md);
    background: var(--color-ivory);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.interest-option:hover {
    background: var(--color-light);
}

/* ============================================
   Enhanced Mobile Responsive Styles
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .container {
        padding: 0 var(--space-md);
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    /* Hero adjustments */
    .hero {
        min-height: auto;
        padding: var(--space-2xl) 0;
    }

    .hero-content {
        text-align: center;
    }

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

    /* Button adjustments */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Section header adjustments */
    .section-header {
        margin-bottom: var(--space-2xl);
    }

    /* Gallery grid mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Card adjustments */
    .card-body {
        padding: var(--space-md);
    }

    /* Contact page two-column fix */
    .contact-grid,
    [style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }

    [style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: var(--space-xl);
    }

    /* Form grid fixes */
    [style*="grid-template-columns: 1fr 1fr"][style*="gap"] {
        display: block !important;
    }

    [style*="grid-template-columns: 1fr 1fr"] .form-group {
        margin-bottom: var(--space-lg);
    }

    /* Apply page interest checkboxes */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        display: block !important;
    }

    [style*="grid-template-columns: repeat(2, 1fr)"] > label {
        display: block;
        margin-bottom: var(--space-sm);
    }

    /* Page header mobile */
    .page-header {
        padding: var(--space-2xl) 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    /* CTA section mobile */
    .cta-section {
        padding: var(--space-2xl) 0;
    }

    /* Footer improvements */
    .footer-grid {
        gap: var(--space-xl);
    }

    .footer-col {
        text-align: center;
    }

    .footer-col h3,
    .footer-col h4 {
        margin-bottom: var(--space-md);
    }

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

    .footer-col nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }

    .footer-col nav ul li {
        margin-bottom: 0;
    }

    /* Member grid mobile */
    .members-grid {
        flex-direction: column;
        align-items: center;
    }

    .member-card {
        flex: 0 1 auto;
        width: 100%;
        max-width: 350px;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    /* Logo mobile */
    .logo-name {
        font-size: 1.25rem;
    }

    .logo-icon svg {
        width: 32px;
        height: 32px;
    }

    /* Card mobile */
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    /* Event item mobile */
    .event-meta {
        flex-direction: column;
        gap: var(--space-xs);
    }

    /* Forms mobile */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Buttons full width on tiny screens */
    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Filter buttons wrap */
    .category-filters {
        gap: var(--space-xs);
    }

    .filter-btn {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.875rem;
    }

    /* Feature cards mobile */
    .feature-card {
        padding: var(--space-lg);
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Footer bottom */
    .footer-bottom {
        margin-top: var(--space-2xl);
        padding-top: var(--space-lg);
    }

    .footer-quote {
        font-size: 0.8125rem;
    }

    .footer-credit {
        font-size: 0.75rem;
    }
}

/* Ensure inline grid styles are overridden on mobile */
@media (max-width: 768px) {
    div[style*="display: grid"][style*="grid-template-columns"] {
        display: block !important;
    }

    div[style*="display: grid"] > div[style*="margin-bottom"],
    div[style*="display: grid"] > div {
        margin-bottom: var(--space-lg) !important;
    }

    /* Two column layout fix for contact and similar pages */
    div[style*="max-width: 800px"] > div[style*="display: grid"] {
        display: block !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    .feature-card:hover,
    .member-card:hover {
        transform: none;
    }

    /* Larger touch targets */
    .nav-list > li > a {
        padding: var(--space-md);
    }

    .dropdown li a {
        padding: var(--space-md) var(--space-lg);
    }

    .social-links a {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   Image Stack Layout (About Page)
   ============================================ */
.about-image-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.about-image-stack .about-image {
    width: 100%;
    max-width: 500px;
}

.about-image-stack .about-image::after {
    display: none;
}

.about-image-stack .about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-image-secondary {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image-secondary img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-slow);
}

.about-image-secondary:hover img {
    transform: scale(1.03);
}

.image-credit {
    width: 100%;
    font-size: 0.75rem;
    color: var(--color-gray);
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
}

.image-credit a {
    color: var(--color-gray);
    text-decoration: underline;
}

.image-credit a:hover {
    color: var(--color-primary);
}

/* ============================================
   Scroll Reveal Animations
   Uses CSS animations as fallback - content will always appear
   JS adds 'revealed' class for scroll-triggered behavior
   ============================================ */
.reveal {
    animation: reveal-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.reveal.revealed {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Staggered reveal for grid items */
.reveal-stagger > * {
    animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.reveal-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.reveal-stagger > *:nth-child(3) { animation-delay: 0.19s; }
.reveal-stagger > *:nth-child(4) { animation-delay: 0.26s; }
.reveal-stagger > *:nth-child(5) { animation-delay: 0.33s; }
.reveal-stagger > *:nth-child(6) { animation-delay: 0.40s; }
.reveal-stagger > *:nth-child(7) { animation-delay: 0.47s; }
.reveal-stagger > *:nth-child(8) { animation-delay: 0.54s; }
.reveal-stagger > *:nth-child(9) { animation-delay: 0.61s; }
.reveal-stagger > *:nth-child(10) { animation-delay: 0.68s; }
.reveal-stagger > *:nth-child(11) { animation-delay: 0.75s; }
.reveal-stagger > *:nth-child(12) { animation-delay: 0.82s; }

.reveal-stagger.revealed > * {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Fade in from left */
.reveal-left {
    animation: reveal-left 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.reveal-left.revealed {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Fade in from right */
.reveal-right {
    animation: reveal-right 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    opacity: 0;
}

.reveal-right.revealed {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Scale in */
.reveal-scale {
    animation: reveal-scale 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.reveal-scale.revealed {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Reveal animation keyframes - Enhanced for more engagement */
@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(50px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes reveal-left {
    from {
        opacity: 0;
        transform: translateX(-60px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes reveal-right {
    from {
        opacity: 0;
        transform: translateX(60px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes reveal-scale {
    from {
        opacity: 0;
        transform: scale(0.85);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* New: Reveal with rotation */
@keyframes reveal-rotate {
    from {
        opacity: 0;
        transform: translateY(40px) rotate(-3deg);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
        filter: blur(0);
    }
}

.reveal-rotate {
    animation: reveal-rotate 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.reveal-rotate.revealed {
    animation: none;
    opacity: 1;
    transform: none;
}

/* ============================================
   Enhanced Hover Effects
   ============================================ */
.about-image img {
    transition: transform var(--transition-slow), box-shadow var(--transition-normal);
}

.about-image:hover img {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Button hover enhancements */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Link hover underline animation */
.about-content a:not(.btn),
.footer-col a {
    position: relative;
}

.about-content a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-normal);
}

.about-content a:not(.btn):hover::after {
    width: 100%;
}

/* Section divider animation */
.section-divider span {
    display: inline-block;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Hero text animation */
.hero h1 {
    animation: fade-in-up 1s ease-out;
}

.hero .lead {
    animation: fade-in-up 1s ease-out 0.2s both;
}

.hero-cta {
    animation: fade-in-up 1s ease-out 0.4s both;
}

.hero-quote {
    animation: fade-in 1.5s ease-out 0.8s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Card hover lift enhancement */
.card,
.feature-card,
.member-card {
    will-change: transform, box-shadow;
}

/* Smooth page transitions */
main {
    animation: page-fade-in 0.5s ease-out;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   Parallax & Floating Elements (Desktop/Tablet)
   ============================================ */

/* Parallax container */
.parallax-section {
    position: relative;
    overflow: hidden;
}

/* Floating decorative elements */
.parallax-layer {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    z-index: 0;
}

.parallax-layer svg {
    width: 100%;
    height: 100%;
    opacity: 0.06;
    fill: currentColor;
}

/* Specific floating elements */
.parallax-quill {
    width: 80px;
    height: 80px;
    color: var(--color-primary);
}

.parallax-book {
    width: 60px;
    height: 60px;
    color: var(--color-accent);
}

.parallax-star {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

.parallax-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    opacity: 0.08;
}

.parallax-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.15;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(-1deg);
    }
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -10px);
    }
    50% {
        transform: translate(5px, 5px);
    }
    75% {
        transform: translate(-5px, -5px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
}

.drift {
    animation: drift 12s ease-in-out infinite;
}

/* Parallax depth layers - moved by JS on scroll */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Hero parallax background shapes */
.hero-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-parallax-bg .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.hero-parallax-bg .shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    top: -100px;
    right: -100px;
}

.hero-parallax-bg .shape-2 {
    width: 300px;
    height: 300px;
    background: var(--color-white);
    bottom: -50px;
    left: -50px;
    opacity: 0.05;
}

.hero-parallax-bg .shape-3 {
    width: 150px;
    height: 150px;
    background: var(--color-accent);
    top: 40%;
    left: 10%;
    opacity: 0.08;
}

/* Section decorative elements container */
.section-decor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stays above decorations */
.parallax-section > .container {
    position: relative;
    z-index: 1;
}

/* Gallery filter fade animation (fix for missing CSS) */
.gallery-item.fade-in {
    animation: gallery-fade-in 0.4s ease-out forwards;
}

@keyframes gallery-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Disable parallax and floating on mobile for performance */
@media (max-width: 768px) {
    .parallax-layer,
    .hero-parallax-bg,
    .section-decor {
        display: none !important;
    }

    [data-parallax] {
        transform: none !important;
        will-change: auto;
    }

    .float,
    .float-slow,
    .float-reverse,
    .drift {
        animation: none !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        filter: none;
        animation: none !important;
    }

    .section-divider span,
    .hero h1,
    .hero .lead,
    .hero-cta,
    .hero-quote,
    .hero-logo-watermark,
    main {
        animation: none !important;
    }

    .hero-logo-watermark {
        opacity: 1;
    }

    .btn::after {
        display: none;
    }

    /* Disable parallax and floating for reduced motion */
    .parallax-layer,
    .hero-parallax-bg,
    .section-decor {
        display: none !important;
    }

    [data-parallax] {
        transform: none !important;
    }

    .float,
    .float-slow,
    .float-reverse,
    .drift {
        animation: none !important;
    }

    .gallery-item.fade-in {
        animation: none !important;
        opacity: 1;
    }
}
