/**
 * EquiPlanner - Liquid Glass Design System
 * Shared styles for the 2026 glass aesthetic
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    /* Glass surfaces */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: rgba(0, 0, 0, 0.04);
    --surface-subtle: rgba(255, 255, 255, 0.7);

    /* Typography */
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.55);
    --text-tertiary: rgba(26, 26, 26, 0.35);

    /* Accent */
    --accent: #1a1a1a;
    --accent-hover: #000;

    /* Timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-normal: 0.3s;
    --duration-slow: 0.8s;
}

/* ==========================================================================
   Base Reset & Body
   ========================================================================== */

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

html, body {
    height: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, #e8e4e0 0%, #f5f3f0 25%, #e0e8ec 50%, #f0ece8 75%, #e4e0e8 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ==========================================================================
   Floating Orbs (Background Depth)
   ========================================================================== */

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    animation: float 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(200, 180, 160, 0.4);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(160, 180, 200, 0.35);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(180, 160, 180, 0.3);
    top: 50%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==========================================================================
   Glass Container
   ========================================================================== */

.glass-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 48px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 4px 24px var(--glass-shadow),
        0 1px 1px rgba(255, 255, 255, 0.8) inset;
    text-align: center;
    animation: fadeUp var(--duration-slow) var(--ease-out-expo) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.glass-container--large {
    max-width: 440px;
    padding: 56px 44px;
    border-radius: 36px;
}

/* ==========================================================================
   Entrance Animation
   ========================================================================== */

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

.fade-up {
    animation: fadeUp var(--duration-slow) var(--ease-out-expo) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.fade-up--delay-1 { animation-delay: 0.1s; }
.fade-up--delay-2 { animation-delay: 0.15s; }
.fade-up--delay-3 { animation-delay: 0.2s; }
.fade-up--delay-4 { animation-delay: 0.25s; }
.fade-up--delay-5 { animation-delay: 0.3s; }
.fade-up--delay-6 { animation-delay: 0.35s; }
.fade-up--delay-7 { animation-delay: 0.4s; }

/* ==========================================================================
   Logo
   ========================================================================== */

.logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 32px;
    background: var(--surface-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.logo--large {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    font-size: 44px;
    margin-bottom: 28px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.title--large {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 36px;
}

.tagline {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.description {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.footer {
    margin-top: 32px;
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out-expo);
    background: var(--accent);
    color: white;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Secondary button */
.btn--secondary {
    background: var(--surface-subtle);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Ghost button */
.btn--ghost {
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Disabled / Coming soon */
.btn--disabled,
.btn--coming-soon {
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: default;
}

.btn--disabled:hover,
.btn--coming-soon:hover {
    transform: none;
    box-shadow: none;
}

/* Button group */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

.divider span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Feature Tags
   ========================================================================== */

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.feature {
    background: var(--surface-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.feature:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   QR Code Section
   ========================================================================== */

.qr-section {
    display: none;
}

.qr-section.visible {
    display: block;
}

.qr-section p {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.qr-code {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.qr-code img {
    display: block;
}

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

.hide {
    display: none !important;
}

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

/* ==========================================================================
   State Classes
   ========================================================================== */

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

/* ==========================================================================
   Mobile Adjustments
   ========================================================================== */

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .glass-container {
        padding: 40px 28px;
        border-radius: 28px;
    }

    .glass-container--large {
        padding: 44px 28px;
    }

    .logo {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        font-size: 32px;
        margin-bottom: 28px;
    }

    .logo--large {
        width: 76px;
        height: 76px;
        border-radius: 20px;
        font-size: 38px;
        margin-bottom: 24px;
    }

    .title {
        font-size: 20px;
    }

    .title--large {
        font-size: 28px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 32px;
    }

    .tagline {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .description {
        font-size: 13px;
        margin-bottom: 32px;
    }

    .features {
        gap: 6px;
        margin-bottom: 32px;
    }

    .feature {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    body {
        animation: none;
        background-position: 0% 50%;
    }

    .orb {
        animation: none;
    }
}
