/* =============================================
   FloatDeck — Premium Design System
   Senior UI/UX · CRO Optimized · Mobile-First
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Caveat:wght@700&display=swap');

/* ---- TOKENS ---- */
:root {
    --bg:             #080810;
    --bg-alt:         #0e0e1a;
    --surface:        #13131f;
    --surface-2:      #1a1a2e;
    --border:         rgba(255,255,255,0.07);
    --border-hover:   rgba(168,128,255,0.5);
    --text:           #f0f0ff;
    --text-dim:       #8888aa;
    --text-muted:     #55556a;
    --primary:        #a880ff;
    --primary-light:  #c2a3ff;
    --primary-glow:   rgba(168,128,255,0.35);
    --accent:         #56d8ff;
    --accent-glow:    rgba(86,216,255,0.25);
    --error:          #f87171;

    --radius-sm:  10px;
    --radius-md:  16px;
    --radius-lg:  24px;
    --radius-xl:  32px;

    --nav-h:     72px;
    --container: 1240px;
    --ease:      cubic-bezier(0.4,0,0.2,1);
    --speed:     0.25s;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 12px 40px rgba(124,58,237,0.25), 0 4px 16px rgba(0,0,0,0.5);
}

[data-theme="light"] {
    --bg:           #f8f8ff;
    --bg-alt:       #f0f0f8;
    --surface:      #ffffff;
    --surface-2:    #f0f0f8;
    --border:       rgba(0,0,0,0.08);
    --border-hover: rgba(109,40,217,0.4);
    --text:         #18181b;
    --text-dim:     #52525b;
    --text-muted:   #a1a1aa;
    --primary:      #6d28d9;
    --primary-light:#7c3aed;
    --primary-glow: rgba(109,40,217,0.2);
    --shadow-card:  0 4px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 40px rgba(109,40,217,0.15);
}

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

.hp-field { display: none !important; opacity: 0; pointer-events: none; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,h2,h3 { font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
p { color: var(--text-dim); }
a { text-decoration: none; }

/* =============================================
   NAV
   ============================================= */
.main-nav {
    height: var(--nav-h);
    position: sticky; top: 0; z-index: 200;
    background: rgba(8,8,16,0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background var(--speed) var(--ease);
}

[data-theme="light"] .main-nav {
    background: rgba(248,248,255,0.85);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--primary);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo svg { color: var(--primary); }
.logo-text {
    display: inline-flex;
    align-items: baseline;
    color: var(--primary);
}
.logo-text span { 
    color: var(--text); 
    font-weight: 800;
    margin-left: 1px;
}

.beta-tag {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: var(--text);
    transform: rotate(-10deg);
    margin-left: 4px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-selector {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--speed) var(--ease);
}
.lang-selector:hover { border-color: var(--primary); }

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: border-color var(--speed) var(--ease);
}
.theme-toggle:hover { border-color: var(--primary); }

/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    padding: 120px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 600px;
    background: radial-gradient(ellipse at center, rgba(124,58,237,0.18) 0%, transparent 65%);
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { opacity: 0.7; transform: translateX(-50%) scale(1); }
    to   { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

.hero-content {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(16,185,129,0.10));
    color: var(--primary-light);
    border: 1px solid rgba(124,58,237,0.3);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text);
    background: linear-gradient(150deg, var(--text) 40%, var(--primary-light) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 span {
    color: var(--primary-light);
    -webkit-text-fill-color: var(--primary-light);
}

.hero-sub {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

/* CTA Form */
.lead-form {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(124,58,237,0.08);
    transition: box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.lead-form:focus-within {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.lead-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 0;
}
.lead-form input::placeholder { color: var(--text-muted); }

.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 13px 26px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--speed) var(--ease),
                box-shadow var(--speed) var(--ease),
                filter var(--speed) var(--ease);
    position: relative;
    overflow: hidden;
}
.btn-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--speed) var(--ease);
    pointer-events: none;
}
.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow), 0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}
.btn-cta:hover::before { opacity: 1; }
.btn-cta:active { transform: translateY(0); }

.btn-cta-lg {
    font-size: 1rem;
    padding: 16px 40px;
    border-radius: var(--radius-xl);
}

.form-disclaimer {
    margin-top: 0.9rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   PROBLEM vs SOLUTION
   ============================================= */
.vs-section {
    padding: 100px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}
.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-light);
    margin-bottom: 0.8rem;
}

.vs-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.vs-divider {
    font-size: 2.5rem;
    color: var(--primary-light);
    text-align: center;
    opacity: 0.6;
}

.vs-card {
    background: var(--surface);
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.vs-card-icon { font-size: 2rem; margin-bottom: 1rem; }

.vs-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.vs-card.problem  { border-color: rgba(248,113,113,0.2); }
.vs-card.solution { border-color: rgba(16,185,129,0.3); }
.vs-card.solution h3 { color: var(--primary); }

/* =============================================
   PRODUCT SHOWCASE
   ============================================= */
.product-showcase {
    padding: 100px 0;
    background: var(--bg);
}

.showcase-mockup-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.browser-mockup-wrapper {
    perspective: 2000px;
}

.browser-mockup {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #1a1a1a;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.6);
}

.showcase-3d {
    transform: rotateY(-4deg) rotateX(2deg) scale(0.98);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.showcase-3d:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
    box-shadow: 0 40px 80px -15px rgba(0,0,0,0.8);
}

.browser-mockup::before {
    content: '';
    display: block;
    height: 32px;
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background-image:
        radial-gradient(circle at 12px 50%, #ff5f57 5px, transparent 5px),
        radial-gradient(circle at 28px 50%, #febc2e 5px, transparent 5px),
        radial-gradient(circle at 44px 50%, #28c840 5px, transparent 5px);
    background-repeat: no-repeat;
    z-index: 10;
    position: relative;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    background: #000;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =============================================
   FEATURES — clean 4-col grid
   ============================================= */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    cursor: default;
    transition:
        transform var(--speed) var(--ease),
        border-color var(--speed) var(--ease),
        box-shadow var(--speed) var(--ease);
    opacity: 0;
    transform: translateY(28px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.5s var(--ease),
        transform 0.5s var(--ease),
        border-color var(--speed) var(--ease),
        box-shadow var(--speed) var(--ease);
}

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

.icon-box {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(16,185,129,0.08));
    border: 1px solid rgba(124,58,237,0.2);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-dim);
}

/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials {
    padding: 100px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
    opacity: 0;
    transform: translateY(20px);
}
.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.testimonial-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.testimonial-card > p {
    font-size: 0.97rem;
    font-style: italic;
    line-height: 1.75;
    color: var(--text);
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.user-info strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   FINAL CTA SECTION
   ============================================= */
.final-cta {
    padding: 160px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.final-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(124,58,237,0.15) 0%, transparent 75%);
    pointer-events: none;
}
.final-cta h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.final-cta .hero-sub { font-size: 1.1rem; margin-bottom: 2.5rem; }
.final-cta .form-disclaimer { margin-bottom: 0; }

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 48px 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 40px;
    align-items: center;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-link-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.footer-link-btn:hover { color: var(--primary-light); border-color: var(--border-hover); }

.footer-copy {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* =============================================
   MODAL SYSTEM
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeOverlay 0.2s var(--ease);
}
.modal-overlay.open { display: flex; }

@keyframes fadeOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 48px 44px;
    position: relative;
    animation: slideModal 0.25s var(--ease);
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

@keyframes slideModal {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.modal-body p,
.modal-body li {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}
.modal-body ul { padding-left: 1.5rem; }

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
    line-height: 1;
}
.modal-close:hover { color: var(--text); border-color: var(--primary); }

/* =============================================
   SPINNER
   ============================================= */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   RESPONSIVE — MOBILE FIRST
   ============================================= */
@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero { padding: 80px 0 70px; }

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

    .browser-mockup {
        max-width: 100%;
    }

    .vs-grid {
        grid-template-columns: 1fr;
    }
    .vs-divider { font-size: 1.5rem; transform: rotate(90deg); }

    .lead-form {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 16px;
        gap: 12px;
    }
    .lead-form input {
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
    }
    .btn-cta { width: 100%; justify-content: center; }

    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-links { justify-content: center; }

    .modal-box { padding: 32px 24px; }
}
