/**
 * Front Page Styles
 * PRD Section 10.4.1: Front Page with Carrier Logo
 * Happy Hues Palette 14 - Dark Futuristic Theme
 */

:root {
    /* Happy Hues Palette 14 - Dark Futuristic Colors */
    --color-background: #16161a;
    --color-headline: #fffffe;
    --color-paragraph: #94a1b2;
    --color-button: #7f5af0;
    --color-button-hover: #6b47d6;
    --color-button-text: #fffffe;

    /* Accent Colors */
    --color-stroke: rgba(255, 255, 254, 0.1);
    --color-highlight: #7f5af0;
    --color-secondary: #72757e;
    --color-tertiary: #2cb67d;

    /* Dark theme background colors */
    --bg-primary: #16161a;
    --bg-secondary: #242629;
    --bg-tertiary: #2e3035;
    --bg-accent: rgba(127, 90, 240, 0.08);

    /* Text colors for dark theme */
    --text-primary: #fffffe;
    --text-secondary: #94a1b2;
    --text-muted: #72757e;
    --text-light: #fffffe;

    /* Accent gradients and glows */
    --accent-gradient: linear-gradient(135deg, #7f5af0, #2cb67d);
    --glow-color: rgba(127, 90, 240, 0.15);
    --border-light: rgba(255, 255, 254, 0.08);

    /* Shadows - Dark Theme */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(127, 90, 240, 0.15);
    --shadow-glow-strong: 0 0 30px rgba(127, 90, 240, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.33, 1, 0.68, 1);
    --transition-medium: 250ms cubic-bezier(0.33, 1, 0.68, 1);
    --transition-slow: 350ms cubic-bezier(0.33, 1, 0.68, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Headings use Space Grotesk */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* Landing Container */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-tertiary) 50%, var(--bg-primary) 100%);
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Purple and green glow orbs for dark futuristic theme */
.background-animation::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(127, 90, 240, 0.12) 0%, transparent 70%);
    animation: floatOrb 20s ease-in-out infinite;
}

.background-animation::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(44, 182, 125, 0.08) 0%, transparent 70%);
    animation: floatOrb 25s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* Floating letter/envelope animation */
.floating-letter {
    position: absolute;
    width: 10px;
    height: 8px;
    background: var(--color-highlight);
    opacity: 0.12;
    border-radius: 2px;
    animation: floatLetter 15s ease-in-out infinite;
}

.floating-letter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 4px solid var(--color-highlight);
    opacity: 0.8;
}

@keyframes floatLetter {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.06;
    }
    25% {
        transform: translateY(-40px) rotate(5deg);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-80px) rotate(-5deg);
        opacity: 0.08;
    }
    75% {
        transform: translateY(-40px) rotate(3deg);
        opacity: 0.12;
    }
}

/* Main Content */
.landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform var(--transition-medium);
    padding: 1rem;
}

.logo-container:hover {
    transform: scale(1.03);
}

.logo-container:hover .logo-glow {
    opacity: 1;
    transform: scale(1.1);
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 200px;
    transform: translate(-50%, -50%) scale(1);
    background: radial-gradient(ellipse, rgba(127, 90, 240, 0.2) 0%, transparent 70%);
    opacity: 0.6;
    transition: all var(--transition-medium);
    pointer-events: none;
    z-index: -1;
    filter: blur(30px);
}

.carrier-logo {
    width: 320px;
    height: auto;
    max-width: 90vw;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 15px rgba(127, 90, 240, 0.3));
}

.logo-container:hover .carrier-logo {
    filter: drop-shadow(0 8px 25px rgba(127, 90, 240, 0.45));
}

.tagline {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
}

/* CTA Section */
.cta-section {
    margin: 2.5rem 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--color-button);
    color: var(--color-button-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid rgba(127, 90, 240, 0.5);
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
    background: var(--color-button-hover);
}

.cta-button:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.cta-button:hover .arrow-icon {
    transform: translateX(4px);
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 2.5rem;
    margin: 1.5rem 0;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.quick-link:hover {
    color: var(--color-headline);
    background: rgba(127, 90, 240, 0.1);
}

.quick-link svg {
    width: 18px;
    height: 18px;
}

/* Divider */
.divider {
    width: 60%;
    max-width: 400px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(127, 90, 240, 0.4), rgba(44, 182, 125, 0.3), transparent);
    margin: 2rem 0;
    border-radius: 3px;
}

/* Mission */
.mission {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin-top: 1rem;
}

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 254, 0.08);
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

.feature:hover {
    background: var(--bg-tertiary);
    border-color: rgba(127, 90, 240, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(127, 90, 240, 0.15);
    border-radius: 14px;
    border: 1px solid rgba(127, 90, 240, 0.3);
    box-shadow: 0 0 15px rgba(127, 90, 240, 0.1);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-highlight);
}

.feature h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Page Transition - Carrier Morph Animation */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
}

.page-transition.active {
    animation: pageFadeOut 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 200ms;
}

@keyframes pageFadeOut {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Content fade during transition */
.landing-container.transitioning {
    animation: contentFadeBlur 600ms ease-out forwards;
}

@keyframes contentFadeBlur {
    0% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 0;
        filter: blur(8px);
    }
}

/* Logo Click Animation - Carrier Morph */
.logo-container.clicked .carrier-logo {
    animation: carrierMorph 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes carrierMorph {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
    30% {
        transform: scale(1.05) translate(0, -10px);
        opacity: 1;
    }
    100% {
        transform: scale(0.3) translate(calc(50vw - 160px), calc(-50vh + 50px));
        opacity: 0;
    }
}

/* Glow follows logo during animation */
.logo-container.clicked .logo-glow {
    animation: glowFade 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes glowFade {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .carrier-logo {
        width: 260px;
    }

    .tagline {
        font-size: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .quick-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .mission {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .carrier-logo {
        width: 220px;
    }

    .tagline {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    .landing-main {
        padding: 1rem;
    }

    .feature {
        padding: 1.5rem 1rem;
    }
}
