/* Materia Theme - Material Design 3 Core Styles */

/* ========================================
   MD3 COLOR TOKENS & SYSTEM VARIABLES
======================================== */

:root {
    /* MATERIA-TEAL Color System - Material Design 3 Deep Teal Theme */
    --md-sys-color-primary: #0f4f4c;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #99d5d0;
    --md-sys-color-on-primary-container: #00201e;
    
    --md-sys-color-secondary: #5d6b5d;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #c1d1c1;
    --md-sys-color-on-secondary-container: #1f261f;
    
    --md-sys-color-tertiary: #8a9a5b;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #d7e7a7;
    --md-sys-color-on-tertiary-container: #2d3416;
    
    --md-sys-color-error: #B3261E;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #F9DEDC;
    --md-sys-color-on-error-container: #410E0B;
    
    --md-sys-color-background: #FFFBFE;
    --md-sys-color-on-background: #1C1B1F;
    
    --md-sys-color-surface: #FFFBFE;
    --md-sys-color-on-surface: #1C1B1F;
    --md-sys-color-surface-variant: #E7E0EC;
    --md-sys-color-on-surface-variant: #49454F;
    
    --md-sys-color-outline: #79747E;
    --md-sys-color-outline-variant: #CAC4D0;
    
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F7F2FA;
    --md-sys-color-surface-container: #F3EDF7;
    --md-sys-color-surface-container-high: #ECE6F0;
    --md-sys-color-surface-container-highest: #E6E0E9;
    
    --md-sys-color-inverse-surface: #313033;
    --md-sys-color-inverse-on-surface: #F4EFF4;
    --md-sys-color-inverse-primary: #4dd0e1;
    
    /* MATERIA-TEAL Brand Colors - Deep Teal Variations */
    --materia-teal-dark: #0f4f4c;
    --materia-teal-light: #99d5d0;
    --materia-sage: #8a9a5b;
    --materia-grey-green: #5d6b5d;
    --materia-forest: #1f261f;
    --materia-slate: #49454F;
    
    /* MD3 Elevation System */
    --md-elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-elevation-2: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
    --md-elevation-4: 0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);
    --md-elevation-5: 0px 4px 4px 0px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15);
    
    /* MATERIA Sharp Geometric System - Bold & Angular */
    --md-shape-corner-none: 0px;
    --md-shape-corner-extra-small: 0px;     /* Sharp edges everywhere */
    --md-shape-corner-small: 2px;           /* Minimal rounding */
    --md-shape-corner-medium: 4px;          /* Very subtle */
    --md-shape-corner-large: 6px;           /* Still quite sharp */
    --md-shape-corner-extra-large: 8px;     /* Maximum geometric */
    --md-shape-corner-full: 0px;            /* No pills - all rectangular */
    
    /* MATERIA Geometric Cuts */
    --materia-cut-corner: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    --materia-diagonal-cut: polygon(0 0, calc(100% - 24px) 0, 100% 100%, 0 100%);
    --materia-notch-cut: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    
    /* MD3 Motion System */
    --md-motion-duration-short1: 50ms;
    --md-motion-duration-short2: 100ms;
    --md-motion-duration-short3: 150ms;
    --md-motion-duration-short4: 200ms;
    --md-motion-duration-medium1: 250ms;
    --md-motion-duration-medium2: 300ms;
    --md-motion-duration-medium3: 350ms;
    --md-motion-duration-medium4: 400ms;
    --md-motion-duration-long1: 450ms;
    --md-motion-duration-long2: 500ms;
    --md-motion-duration-long3: 550ms;
    --md-motion-duration-long4: 600ms;
    
    --md-motion-easing-linear: cubic-bezier(0, 0, 1, 1);
    --md-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
    --md-motion-easing-standard-decelerate: cubic-bezier(0, 0, 0, 1);
    --md-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
    --md-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    
    /* MD3 Typography Scale */
    --md-typescale-display-large-font-size: 57px;
    --md-typescale-display-large-line-height: 64px;
    --md-typescale-display-large-font-weight: 400;
    --md-typescale-display-large-letter-spacing: -0.25px;
    
    --md-typescale-display-medium-font-size: 45px;
    --md-typescale-display-medium-line-height: 52px;
    --md-typescale-display-medium-font-weight: 400;
    --md-typescale-display-medium-letter-spacing: 0px;
    
    --md-typescale-display-small-font-size: 36px;
    --md-typescale-display-small-line-height: 44px;
    --md-typescale-display-small-font-weight: 400;
    --md-typescale-display-small-letter-spacing: 0px;
    
    --md-typescale-headline-large-font-size: 32px;
    --md-typescale-headline-large-line-height: 40px;
    --md-typescale-headline-large-font-weight: 400;
    --md-typescale-headline-large-letter-spacing: 0px;
    
    --md-typescale-headline-medium-font-size: 28px;
    --md-typescale-headline-medium-line-height: 36px;
    --md-typescale-headline-medium-font-weight: 400;
    --md-typescale-headline-medium-letter-spacing: 0px;
    
    --md-typescale-headline-small-font-size: 24px;
    --md-typescale-headline-small-line-height: 32px;
    --md-typescale-headline-small-font-weight: 400;
    --md-typescale-headline-small-letter-spacing: 0px;
    
    --md-typescale-title-large-font-size: 22px;
    --md-typescale-title-large-line-height: 28px;
    --md-typescale-title-large-font-weight: 400;
    --md-typescale-title-large-letter-spacing: 0px;
    
    --md-typescale-title-medium-font-size: 16px;
    --md-typescale-title-medium-line-height: 24px;
    --md-typescale-title-medium-font-weight: 500;
    --md-typescale-title-medium-letter-spacing: 0.15px;
    
    --md-typescale-title-small-font-size: 14px;
    --md-typescale-title-small-line-height: 20px;
    --md-typescale-title-small-font-weight: 500;
    --md-typescale-title-small-letter-spacing: 0.1px;
    
    --md-typescale-body-large-font-size: 16px;
    --md-typescale-body-large-line-height: 24px;
    --md-typescale-body-large-font-weight: 400;
    --md-typescale-body-large-letter-spacing: 0.5px;
    
    --md-typescale-body-medium-font-size: 14px;
    --md-typescale-body-medium-line-height: 20px;
    --md-typescale-body-medium-font-weight: 400;
    --md-typescale-body-medium-letter-spacing: 0.25px;
    
    --md-typescale-body-small-font-size: 12px;
    --md-typescale-body-small-line-height: 16px;
    --md-typescale-body-small-font-weight: 400;
    --md-typescale-body-small-letter-spacing: 0.4px;
    
    --md-typescale-label-large-font-size: 14px;
    --md-typescale-label-large-line-height: 20px;
    --md-typescale-label-large-font-weight: 500;
    --md-typescale-label-large-letter-spacing: 0.1px;
    
    --md-typescale-label-medium-font-size: 12px;
    --md-typescale-label-medium-line-height: 16px;
    --md-typescale-label-medium-font-weight: 500;
    --md-typescale-label-medium-letter-spacing: 0.5px;
    
    --md-typescale-label-small-font-size: 11px;
    --md-typescale-label-small-line-height: 16px;
    --md-typescale-label-small-font-weight: 500;
    --md-typescale-label-small-letter-spacing: 0.5px;
    
    /* MD3 State Layer Opacity */
    --md-state-hover-opacity: 0.08;
    --md-state-focus-opacity: 0.12;
    --md-state-pressed-opacity: 0.12;
    --md-state-dragged-opacity: 0.16;
    --md-state-disabled-opacity: 0.38;
    --md-state-disabled-container-opacity: 0.12;
    
    /* MATERIA Header Heights - Taller for Bold Design */
    --header-height-mobile: 5rem;
    --header-height-desktop: 6rem;
}

/* MATERIA Dark Mode - Deep & Rich */
@media (prefers-color-scheme: dark) {
    :root {
        --md-sys-color-primary: #80D4D5;           /* Bright Teal */
        --md-sys-color-on-primary: #003738;
        --md-sys-color-primary-container: #004F50;
        --md-sys-color-on-primary-container: #9DF0F0;
        
        --md-sys-color-secondary: #D4C68A;         /* Warm Sand */
        --md-sys-color-on-secondary: #3A3404;
        --md-sys-color-secondary-container: #514A19;
        --md-sys-color-on-secondary-container: #F1E6A8;
        
        --md-sys-color-tertiary: #FFBA4A;          /* Bright Amber */
        --md-sys-color-on-tertiary: #4A2800;
        --md-sys-color-tertiary-container: #693C00;
        --md-sys-color-on-tertiary-container: #FFDDB5;
        
        --md-sys-color-error: #FFB4AB;             /* Standard Material Error */
        --md-sys-color-on-error: #690005;
        --md-sys-color-error-container: #93000A;
        --md-sys-color-on-error-container: #FFDAD6;
        
        --md-sys-color-surface: #141218;           /* Cool dark */
        --md-sys-color-on-surface: #E7E2D9;
        --md-sys-color-surface-variant: #3F4945;   /* Dark teal-gray */
        --md-sys-color-on-surface-variant: #BEC9C3;
        
        --md-sys-color-outline: #889389;
        --md-sys-color-outline-variant: #3F4945;
        
        --md-sys-color-surface-container-lowest: #0F0E13;
        --md-sys-color-surface-container-low: #1D1B16;
        --md-sys-color-surface-container: #21201B;
        --md-sys-color-surface-container-high: #2C2B26;
        --md-sys-color-surface-container-highest: #373530;
        
        --md-sys-color-inverse-surface: #E7E2D9;
        --md-sys-color-inverse-on-surface: #32312C;
        --md-sys-color-inverse-primary: #006A6B;
    }
}

/* ========================================
   GLOBAL BASE STYLES
======================================== */
* {
    box-sizing: border-box;
}

/* Only remove transforms from Alpine.js elements */
[x-transition] {
    transform: none !important;
}

html {
    scroll-behavior: auto !important;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', 'Roboto', 'Source Sans Pro', system-ui, sans-serif;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* MATERIA Bold Geometric Background */
    background: 
        /* Sharp geometric pattern */
        conic-gradient(from 45deg at 25% 25%, 
            transparent 0deg, 
            color-mix(in srgb, var(--md-sys-color-primary) 0.03, transparent) 90deg, 
            transparent 90deg),
        conic-gradient(from 225deg at 75% 75%, 
            transparent 0deg, 
            color-mix(in srgb, var(--md-sys-color-tertiary) 0.02, transparent) 90deg, 
            transparent 90deg),
        /* Bold diagonal stripes */
        repeating-linear-gradient(
            45deg,
            var(--md-sys-color-surface) 0px,
            var(--md-sys-color-surface) 200px,
            color-mix(in srgb, var(--md-sys-color-surface) 99%, var(--md-sys-color-primary) 1%) 200px,
            color-mix(in srgb, var(--md-sys-color-surface) 99%, var(--md-sys-color-primary) 1%) 202px
        );
    background-attachment: fixed;
    color: var(--md-sys-color-on-surface);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    font-weight: var(--md-typescale-body-large-font-weight);
    letter-spacing: var(--md-typescale-body-large-letter-spacing);
    transition: background var(--md-motion-duration-medium2) var(--md-motion-easing-standard),
                color var(--md-motion-duration-medium2) var(--md-motion-easing-standard);
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* ========================================
   SCROLL BEHAVIOR & ANCHOR NAVIGATION
======================================== */
section[id], 
.anchor-section,
[id] {
    scroll-margin-top: calc(var(--header-height-mobile) + 20px);
}

@media (min-width: 1024px) {
    section[id], 
    .anchor-section,
    [id] {
        scroll-margin-top: calc(var(--header-height-desktop) + 20px);
    }
}

/* ========================================
   MD3 SURFACE SYSTEM & STATE LAYERS
======================================== */

/* MATERIA Geometric Surface System - Bold & Angular */
.md-surface {
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    border-left: 6px solid var(--md-sys-color-primary);
    border-bottom: 2px solid var(--md-sys-color-outline-variant);
    position: relative;
    clip-path: var(--materia-cut-corner);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.md-surface:hover {
    border-left-width: 8px;
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-3);
}

.md-surface-container-lowest {
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    border: 3px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-none);
    position: relative;
}

.md-surface-container-lowest::before {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 24px;
    height: 24px;
    background: var(--md-sys-color-tertiary);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.md-surface-container-low {
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    position: relative;
    border-top: 4px solid var(--md-sys-color-primary);
    border-right: 4px solid var(--md-sys-color-tertiary);
}

.md-surface-container-low::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(45deg, 
        var(--md-sys-color-primary) 0%, 
        transparent 25%, 
        var(--md-sys-color-primary) 50%, 
        transparent 75%);
    opacity: 0.1;
}

.md-surface-container {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    clip-path: var(--materia-diagonal-cut);
    border-bottom: 3px solid var(--md-sys-color-primary);
    position: relative;
}

.md-surface-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 24px 24px;
    border-color: transparent transparent var(--md-sys-color-tertiary) transparent;
}

.md-surface-container-high {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    border: 2px solid var(--md-sys-color-outline);
    position: relative;
    clip-path: var(--materia-notch-cut);
}

.md-surface-container-high::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -2px;
    width: 12px;
    height: 40%;
    background: var(--md-sys-color-secondary);
    transform: translateY(-50%) skewY(-15deg);
}

.md-surface-container-highest {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    border: 4px solid var(--md-sys-color-primary);
    position: relative;
    transform: perspective(1000px) rotateX(2deg);
    box-shadow: 
        0 8px 0 var(--md-sys-color-primary-container),
        0 16px 0 var(--md-sys-color-tertiary-container),
        var(--md-elevation-4);
}

.md-surface-container-highest::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        var(--md-sys-color-primary) 0%, 
        var(--md-sys-color-tertiary) 25%, 
        var(--md-sys-color-secondary) 50%, 
        var(--md-sys-color-primary) 75%, 
        var(--md-sys-color-tertiary) 100%);
    z-index: -1;
    animation: materia-border-rotate 8s linear infinite;
}

@keyframes materia-border-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.md-surface-variant {
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            var(--md-sys-color-surface-variant) 0deg,
            var(--md-sys-color-surface-variant) 45deg,
            color-mix(in srgb, var(--md-sys-color-surface-variant) 95%, var(--md-sys-color-primary) 5%) 45deg,
            color-mix(in srgb, var(--md-sys-color-surface-variant) 95%, var(--md-sys-color-primary) 5%) 90deg
        );
    color: var(--md-sys-color-on-surface-variant);
    border-radius: var(--md-shape-corner-none);
    border: 1px solid var(--md-sys-color-outline);
}

/* MD3 State Layer System */
.md-state-layer {
    position: relative;
    overflow: hidden;
}

.md-state-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    transition: background-color var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    pointer-events: none;
}

/* Hover State */
.md-state-layer:hover::before {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-hover-opacity), transparent);
}

/* Focus State */
.md-state-layer:focus::before,
.md-state-layer:focus-visible::before {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-focus-opacity), transparent);
}

/* Pressed State */
.md-state-layer:active::before {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-pressed-opacity), transparent);
}

/* Disabled State */
.md-state-layer:disabled,
.md-state-layer[disabled] {
    opacity: var(--md-state-disabled-opacity);
    pointer-events: none;
}

.md-state-layer:disabled::before,
.md-state-layer[disabled]::before {
    background-color: transparent;
}

/* Primary State Layers */
.md-state-layer-primary:hover::before {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) var(--md-state-hover-opacity), transparent);
}

.md-state-layer-primary:focus::before,
.md-state-layer-primary:focus-visible::before {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) var(--md-state-focus-opacity), transparent);
}

.md-state-layer-primary:active::before {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) var(--md-state-pressed-opacity), transparent);
}

/* Secondary State Layers */
.md-state-layer-secondary:hover::before {
    background-color: color-mix(in srgb, var(--md-sys-color-secondary) var(--md-state-hover-opacity), transparent);
}

.md-state-layer-secondary:focus::before,
.md-state-layer-secondary:focus-visible::before {
    background-color: color-mix(in srgb, var(--md-sys-color-secondary) var(--md-state-focus-opacity), transparent);
}

.md-state-layer-secondary:active::before {
    background-color: color-mix(in srgb, var(--md-sys-color-secondary) var(--md-state-pressed-opacity), transparent);
}

/* Elevation System */
.md-elevation-1 {
    box-shadow: var(--md-elevation-1);
}

.md-elevation-2 {
    box-shadow: var(--md-elevation-2);
}

.md-elevation-3 {
    box-shadow: var(--md-elevation-3);
}

.md-elevation-4 {
    box-shadow: var(--md-elevation-4);
}

.md-elevation-5 {
    box-shadow: var(--md-elevation-5);
}

/* Legacy Glass Support (converted to MD3 surfaces) */
.aeris-glass {
    background-color: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-medium);
    box-shadow: var(--md-elevation-2);
}

.aeris-glass-dark {
    background-color: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-medium);
    box-shadow: var(--md-elevation-3);
}

.aeris-glass-strong {
    background-color: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-medium);
    box-shadow: var(--md-elevation-4);
}

/* ========================================
   GRADIENT UTILITIES
======================================== */
.aeris-gradient-primary {
    background: linear-gradient(135deg, var(--aeris-primary) 0%, var(--aeris-secondary) 100%);
}

.aeris-gradient-warm {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.aeris-gradient-cool {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.aeris-gradient-teal {
    background: linear-gradient(135deg, #0f4f4c 0%, #1b5e5b 100%);
}

.aeris-text-gradient {
    background: linear-gradient(135deg, var(--aeris-primary) 0%, var(--aeris-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   SHADOW UTILITIES
======================================== */
.aeris-shadow-soft {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.aeris-shadow-medium {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.aeris-shadow-large {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.aeris-shadow-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.aeris-shadow-glow-teal {
    box-shadow: 0 0 20px rgba(15, 79, 76, 0.15);
}

/* ========================================
   MD3 BUTTON SYSTEM
======================================== */

/* MATERIA Geometric Button System - Bold & Angular */
.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 48px;
    padding: 12px 32px;
    border: none;
    text-decoration: none;
    font-family: inherit;
    font-size: var(--md-typescale-label-large-font-size);
    line-height: var(--md-typescale-label-large-line-height);
    font-weight: 600;  /* Bold text */
    letter-spacing: 0.5px;  /* More spacing */
    text-transform: uppercase;  /* All caps */
    border-radius: var(--md-shape-corner-none);  /* Sharp edges */
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--md-motion-duration-short2) var(--md-motion-easing-emphasized);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.md-btn:disabled,
.md-btn[disabled] {
    pointer-events: none;
    opacity: var(--md-state-disabled-opacity);
}

.md-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
}

.md-btn:hover::before {
    left: 100%;
}

/* Filled Button - Aggressive Styling */
.md-btn-filled {
    background: linear-gradient(135deg, 
        var(--md-sys-color-primary) 0%, 
        color-mix(in srgb, var(--md-sys-color-primary) 80%, black 20%) 100%);
    color: var(--md-sys-color-on-primary);
    box-shadow: 
        4px 4px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-2);
    border-bottom: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 60%, black 40%);
}

.md-btn-filled:hover {
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 
        6px 6px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-4);
}

.md-btn-filled:active {
    transform: translateY(1px) translateX(1px);
    box-shadow: 
        2px 2px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-1);
}

/* Outlined Button - Sharp & Bold */
.md-btn-outlined {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 3px solid var(--md-sys-color-primary);
    position: relative;
}

.md-btn-outlined::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    bottom: -3px;
    left: -3px;
    border: 2px solid var(--md-sys-color-tertiary);
    opacity: 0;
    transition: opacity var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.md-btn-outlined:hover {
    background: var(--md-sys-color-primary-container);
    transform: scale(1.05);
}

.md-btn-outlined:hover::after {
    opacity: 1;
}

/* Text Button - Geometric Underline */
.md-btn-text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    padding: 12px 16px;
    position: relative;
}

.md-btn-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--md-sys-color-primary) 0%, 
        var(--md-sys-color-tertiary) 100%);
    transition: width var(--md-motion-duration-medium1) var(--md-motion-easing-emphasized-decelerate);
}

.md-btn-text:hover::after {
    width: 100%;
}

/* Tonal Button - Layered Effect */
.md-btn-tonal {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    position: relative;
    border-right: 4px solid var(--md-sys-color-secondary);
    border-bottom: 4px solid var(--md-sys-color-secondary);
}

.md-btn-tonal::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--md-sys-color-secondary-container) 90%, var(--md-sys-color-secondary) 10%);
    z-index: -1;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.md-btn-tonal:hover::before {
    top: 0;
    left: 0;
    background: var(--md-sys-color-secondary-container);
}

/* FAB (Floating Action Button) */
.md-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--md-shape-corner-large);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    box-shadow: var(--md-elevation-3);
    cursor: pointer;
    transition: box-shadow var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

.md-fab:hover {
    box-shadow: var(--md-elevation-4);
}

.md-fab-large {
    width: 96px;
    height: 96px;
    border-radius: var(--md-shape-corner-extra-large);
}

.md-fab-small {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-corner-medium);
}

/* Legacy Button Support - MATERIA Geometric Style */
.aeris-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 48px;
    padding: 12px 32px;
    border: none;
    text-decoration: none;
    font-family: inherit;
    font-size: var(--md-typescale-label-large-font-size);
    line-height: var(--md-typescale-label-large-line-height);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--md-shape-corner-none);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    transition: all var(--md-motion-duration-short2) var(--md-motion-easing-emphasized);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, 
        var(--md-sys-color-primary) 0%, 
        color-mix(in srgb, var(--md-sys-color-primary) 80%, black 20%) 100%);
    color: var(--md-sys-color-on-primary);
    box-shadow: 
        4px 4px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-2);
    border-bottom: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 60%, black 40%);
}

.aeris-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
}

.aeris-btn:hover {
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 
        6px 6px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-4);
}

.aeris-btn:hover::before {
    left: 100%;
}

.aeris-btn-primary {
    background: linear-gradient(135deg, 
        var(--md-sys-color-primary) 0%, 
        color-mix(in srgb, var(--md-sys-color-primary) 80%, black 20%) 100%);
    color: var(--md-sys-color-on-primary);
}

.aeris-btn-secondary {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    border-right: 4px solid var(--md-sys-color-secondary);
    border-bottom: 4px solid var(--md-sys-color-secondary);
    box-shadow: 4px 4px 0 var(--md-sys-color-secondary-container);
}

.aeris-btn-ghost {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 3px solid var(--md-sys-color-primary);
    box-shadow: none;
}

.aeris-btn-ghost:hover {
    background: var(--md-sys-color-primary-container);
    transform: scale(1.05) translateY(-1px);
}

/* ========================================
   MD3 FORM ELEMENTS
======================================== */

/* Outlined Text Field */
.md-text-field {
    position: relative;
    width: 100%;
}

.md-text-field-input {
    width: 100%;
    height: 56px;
    padding: 16px;
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-extra-small);
    font-family: inherit;
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-motion-duration-short4) var(--md-motion-easing-standard),
                outline var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    outline: none;
}

.md-text-field-input:focus {
    border-color: var(--md-sys-color-primary);
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -1px;
}

.md-text-field-input:disabled {
    border-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-disabled-container-opacity), transparent);
    color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-disabled-opacity), transparent);
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 0.04, transparent);
}

.md-text-field-input::placeholder {
    color: var(--md-sys-color-on-surface-variant);
    opacity: 1;
}

/* Filled Text Field */
.md-text-field-filled .md-text-field-input {
    background-color: var(--md-sys-color-surface-container-highest);
    border: none;
    border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
    border-radius: var(--md-shape-corner-extra-small) var(--md-shape-corner-extra-small) 0 0;
}

.md-text-field-filled .md-text-field-input:focus {
    border-bottom: 2px solid var(--md-sys-color-primary);
    outline: none;
}

/* Textarea */
.md-textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Select Field */
.md-select {
    position: relative;
}

.md-select-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 48px;
}

/* Checkbox */
.md-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.md-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.md-checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--md-sys-color-on-surface-variant);
    border-radius: 2px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

.md-checkbox-input:checked + .md-checkbox-box {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.md-checkbox-input:checked + .md-checkbox-box::after {
    content: '✓';
    color: var(--md-sys-color-on-primary);
    font-size: 12px;
    font-weight: bold;
}

.md-checkbox-input:disabled + .md-checkbox-box {
    border-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-disabled-opacity), transparent);
    background-color: transparent;
}

/* Radio Button */
.md-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.md-radio-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.md-radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--md-sys-color-on-surface-variant);
    border-radius: 50%;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

.md-radio-input:checked + .md-radio-circle {
    border-color: var(--md-sys-color-primary);
}

.md-radio-input:checked + .md-radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--md-sys-color-primary);
}

.md-radio-input:disabled + .md-radio-circle {
    border-color: color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-state-disabled-opacity), transparent);
}

/* Legacy Form Support (converted to MD3) */
.aeris-input {
    width: 100%;
    height: 56px;
    padding: 16px;
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-extra-small);
    font-family: inherit;
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-motion-duration-short4) var(--md-motion-easing-standard),
                outline var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    outline: none;
}

.aeris-input:focus {
    border-color: var(--md-sys-color-primary);
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -1px;
}

.aeris-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 16px;
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-extra-small);
    font-family: inherit;
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-motion-duration-short4) var(--md-motion-easing-standard),
                outline var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    outline: none;
}

.aeris-textarea:focus {
    border-color: var(--md-sys-color-primary);
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -1px;
}

.aeris-select {
    width: 100%;
    height: 56px;
    padding: 16px;
    padding-right: 48px;
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-extra-small);
    font-family: inherit;
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-motion-duration-short4) var(--md-motion-easing-standard),
                outline var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.aeris-select:focus {
    border-color: var(--md-sys-color-primary);
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -1px;
}

/* ========================================
   MD3 CARD SYSTEM
======================================== */

/* MATERIA Geometric Card System - Bold & Dramatic */
.md-card {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    padding: 24px;
    position: relative;
    overflow: visible;
    border-left: 8px solid var(--md-sys-color-primary);
    border-bottom: 4px solid var(--md-sys-color-outline);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
}

.md-card::before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--md-sys-color-tertiary);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: 1;
}

.md-card::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 0 12px;
    border-color: transparent transparent transparent var(--md-sys-color-secondary);
}

/* Elevated Card - Stacked Effect */
.md-card-elevated {
    background: var(--md-sys-color-surface-container-low);
    box-shadow: 
        8px 8px 0 var(--md-sys-color-primary-container),
        16px 16px 0 var(--md-sys-color-tertiary-container),
        var(--md-elevation-3);
    transform: translateZ(0);
}

.md-card-elevated:hover {
    transform: translateY(-4px) translateX(-4px);
    box-shadow: 
        12px 12px 0 var(--md-sys-color-primary-container),
        20px 20px 0 var(--md-sys-color-tertiary-container),
        var(--md-elevation-5);
}

/* Filled Card - Bold Borders */
.md-card-filled {
    background: var(--md-sys-color-surface-container-highest);
    border: 4px solid var(--md-sys-color-primary);
    position: relative;
}

.md-card-filled::before {
    background: var(--md-sys-color-primary);
    width: 24px;
    height: 24px;
}

.md-card-filled::after {
    border-width: 16px 0 0 16px;
    border-color: transparent transparent transparent var(--md-sys-color-primary);
}

/* Outlined Card - Double Border */
.md-card-outlined {
    background: var(--md-sys-color-surface);
    border: 3px solid var(--md-sys-color-outline);
    position: relative;
}

.md-card-outlined::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--md-sys-color-tertiary);
    pointer-events: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

/* Interactive Card States - Aggressive Animations */
.md-card-interactive {
    cursor: pointer;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.md-card-interactive:hover {
    transform: translateY(-6px) rotate(1deg);
    border-left-width: 12px;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.15),
        var(--md-elevation-4);
}

.md-card-interactive:hover::before {
    width: 28px;
    height: 28px;
    background: var(--md-sys-color-secondary);
}

.md-card-interactive.md-card-elevated:hover {
    transform: translateY(-8px) translateX(-6px) rotate(-0.5deg);
}

.md-card-interactive:focus {
    outline: none;
}

.md-card-interactive:focus-visible {
    outline: 4px solid var(--md-sys-color-primary);
    outline-offset: 4px;
}

.md-card-interactive:active {
    transform: translateY(-2px) scale(0.98);
    border-left-width: 6px;
}

/* Card Content Areas */
.md-card-header {
    margin-bottom: 16px;
}

.md-card-title {
    font-size: var(--md-typescale-headline-small-font-size);
    line-height: var(--md-typescale-headline-small-line-height);
    font-weight: var(--md-typescale-headline-small-font-weight);
    letter-spacing: var(--md-typescale-headline-small-letter-spacing);
    color: var(--md-sys-color-on-surface);
    margin: 0 0 8px 0;
}

.md-card-subtitle {
    font-size: var(--md-typescale-title-medium-font-size);
    line-height: var(--md-typescale-title-medium-line-height);
    font-weight: var(--md-typescale-title-medium-font-weight);
    letter-spacing: var(--md-typescale-title-medium-letter-spacing);
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

.md-card-content {
    font-size: var(--md-typescale-body-medium-font-size);
    line-height: var(--md-typescale-body-medium-line-height);
    font-weight: var(--md-typescale-body-medium-font-weight);
    letter-spacing: var(--md-typescale-body-medium-letter-spacing);
    color: var(--md-sys-color-on-surface-variant);
}

.md-card-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.md-card-media {
    margin: -16px -16px 16px -16px;
    border-radius: var(--md-shape-corner-medium) var(--md-shape-corner-medium) 0 0;
    overflow: hidden;
}

.md-card-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Legacy Card Support - MATERIA Geometric Style */
.aeris-card {
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-corner-none);
    padding: 24px;
    position: relative;
    overflow: visible;
    border-left: 8px solid var(--md-sys-color-primary);
    border-bottom: 4px solid var(--md-sys-color-outline);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
    box-shadow: 
        8px 8px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-2);
}

.aeris-card::before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--md-sys-color-tertiary);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: 1;
}

.aeris-card-hover {
    cursor: pointer;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.aeris-card-hover:hover {
    transform: translateY(-6px) translateX(-4px) rotate(0.5deg);
    border-left-width: 12px;
    box-shadow: 
        12px 12px 0 var(--md-sys-color-primary-container),
        0 12px 24px rgba(0, 0, 0, 0.15),
        var(--md-elevation-4);
}

.aeris-card-hover:hover::before {
    width: 28px;
    height: 28px;
    background: var(--md-sys-color-secondary);
}

.aeris-card-hover:focus {
    outline: none;
}

.aeris-card-hover:focus-visible {
    outline: 4px solid var(--md-sys-color-primary);
    outline-offset: 4px;
}

.aeris-card-hover:active {
    transform: translateY(-2px) scale(0.98);
    border-left-width: 6px;
    box-shadow: 
        6px 6px 0 var(--md-sys-color-primary-container),
        var(--md-elevation-1);
}

/* ========================================
   ANIMATIONS
======================================== */
/* MD3 Motion Keyframes */
@keyframes md-fade-in {
    0% { 
        opacity: 0; 
        transform: translateY(16px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes md-fade-out {
    0% { 
        opacity: 1; 
        transform: translateY(0);
    }
    100% { 
        opacity: 0; 
        transform: translateY(-8px);
    }
}

@keyframes md-slide-in-right {
    0% { 
        opacity: 0; 
        transform: translateX(24px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0);
    }
}

@keyframes md-slide-in-left {
    0% { 
        opacity: 0; 
        transform: translateX(-24px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0);
    }
}

@keyframes md-scale-in {
    0% { 
        opacity: 0; 
        transform: scale(0.8);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

@keyframes md-shimmer {
    0% { 
        transform: translateX(-100%);
    }
    100% { 
        transform: translateX(100%);
    }
}

@keyframes md-pulse {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.6;
    }
}

@keyframes md-bounce {
    0%, 100% { 
        transform: translateY(0);
        animation-timing-function: var(--md-motion-easing-standard);
    }
    50% { 
        transform: translateY(-8px);
        animation-timing-function: var(--md-motion-easing-standard);
    }
}

/* MD3 Animation Classes */
.md-animate-fade-in {
    animation: md-fade-in var(--md-motion-duration-medium4) var(--md-motion-easing-emphasized-decelerate);
}

.md-animate-fade-out {
    animation: md-fade-out var(--md-motion-duration-short4) var(--md-motion-easing-emphasized-accelerate);
}

.md-animate-slide-in-right {
    animation: md-slide-in-right var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

.md-animate-slide-in-left {
    animation: md-slide-in-left var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

.md-animate-scale-in {
    animation: md-scale-in var(--md-motion-duration-medium1) var(--md-motion-easing-emphasized-decelerate);
}

.md-animate-pulse {
    animation: md-pulse var(--md-motion-duration-long4) var(--md-motion-easing-linear) infinite;
}

.md-animate-bounce {
    animation: md-bounce var(--md-motion-duration-long2) var(--md-motion-easing-emphasized) infinite;
}

/* Legacy Animation Support (converted to MD3) */
.aeris-float {
    animation: md-bounce var(--md-motion-duration-long2) var(--md-motion-easing-emphasized) infinite;
}

.aeris-float-delayed {
    animation: md-bounce var(--md-motion-duration-long2) var(--md-motion-easing-emphasized) infinite;
    animation-delay: var(--md-motion-duration-long2);
}

.aeris-animate-in {
    animation: md-fade-in var(--md-motion-duration-medium4) var(--md-motion-easing-emphasized-decelerate);
}

.aeris-animate-slide-in {
    animation: md-slide-in-right var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

.aeris-pulse-slow {
    animation: md-pulse var(--md-motion-duration-long4) var(--md-motion-easing-linear) infinite;
}

/* MD3 Loading States */
.md-loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: var(--md-state-disabled-opacity);
}

.md-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--md-sys-color-on-surface) 0.1, transparent),
        transparent
    );
    animation: md-shimmer var(--md-motion-duration-long3) var(--md-motion-easing-linear) infinite;
    z-index: 1;
    transform: translateX(-100%);
}

/* MD3 Shape Utilities */
.md-shape-none {
    border-radius: var(--md-shape-corner-none);
}

.md-shape-extra-small {
    border-radius: var(--md-shape-corner-extra-small);
}

.md-shape-small {
    border-radius: var(--md-shape-corner-small);
}

.md-shape-medium {
    border-radius: var(--md-shape-corner-medium);
}

.md-shape-large {
    border-radius: var(--md-shape-corner-large);
}

.md-shape-extra-large {
    border-radius: var(--md-shape-corner-extra-large);
}

.md-shape-full {
    border-radius: var(--md-shape-corner-full);
}

/* Legacy Loading Support */
.aeris-loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: var(--md-state-disabled-opacity);
}

.aeris-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--md-sys-color-on-surface) 0.1, transparent),
        transparent
    );
    animation: md-shimmer var(--md-motion-duration-long3) var(--md-motion-easing-linear) infinite;
    z-index: 1;
    transform: translateX(-100%);
}

/* ========================================
   MD3 TYPOGRAPHY SYSTEM
======================================== */

/* Display Type Scale */
.md-typescale-display-large {
    font-size: var(--md-typescale-display-large-font-size);
    line-height: var(--md-typescale-display-large-line-height);
    font-weight: var(--md-typescale-display-large-font-weight);
    letter-spacing: var(--md-typescale-display-large-letter-spacing);
}

.md-typescale-display-medium {
    font-size: var(--md-typescale-display-medium-font-size);
    line-height: var(--md-typescale-display-medium-line-height);
    font-weight: var(--md-typescale-display-medium-font-weight);
    letter-spacing: var(--md-typescale-display-medium-letter-spacing);
}

.md-typescale-display-small {
    font-size: var(--md-typescale-display-small-font-size);
    line-height: var(--md-typescale-display-small-line-height);
    font-weight: var(--md-typescale-display-small-font-weight);
    letter-spacing: var(--md-typescale-display-small-letter-spacing);
}

/* Headline Type Scale */
.md-typescale-headline-large {
    font-size: var(--md-typescale-headline-large-font-size);
    line-height: var(--md-typescale-headline-large-line-height);
    font-weight: var(--md-typescale-headline-large-font-weight);
    letter-spacing: var(--md-typescale-headline-large-letter-spacing);
}

.md-typescale-headline-medium {
    font-size: var(--md-typescale-headline-medium-font-size);
    line-height: var(--md-typescale-headline-medium-line-height);
    font-weight: var(--md-typescale-headline-medium-font-weight);
    letter-spacing: var(--md-typescale-headline-medium-letter-spacing);
}

.md-typescale-headline-small {
    font-size: var(--md-typescale-headline-small-font-size);
    line-height: var(--md-typescale-headline-small-line-height);
    font-weight: var(--md-typescale-headline-small-font-weight);
    letter-spacing: var(--md-typescale-headline-small-letter-spacing);
}

/* Title Type Scale */
.md-typescale-title-large {
    font-size: var(--md-typescale-title-large-font-size);
    line-height: var(--md-typescale-title-large-line-height);
    font-weight: var(--md-typescale-title-large-font-weight);
    letter-spacing: var(--md-typescale-title-large-letter-spacing);
}

.md-typescale-title-medium {
    font-size: var(--md-typescale-title-medium-font-size);
    line-height: var(--md-typescale-title-medium-line-height);
    font-weight: var(--md-typescale-title-medium-font-weight);
    letter-spacing: var(--md-typescale-title-medium-letter-spacing);
}

.md-typescale-title-small {
    font-size: var(--md-typescale-title-small-font-size);
    line-height: var(--md-typescale-title-small-line-height);
    font-weight: var(--md-typescale-title-small-font-weight);
    letter-spacing: var(--md-typescale-title-small-letter-spacing);
}

/* Body Type Scale */
.md-typescale-body-large {
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    font-weight: var(--md-typescale-body-large-font-weight);
    letter-spacing: var(--md-typescale-body-large-letter-spacing);
}

.md-typescale-body-medium {
    font-size: var(--md-typescale-body-medium-font-size);
    line-height: var(--md-typescale-body-medium-line-height);
    font-weight: var(--md-typescale-body-medium-font-weight);
    letter-spacing: var(--md-typescale-body-medium-letter-spacing);
}

.md-typescale-body-small {
    font-size: var(--md-typescale-body-small-font-size);
    line-height: var(--md-typescale-body-small-line-height);
    font-weight: var(--md-typescale-body-small-font-weight);
    letter-spacing: var(--md-typescale-body-small-letter-spacing);
}

/* Label Type Scale */
.md-typescale-label-large {
    font-size: var(--md-typescale-label-large-font-size);
    line-height: var(--md-typescale-label-large-line-height);
    font-weight: var(--md-typescale-label-large-font-weight);
    letter-spacing: var(--md-typescale-label-large-letter-spacing);
}

.md-typescale-label-medium {
    font-size: var(--md-typescale-label-medium-font-size);
    line-height: var(--md-typescale-label-medium-line-height);
    font-weight: var(--md-typescale-label-medium-font-weight);
    letter-spacing: var(--md-typescale-label-medium-letter-spacing);
}

.md-typescale-label-small {
    font-size: var(--md-typescale-label-small-font-size);
    line-height: var(--md-typescale-label-small-line-height);
    font-weight: var(--md-typescale-label-small-font-weight);
    letter-spacing: var(--md-typescale-label-small-letter-spacing);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .md-typescale-display-large {
        font-size: clamp(36px, 8vw, var(--md-typescale-display-large-font-size));
        line-height: clamp(44px, 9vw, var(--md-typescale-display-large-line-height));
    }
    
    .md-typescale-display-medium {
        font-size: clamp(32px, 7vw, var(--md-typescale-display-medium-font-size));
        line-height: clamp(40px, 8vw, var(--md-typescale-display-medium-line-height));
    }
    
    .md-typescale-display-small {
        font-size: clamp(28px, 6vw, var(--md-typescale-display-small-font-size));
        line-height: clamp(36px, 7vw, var(--md-typescale-display-small-line-height));
    }
    
    .md-typescale-headline-large {
        font-size: clamp(24px, 5vw, var(--md-typescale-headline-large-font-size));
        line-height: clamp(32px, 6vw, var(--md-typescale-headline-large-line-height));
    }
}

/* Legacy Typography Support (converted to MD3) */
.aeris-heading {
    font-size: var(--md-typescale-headline-medium-font-size);
    line-height: var(--md-typescale-headline-medium-line-height);
    font-weight: var(--md-typescale-headline-medium-font-weight);
    letter-spacing: var(--md-typescale-headline-medium-letter-spacing);
}

.aeris-heading-lg {
    font-size: var(--md-typescale-display-medium-font-size);
    line-height: var(--md-typescale-display-medium-line-height);
    font-weight: var(--md-typescale-display-medium-font-weight);
    letter-spacing: var(--md-typescale-display-medium-letter-spacing);
}

.aeris-heading-md {
    font-size: var(--md-typescale-headline-large-font-size);
    line-height: var(--md-typescale-headline-large-line-height);
    font-weight: var(--md-typescale-headline-large-font-weight);
    letter-spacing: var(--md-typescale-headline-large-letter-spacing);
}

.aeris-heading-sm {
    font-size: var(--md-typescale-headline-medium-font-size);
    line-height: var(--md-typescale-headline-medium-line-height);
    font-weight: var(--md-typescale-headline-medium-font-weight);
    letter-spacing: var(--md-typescale-headline-medium-letter-spacing);
}

.aeris-body-lg {
    font-size: var(--md-typescale-body-large-font-size);
    line-height: var(--md-typescale-body-large-line-height);
    font-weight: var(--md-typescale-body-large-font-weight);
    letter-spacing: var(--md-typescale-body-large-letter-spacing);
}

.aeris-body {
    font-size: var(--md-typescale-body-medium-font-size);
    line-height: var(--md-typescale-body-medium-line-height);
    font-weight: var(--md-typescale-body-medium-font-weight);
    letter-spacing: var(--md-typescale-body-medium-letter-spacing);
}

.aeris-body-sm {
    font-size: var(--md-typescale-body-small-font-size);
    line-height: var(--md-typescale-body-small-line-height);
    font-weight: var(--md-typescale-body-small-font-weight);
    letter-spacing: var(--md-typescale-body-small-letter-spacing);
}

/* ========================================
   PROSE STYLING (CONSOLIDATED)
======================================== */
.prose {
    color: #374151;
    max-width: none;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.7;
}

.prose-xl {
    font-size: 1.25rem;
    line-height: 1.8;
}

.prose-gray {
    color: #374151;
}

.prose h1, 
.prose h2, 
.prose h3, 
.prose h4, 
.prose h5, 
.prose h6 {
    color: #1f2937;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin-top: 0;
}

.prose h1 { 
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.prose h2 { 
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
    font-weight: 400;
}

.prose h3 { 
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.prose h4 { 
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
    font-weight: 500;
}

.prose h5 { 
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.prose h6 { 
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose p {
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1.5rem;
}

.prose ul, 
.prose ol {
    color: #4b5563;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose ul {
    list-style-type: none;
    position: relative;
}

.prose ul > li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8125rem;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: #3b82f6;
}

.prose ol {
    counter-reset: list-counter;
}

.prose ol > li {
    position: relative;
    counter-increment: list-counter;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose ol > li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.875rem;
}

.prose ul ul, 
.prose ul ol, 
.prose ol ul, 
.prose ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose ul ul > li::before {
    background-color: #6b7280;
    width: 0.25rem;
    height: 0.25rem;
}

.prose strong {
    color: #1f2937;
    font-weight: 600;
}

.prose em {
    color: #4b5563;
    font-style: italic;
}

.prose mark {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

.prose small {
    font-size: 0.875rem;
    color: #6b7280;
}

.prose a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
    border-bottom: 1px solid transparent;
}

.prose a:hover {
    color: #1d4ed8;
    border-bottom-color: #3b82f6;
}

.prose a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.125rem;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    position: relative;
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: -0.5rem;
    font-size: 3rem;
    color: #3b82f6;
    font-family: Georgia, serif;
    opacity: 0.3;
}

.prose blockquote p {
    color: inherit;
    margin-bottom: 0;
}

.prose blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: normal;
}

.prose blockquote cite::before {
    content: '— ';
}

.prose code {
    background: #f3f4f6;
    color: #1f2937;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 500;
}

.prose pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.7;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
    margin: 2rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.prose thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.prose th {
    border: 1px solid #e5e7eb;
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.875rem 1rem;
    color: #4b5563;
    line-height: 1.5;
}

.prose tbody tr:nth-child(even) {
    background: #f9fafb;
}

.prose tbody tr:hover {
    background: #f3f4f6;
}

.prose img {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.prose figure {
    margin: 1.5rem 0;
}

.prose figcaption {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

.prose video {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.prose dl {
    margin: 1.5rem 0;
}

.prose dt {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.prose dd {
    color: #4b5563;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
}

.prose address {
    color: #4b5563;
    font-style: normal;
    line-height: 1.75;
    margin: 1.5rem 0;
}

.prose kbd {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: inherit;
    color: #374151;
    box-shadow: inset 0 -1px 0 #d1d5db;
}

.prose .callout {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose .callout.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left-color: #3b82f6;
}

.prose .callout.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: #10b981;
}

.prose .callout.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}

.prose .callout.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
}

.prose .property-highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.prose .property-feature {
    display: flex;
    align-items: flex-start;
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

.prose .property-feature::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
    }
    
    .prose h1 { font-size: 1.875rem; }
    .prose h2 { font-size: 1.5rem; }
    .prose h3 { font-size: 1.25rem; }
    .prose h4 { font-size: 1.125rem; }
    .prose h5 { font-size: 1rem; }
    .prose h6 { font-size: 0.875rem; }
    
    .prose blockquote {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
    }
    
    .prose table {
        font-size: 0.875rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.5rem 0.75rem;
    }
}

@media (prefers-color-scheme: dark) {
    .prose {
        color: #d1d5db;
    }
    
    .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
        color: #f9fafb;
    }
    
    .prose p {
        color: #d1d5db;
    }
    
    .prose strong {
        color: #f9fafb;
    }
    
    .prose a {
        color: #60a5fa;
    }
    
    .prose a:hover {
        color: #93c5fd;
    }
    
    .prose code {
        background: #374151;
        color: #f9fafb;
    }
    
    .prose blockquote {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        color: #dbeafe;
        border-left-color: #60a5fa;
    }
}

/* ========================================
   MD3 SCROLLBAR CUSTOMIZATION
======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--md-sys-color-surface-variant);
    border-radius: var(--md-shape-corner-extra-small);
}

::-webkit-scrollbar-thumb {
    background-color: var(--md-sys-color-outline);
    border-radius: var(--md-shape-corner-extra-small);
    transition: background-color var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--md-sys-color-on-surface-variant);
}

::-webkit-scrollbar-thumb:active {
    background-color: var(--md-sys-color-primary);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-outline) var(--md-sys-color-surface-variant);
}

/* ========================================
   MD3 TEXT SELECTION
======================================== */
::selection {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 0.24, transparent);
    color: inherit;
}

::-moz-selection {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 0.24, transparent);
    color: inherit;
}

/* ========================================
   MD3 FOCUS STYLES
======================================== */
:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
    border-radius: var(--md-shape-corner-extra-small);
}

.md-focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) var(--md-state-focus-opacity), transparent);
}

/* Legacy Focus Support */
.aeris-focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) var(--md-state-focus-opacity), transparent);
}

/* ========================================
   UTILITY CLASSES
======================================== */
.aeris-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;
}

.aeris-hover-lift {
    transition: all var(--transition-normal);
}

.aeris-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.aeris-hover-scale {
    transition: all var(--transition-normal);
}

.aeris-hover-scale:hover {
    transform: scale(1.05);
}

/* ========================================
   RESPONSIVE UTILITIES
======================================== */
@media (max-width: 640px) {
    .aeris-mobile-full {
        width: 100%;
        border-radius: 0;
    }
    
    .aeris-mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .aeris-no-print {
        display: none !important;
    }
    
    .aeris-print-only {
        display: block !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ========================================
   MD3 HIGH CONTRAST MODE SUPPORT
======================================== */
@media (prefers-contrast: high) {
    :root {
        --md-sys-color-outline: #000000;
        --md-sys-color-outline-variant: #000000;
    }
    
    .md-surface,
    .md-card,
    .aeris-glass,
    .aeris-glass-dark,
    .aeris-glass-strong,
    .aeris-card {
        background-color: var(--md-sys-color-surface) !important;
        border: 2px solid var(--md-sys-color-outline) !important;
        box-shadow: none !important;
    }
    
    .md-btn,
    .aeris-btn {
        border: 2px solid var(--md-sys-color-outline) !important;
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
    
    a[href^="#"] {
        scroll-behavior: smooth !important;
    }
}

/* ========================================
   ASPECT RATIOS (for older browser support)
======================================== */
.aeris-aspect-video {
    position: relative;
    padding-bottom: 56.25%;
}

.aeris-aspect-square {
    position: relative;
    padding-bottom: 100%;
}

.aeris-aspect-photo {
    position: relative;
    padding-bottom: 75%;
}

.aeris-aspect-video > *,
.aeris-aspect-square > *,
.aeris-aspect-photo > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    object-fit: cover;
}

/* ========================================
   MATERIA SLIDESHOW COMPONENT - Refined Design
======================================== */

/* Base slideshow container */
.materia-slideshow {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--md-sys-color-surface-container);
}

/* Header protection zone */
.materia-slideshow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 99;
    background: transparent;
}

/* Individual slides */
.materia-slide {
    position: absolute;
    inset: 0;
    transition: all var(--md-motion-duration-long2, 500ms) var(--md-motion-easing-emphasized, ease-out);
    pointer-events: none;
}

/* Content area */
.materia-slide-content {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.materia-slide-content * {
    pointer-events: auto;
}

/* Clean slideshow styles - no extra styling needed for new refined design */

/* Interactive elements should capture clicks */
.materia-slide a,
.materia-slide button,
.materia-slide-btn,
.materia-slide-nav {
    pointer-events: auto;
}

/* Responsive design */
@media (max-width: 640px) {
    .materia-slideshow::before {
        height: 64px;
    }
    
    .materia-slide-nav {
        padding: 0.75rem;
    }
    
    .materia-slide-nav.prev {
        left: 0.5rem;
    }
    
    .materia-slide-nav.next {
        right: 0.5rem;
    }
    
    .materia-slide-counter {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem 0.75rem;
    }
    
    .materia-slide-geometric {
        display: none;
    }
}
