/* ========================================
   Away E-Commerce - Global Styles
   ======================================== */

/* Import Plus Jakarta Sans font */
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayBlack.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayBlackItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayBold.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayBoldItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayLight.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayLightItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayMedium.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayMediumItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayRoman.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayRomanItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayThin.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayThinItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayXThin.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayXThinItalic.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayXXThin.ttf');
@import url('/static/fonts/neue-haas-grotesk/NeueHaasDisplayXXThinItalic.ttf');
@import url('animations.css');

/* CSS Custom Properties - Light Mode (Default) */
:root {
    /* Primary Colors (Monochrome) */
    --color-primary: #000000;
    --color-primary-hover: #111111;
    --color-primary-light: #f5f5f5;
    --color-primary-dark: #000000;

    /* Secondary Colors (Monochrome) */
    --color-secondary: #000000;
    --color-secondary-hover: #111111;
    --color-secondary-light: #f5f5f5;

    /* Accent Colors (Monochrome) */
    --color-accent: #000000;
    --color-accent-hover: #222222;
    --color-accent-light: #f5f5f5;

    /* Status Colors (semantic, shared across all themes) */
    --color-success: #16a34a;
    --color-success-light: #dcfce7;
    --color-error: #dc2626;
    --color-error-light: #fee2e2;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-info: #2563eb;
    --color-info-light: #dbeafe;

    /* Background Colors (Black & White) */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f5f5f5;
    --color-bg-tertiary: #e5e5e5;
    --color-bg-elevated: #ffffff;
    --color-bg-overlay: rgba(0, 0, 0, 0.5);

    /* Text Colors (Black & Gray) */
    --color-text-primary: #000000;
    --color-text-secondary: #262626;
    --color-text-tertiary: #737373;
    --color-text-muted: #a3a3a3;
    --color-text-inverse: #ffffff;

    /* Border Colors (Gray scale) */
    --color-border: #e5e5e5;
    --color-border-hover: #d4d4d4;
    --color-border-focus: #000000;

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

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

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

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

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* CSS Custom Properties - Dark Mode (Monochrome) */
[data-theme="dark"],
.dark {
    /* Primary Colors */
    --color-primary: #ffffff;
    --color-primary-hover: #e5e5e5;
    --color-primary-light: #fafafa;
    --color-primary-dark: #d4d4d4;

    /* Secondary Colors */
    --color-secondary: #ffffff;
    --color-secondary-hover: #e5e5e5;
    --color-secondary-light: #fafafa;

    /* Accent Colors */
    --color-accent: #ffffff;
    --color-accent-hover: #e5e5e5;
    --color-accent-light: #fafafa;

    /* Status Colors (semantic, same as light theme) */
    --color-success: #16a34a;
    --color-success-light: #dcfce7;
    --color-error: #dc2626;
    --color-error-light: #fee2e2;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-info: #2563eb;
    --color-info-light: #dbeafe;

    /* Background Colors */
    --color-bg-primary: #000000;
    --color-bg-secondary: #050505;
    --color-bg-tertiary: #111111;
    --color-bg-elevated: #050505;
    --color-bg-overlay: rgba(0, 0, 0, 0.7);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e5e5e5;
    --color-text-tertiary: #a3a3a3;
    --color-text-muted: #737373;
    --color-text-inverse: #000000;

    /* Border Colors */
    --color-border: #262626;
    --color-border-hover: #404040;
    --color-border-focus: #ffffff;

    /* Shadow (subtle in dark mode) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.7), 0 2px 4px -2px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.7);
}

/* System preference based dark mode (Monochrome) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Primary Colors (Monochrome) */
        --color-primary: #ffffff;
        --color-primary-hover: #e5e5e5;
        --color-primary-light: #fafafa;
        --color-primary-dark: #d4d4d4;

        /* Secondary Colors (Monochrome) */
        --color-secondary: #ffffff;
        --color-secondary-hover: #e5e5e5;
        --color-secondary-light: #fafafa;

        /* Accent Colors (Monochrome) */
        --color-accent: #ffffff;
        --color-accent-hover: #e5e5e5;
        --color-accent-light: #fafafa;

        /* Status Colors (semantic, same as light theme) */
        --color-success: #16a34a;
        --color-success-light: #dcfce7;
        --color-error: #dc2626;
        --color-error-light: #fee2e2;
        --color-warning: #f59e0b;
        --color-warning-light: #fef3c7;
        --color-info: #2563eb;
        --color-info-light: #dbeafe;

        /* Background Colors */
        --color-bg-primary: #000000;
        --color-bg-secondary: #050505;
        --color-bg-tertiary: #111111;
        --color-bg-elevated: #050505;
        --color-bg-overlay: rgba(0, 0, 0, 0.7);

        /* Text Colors */
        --color-text-primary: #ffffff;
        --color-text-secondary: #e5e5e5;
        --color-text-tertiary: #a3a3a3;
        --color-text-muted: #737373;
        --color-text-inverse: #000000;

        /* Border Colors */
        --color-border: #262626;
        --color-border-hover: #404040;
        --color-border-focus: #ffffff;

        /* Shadow (subtle in dark mode) */
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.7), 0 2px 4px -2px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.7);
    }
}

/* ========================================
   Base Styles
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {

    /* Lenis Smooth Scroll Recommended CSS */
    html.lenis,
    html.lenis body {
        height: auto;
    }

    .lenis.lenis-smooth {
        scroll-behavior: auto !important;
    }

    .lenis.lenis-smooth [data-lenis-prevent] {
        overscroll-behavior: contain;
    }

    .lenis.lenis-stopped {
        overflow: hidden;
    }

    .lenis.lenis-scrolling iframe {
        pointer-events: none;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.5;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbar - Thin (only thumb) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #9ca3af transparent;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Text utilities */
.text-primary {
    color: var(--color-text-primary);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

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

/* Background utilities */
.bg-primary {
    background-color: var(--color-bg-primary);
}

.bg-secondary {
    background-color: var(--color-bg-secondary);
}

.bg-tertiary {
    background-color: var(--color-bg-tertiary);
}

.bg-elevated {
    background-color: var(--color-bg-elevated);
}

/* ========================================
   Shared Hover Effects
   ======================================== */

/* Shine + zoom effect for highlight media (reusable) */
.highlight-media {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 650ms ease, box-shadow 650ms ease;
}

.highlight-media img {
    transition: transform 650ms ease;
}

.highlight-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, 0.45) 50%,
            rgba(255, 255, 255, 0) 70%);
    transform: translateX(-120%);
    transition: transform 750ms ease;
    pointer-events: none;
}

.highlight-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.0));
    opacity: 0;
    transition: opacity 650ms ease;
    pointer-events: none;
    z-index: 1;
}

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

.highlight-card:hover .highlight-media {
    box-shadow: var(--shadow-md);
}

.highlight-card:hover .highlight-media::after {
    transform: translateX(120%);
}

.highlight-card:hover .highlight-media::before {
    opacity: 1;
}

/* ========================================
   Button Overrides (Basecoat integration)
   ======================================== */

/* Ensure Basecoat buttons inherit our font */
.btn,
button.btn {
    font-family: inherit;
}

/* Primary button uses info color so it stands out on both themes */
.btn-primary {
    background-color: var(--color-info) !important;
    border-color: var(--color-info) !important;
    color: #ffffff !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--color-info) !important;
    border-color: var(--color-info) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .btn-primary,
.dark .btn-primary {
    background-color: var(--color-info) !important;
    border-color: var(--color-info) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-primary:hover,
.dark .btn-primary:hover {
    background-color: var(--color-info) !important;
    border-color: var(--color-info) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* System preference dark mode button text */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-primary {
        color: #ffffff !important;
    }

    :root:not([data-theme="light"]) .btn-primary:hover {
        color: #ffffff !important;
    }
}

/* ========================================
   Theme Toggle (positioning & icon visibility)
   ======================================== */

.theme-toggle-wrapper {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: var(--z-fixed);
}

/* Minimal icon-only theme toggle button (no Basecoat styles) */
.theme-toggle-button {
    border: none;
    background: transparent;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    cursor: pointer;
    box-shadow: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle-button:hover {
    color: var(--color-primary);
    transform: translateY(-1px);
}

.theme-toggle-button svg,
.theme-toggle-button i {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Icon visibility based on theme */
/* Target both original elements and Lucide-generated SVGs */
.theme-toggle-button .icon-sun,
.theme-toggle-button [data-lucide="sun"],
.theme-toggle-button [data-icon="sun"] {
    display: none;
}

.theme-toggle-button .icon-moon,
.theme-toggle-button [data-lucide="moon"],
.theme-toggle-button [data-icon="moon"] {
    display: block;
}

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .theme-toggle-button .icon-sun,
[data-theme="dark"] .theme-toggle-button [data-lucide="sun"],
[data-theme="dark"] .theme-toggle-button [data-icon="sun"],
.dark .theme-toggle-button .icon-sun,
.dark .theme-toggle-button [data-lucide="sun"],
.dark .theme-toggle-button [data-icon="sun"] {
    display: block !important;
}

[data-theme="dark"] .theme-toggle-button .icon-moon,
[data-theme="dark"] .theme-toggle-button [data-lucide="moon"],
[data-theme="dark"] .theme-toggle-button [data-icon="moon"],
.dark .theme-toggle-button .icon-moon,
.dark .theme-toggle-button [data-lucide="moon"],
.dark .theme-toggle-button [data-icon="moon"] {
    display: none !important;
}

/* System preference dark mode */
@media (prefers-color-scheme: dark) {

    :root:not([data-theme="light"]) .theme-toggle-button .icon-sun,
    :root:not([data-theme="light"]) .theme-toggle-button [data-lucide="sun"],
    :root:not([data-theme="light"]) .theme-toggle-button [data-icon="sun"] {
        display: block !important;
    }

    :root:not([data-theme="light"]) .theme-toggle-button .icon-moon,
    :root:not([data-theme="light"]) .theme-toggle-button [data-lucide="moon"],
    :root:not([data-theme="light"]) .theme-toggle-button [data-icon="moon"] {
        display: none !important;
    }
}