/* ===================================
   🌸 Flowers For Her - Design System
   =================================== */

/* -------------------- Fonts -------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300&family=Inter:wght@300;400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* -------------------- CSS Variables -------------------- */
:root {
    /* Colors */
    --color-primary: #B76E79;
    --color-primary-light: #D4939C;
    --color-primary-dark: #8B4F57;
    --color-secondary: #FAD4D4;
    --color-secondary-light: #FFF0F0;
    --color-accent: #9CAF88;
    --color-accent-light: #C5D4B8;
    --color-background: #FFF8F0;
    --color-background-alt: #FDF5ED;
    --color-text: #2C2C2C;
    --color-text-light: #5A5A5A;
    --color-text-muted: #8A8A8A;
    --color-white: #FFFFFF;
    --color-black: #1A1A1A;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Cormorant Garamond', 'Times New Roman', serif;

    /* Font Sizes - Fluid */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 2vw, 3rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 4rem);
    --text-5xl: clamp(3rem, 2rem + 4vw, 5.5rem);

    /* 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;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-soft: 0 2px 15px rgba(183, 110, 121, 0.1);
    --shadow-medium: 0 4px 25px rgba(183, 110, 121, 0.15);
    --shadow-strong: 0 8px 40px rgba(183, 110, 121, 0.2);
    --shadow-glow: 0 0 30px rgba(183, 110, 121, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-slower: 800ms ease;

    /* Z-index layers */
    --z-background: -1;
    --z-base: 0;
    --z-elevated: 10;
    --z-overlay: 100;
    --z-modal: 1000;
    --z-top: 9999;
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
}

/* -------------------- Typography -------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

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

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

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

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

@media (max-width: 576px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* -------------------- Buttons -------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
    /* Touch-friendly */
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

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

/* -------------------- Navigation (Flower Pages) -------------------- */
.page-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-overlay);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.page-nav>* {
    pointer-events: auto;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all var(--transition-base);
    min-height: 40px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.3);
}

.back-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* -------------------- Flower Page Layout -------------------- */
.flower-page {
    position: fixed;
    inset: 0;
    background: #000;
}

.flower-canvas {
    position: absolute;
    inset: 0;
    z-index: var(--z-base);
}

.flower-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-elevated);
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: var(--color-white);
    text-align: center;
}

.flower-info h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.02em;
}

.flower-info p {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    max-width: 400px;
    margin: 0 auto;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* -------------------- Loading Overlay -------------------- */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    transition: opacity var(--transition-slower), visibility var(--transition-slower);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-flower {
    width: 60px;
    height: 60px;
    position: relative;
}

.loading-flower::before {
    content: '🌸';
    font-size: 48px;
    position: absolute;
    animation: loadingSpin 2s ease-in-out infinite;
    filter: grayscale(30%);
}

@keyframes loadingSpin {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* -------------------- Animations -------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) ease forwards;
}

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

/* -------------------- Responsive Utilities -------------------- */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: block;
    }
}

/* -------------------- Scrollbar -------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* -------------------- Selection -------------------- */
::selection {
    background: var(--color-secondary);
    color: var(--color-primary-dark);
}

/* -------------------- Focus States -------------------- */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* -------------------- Print -------------------- */
@media print {

    .page-nav,
    .loading-overlay {
        display: none;
    }
}