/**
 * Dobby-PI Landing Page Styles
 * Premium, futuristic, dark glassmorphism design.
 */

/* ============================================
   1. CSS VARIABLES & RESET
   ============================================ */

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

:root {
    --primary: #090a0f;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 240, 255, 0.3);
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.5);
    --accent-secondary: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-blur: blur(16px);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #000;
}

/* ============================================
   2. NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid transparent;
}

.navbar.nav-scrolled {
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: var(--glass-blur);
    padding: 1.25rem 4rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: #fff;
    text-transform: uppercase;
}

.nav-logo svg {
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    padding: 0.75rem 2.5rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-social a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
}

.nav-social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-cta {
    background: transparent;
    color: var(--accent);
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1) inset;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-cta:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ============================================
   3. HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    padding: 8rem 4rem 4rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
                rgba(9, 10, 15, 0.7) 0%, 
                rgba(9, 10, 15, 0.4) 50%, 
                var(--primary) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--border-highlight);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.headline {
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,240,255,0.1));
}

.subheadline-container {
    position: relative;
    height: 2.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.subheadline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.rotating-subheadline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(8px);
}

.rotating-subheadline.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.rotating-subheadline.exit {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(8px);
}

/* ============================================
   4. WAITLIST FORM
   ============================================ */

.form-container {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    padding: 0.5rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    max-width: 500px;
    margin: 0 auto;
    transition: border-color 0.3s;
}

.form-container:focus-within {
    border-color: var(--border-highlight);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.form-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: #fff;
    min-width: 0;
}

.form-container input::placeholder {
    color: var(--text-secondary);
}

.form-container button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--text-primary);
    color: var(--primary);
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-container button:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.02);
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    gap: 3rem;
    justify-content: center;
    margin-top: 4rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: var(--surface);
}

/* ============================================
   5. FEATURE BANNER
   ============================================ */
.feature-banner {
    width: 100%;
    padding: 4rem;
    background: var(--primary);
}

.banner-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.banner-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    pointer-events: none;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s;
}

.banner-container:hover .banner-image {
    transform: scale(1.02);
}

/* ============================================
   6. TECHNOLOGY SECTION
   ============================================ */

.technology {
    padding: 8rem 4rem;
    background: var(--primary);
    position: relative;
}

.technology::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.tech-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.tech-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.section-badge {
    display: inline-block;
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #bfaaff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.tech-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tech-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 3.5rem;
    font-weight: 300;
}

.tech-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
}

.feature {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature:hover {
    background: var(--surface-hover);
    border-color: var(--border-highlight);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1);
}

.feature-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Media Cards */
.tech-media {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.media-card {
    flex: 1;
    background: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.media-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 10;
    pointer-events: none;
}

.media-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 240, 255, 0.1);
}

.media-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform 0.6s;
}

.media-card:hover .media-image {
    transform: scale(1.05);
}

.media-label {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: var(--glass-blur);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.label-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============================================
   7. CTA SECTION
   ============================================ */

.cta-section {
    padding: 8rem 4rem;
    background: linear-gradient(135deg, #0f1322 0%, #06080a 100%);
    text-align: center;
    position: relative;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-input {
    padding: 1.25rem 2rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 1rem;
    min-width: 320px;
    outline: none;
    font-family: inherit;
    background: rgba(255,255,255,0.03);
    color: #fff;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s;
}

.cta-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.cta-button {
    padding: 1.25rem 3rem;
    background: var(--text-primary);
    color: var(--primary);
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-button:hover {
    background: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

/* ============================================
   8. FOOTER
   ============================================ */

.footer {
    padding: 4rem;
    background: var(--primary);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-copy {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   9. MODAL & TOAST
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--primary);
    padding: 4rem 3rem;
    border-radius: 32px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-highlight);
    position: relative;
    overflow: hidden;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Checkmark (customized for dark mode) */
.success-checkmark { width: 80px; height: 80px; margin: 0 auto 2.5rem; position: relative; }
.check-icon { width: 80px; height: 80px; position: relative; border-radius: 50%; border: 4px solid var(--accent); }
.check-icon::before, .check-icon::after { display:none; }
.check-icon .icon-line { height: 5px; background-color: var(--accent); display: block; border-radius: 2px; position: absolute; z-index: 10; }
.check-icon .icon-line.line-tip { top: 46px; left: 14px; width: 25px; transform: rotate(45deg); animation: icon-line-tip 0.75s; }
.check-icon .icon-line.line-long { top: 38px; right: 8px; width: 47px; transform: rotate(-45deg); animation: icon-line-long 0.75s; }
.check-icon .icon-circle { top: -4px; left: -4px; z-index: 10; width: 80px; height: 80px; border-radius: 50%; position: absolute; border: 4px solid rgba(0,240,255,0.2); }
@keyframes icon-line-tip { 0%, 54% { width: 0; left: 1px; top: 19px; } 70% { width: 50px; left: -8px; top: 37px; } 84% { width: 17px; left: 21px; top: 48px; } 100% { width: 25px; left: 14px; top: 46px; } }
@keyframes icon-line-long { 0%, 65% { width: 0; right: 46px; top: 54px; } 84% { width: 55px; right: 0px; top: 35px; } 100% { width: 47px; right: 8px; top: 38px; } }

.modal-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.modal-close {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 1rem 3rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

.error-toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 50, 50, 0.1);
    color: #ff4b4b;
    border: 1px solid rgba(255, 50, 50, 0.3);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 2rem;
    border-radius: 100px;
    z-index: 3000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}
.error-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-content { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 0.95rem; }

/* ============================================
   10. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .navbar { padding: 1rem 2rem; }
    .nav-links { display: none; }
    .hero { padding: 8rem 2rem 4rem; }
    .feature-banner { padding: 2rem; }
    
    .tech-features {
        grid-template-columns: 1fr;
    }

    .tech-media {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .headline { font-size: 3rem; }
    .subheadline { font-size: 1.25rem; }
    .form-container { flex-direction: column; border-radius: 24px; padding: 1rem; background: transparent; border: none; }
    .form-container input { padding: 1.25rem; border-radius: 100px; background: rgba(255,255,255,0.05); text-align: center; }
    .form-container button { justify-content: center; padding: 1.25rem; }
    .stats { flex-direction: column; gap: 2rem; }
    .stat-divider { width: 40px; height: 1px; }
    .cta-form { flex-direction: column; }
    .cta-input { min-width: auto; width: 100%; text-align: center;}
    .technology { padding: 4rem 2rem;}
}
