/* styles.css - Lovelace App style landing page
 * Author: Christophe Hugon, behalf of Lovelace */

:root {
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --brand-orange: #e65e0b;
    --brand-orange-hover: #cf5206;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Loading Screen Overlay (Light mode to match the theme) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.6s;
}

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

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

.spinner-ring {
    width: 70px;
    height: 70px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--brand-orange);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    margin: 0 auto 25px auto;
}

.spinner-core {
    width: 44px;
    height: 44px;
    border: 3px solid transparent;
    border-top: 3px solid var(--text-secondary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite reverse;
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.6rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.loading-text .letter {
    display: inline-block;
    animation: pulseLetter 1.6s ease-in-out infinite;
}

/* Stagger letters load */
.loading-text .letter:nth-child(1) { animation-delay: 0.0s; }
.loading-text .letter:nth-child(2) { animation-delay: 0.1s; }
.loading-text .letter:nth-child(3) { animation-delay: 0.2s; }
.loading-text .letter:nth-child(4) { animation-delay: 0.3s; }
.loading-text .letter:nth-child(5) { animation-delay: 0.4s; }
.loading-text .letter:nth-child(6) { animation-delay: 0.5s; }
.loading-text .letter:nth-child(7) { animation-delay: 0.6s; }
.loading-text .letter:nth-child(8) { animation-delay: 0.7s; }

.loading-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05rem;
    animation: pulseSub 1.8s ease-in-out infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@keyframes pulseLetter {
    0%, 100% { transform: scale(1); color: var(--text-primary); }
    50% { transform: scale(1.15); color: var(--brand-orange); }
}

@keyframes pulseSub {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Layout container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2.5rem;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header style */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-symbol {
    color: var(--brand-orange);
    animation: pulseSymbol 3s ease-in-out infinite alternate;
}

.logo-text {
    color: var(--text-primary);
}

.header-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #ffffff;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

@keyframes pulseSymbol {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.15) rotate(90deg); }
}

/* Page content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seo-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* Scene layout */
.scene-wrapper {
    width: 100%;
    max-width: 850px;
    height: 55vh;
    min-height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scene-wrapper:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 94, 11, 0.3);
    box-shadow: 0 15px 35px rgba(230, 94, 11, 0.06), 0 20px 40px rgba(0, 0, 0, 0.04);
}

#lovecloud-svg {
    width: 96%;
    height: 96%;
    object-fit: contain;
}

/* CTA layout */
.cta-container {
    text-align: center;
    max-width: 550px;
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 1;
    transform: translateY(0);
}

.cta-container.hidden {
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
}

.cta-message {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.cta-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 1.1rem 2.8rem;
    background-color: var(--brand-orange);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(230, 94, 11, 0.3);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-button:hover {
    background-color: var(--brand-orange-hover);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(230, 94, 11, 0.45);
}

.cta-button:active {
    transform: scale(0.98);
}

.btn-text {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}

.cta-button-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 1.1rem 2.8rem;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-button-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
    transform: scale(1.03);
}

.cta-button-secondary:active {
    transform: scale(0.98);
}

.btn-text-secondary {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Footer layout */
.app-footer {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
    margin-top: 2rem;
}

.app-footer p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-container {
        padding: 1.5rem;
    }
    .app-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    .scene-wrapper {
        height: 42vh;
        min-height: 320px;
    }
    .cta-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    .cta-button, .cta-button-secondary {
        padding: 1rem 2rem;
        width: 100%;
    }
}
