/* CSS Reset & Variables */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-primary: #333333;
    --color-accent: #3b82f6;
    --color-gold-start: #FFD700;
    --color-gold-end: #FDB931;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --backdrop-blur: blur(10px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: auto;
    /* Let JS handle smoothing */
    font-size: 16px;
    height: 100%;
    /* scroll-snap-type removed */
}


body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100%;
    overflow-y: scroll;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Background */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Navigation - Top Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    /* Slightly taller for bigger logos */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    /* Extremely transparent background (12% opacity is 60% less than 30%) */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: background 0.4s ease, height 0.4s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    height: 80px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo-img {
    height: 68px;
    /* ~50% bigger than 45px */
    width: auto;
    transition: all 0.3s ease;
    /* Strong drop shadow for visibility */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.logo-text {
    height: 52px;
    /* Proportional increase */
}

/* Nav Link Styling */
.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: white;
    position: relative;
    /* Strong text shadow for visibility */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.navbar.scrolled .nav-link {
    color: var(--color-primary);
    text-shadow: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.navbar.scrolled .nav-link::after {
    background-color: var(--color-primary);
    box-shadow: none;
}

.nav-link:hover::after {
    width: 100%;
}

/* Sections */
.section {
    min-height: 100vh;
    padding: 120px 5%;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Section 1: Hero */
.section-hero {
    background: transparent;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeUp 0.8s ease-out;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero-text {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-cta {
    display: inline-block;
    padding: 1.2rem 3rem;
    /* Fancy Gold Gradient */
    background: radial-gradient(ellipse at center, #ffd700 0%, #fdb931 100%);
    background-size: 150% 150%;
    color: #41300b;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 50px;
    /* Rich gold shadows */
    box-shadow:
        0 10px 20px -5px rgba(253, 185, 49, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 30px -5px rgba(253, 185, 49, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: brightness(1.1);
}

.hero-image-container {
    flex: 1.2;
    /* Changed from fadeLeft to fadeIn for subtle appearance */
    animation: fadeIn 1.5s ease-out 0.2s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-ui-preview {
    /* Styles now handled by .hero-image-container or reset below */
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

/* Removed old hover rule */

/* Section 2: About - UPGRADED & EXPANDED */
/* Section 2: About - PREMIUM LIGHT OVERHAUL (COMPACT) */
.section-about {
    /* Subtle, expensive-looking light background with mesh-like gradient */
    background:
        radial-gradient(circle at 10% 20%, rgba(240, 248, 255, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 240, 245, 0.8) 0%, transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    position: relative;
    overflow: hidden;
    padding: 60px 5%;
    /* Significantly reduced padding */
    flex-direction: column;
    justify-content: center;
}

/* Subtle decorative glow elements */
.section-about::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.about-header {
    text-align: center;
    margin-bottom: 2.5rem;
    /* Reduced from 5rem */
    z-index: 1;
    position: relative;
}

.about-title-main {
    font-size: 3.5rem;
    /* Reduced from 4.5rem */
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    color: #0f172a;
    /* Deep charcoal/navy */
    /* Subtle text gradient for polish */
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-subtitle {
    font-size: 1.4rem;
    /* Reduced from 1.8rem */
    font-weight: 500;
    color: #64748b;
    /* Slate gray styling */
    max-width: 800px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    /* Reduced from 2.5rem */
    width: 100%;
    max-width: 1200px;
    /* Tighter container */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-card {
    background: rgba(255, 255, 255, 0.7);
    /* Glass-ish base */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    /* Smooth corners */
    padding: 1.75rem 1.5rem;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.75rem;
    /* Reduced gap */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 20px 40px -4px rgba(0, 0, 0, 0.04);
    /* Expensive soft shadow */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: auto;
    /* Remove fixed min-height */
}

/* Subtle hover interaction */
.about-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 15px 20px -5px rgba(0, 0, 0, 0.05),
        /* Deeper shadow */
        0 30px 50px -10px rgba(99, 102, 241, 0.1);
    /* Hint of color in shadow */
}

/* Remove old pseudo-elements if they conflict, or refine them */
.about-card::before {
    display: none;
}

/* Card Content Styling */
.card-icon {
    margin-bottom: 0.25rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Clean, icon-only look or minimal background */
    background: transparent;
    border-radius: 12px;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    stroke: #1e293b;
    /* Dark Slate / Black */
    stroke-width: 1.5;
}

.highlight-card .card-icon svg {
    /* Optional: make the diamond slightly special? Or keep uniform black */
    stroke: #1e293b;
}

.card-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.about-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
    background: none;
    -webkit-text-fill-color: initial;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

/* Specific Highlight for the "Lifetime" card */
.about-card.highlight-card {
    background: linear-gradient(145deg, #ffffff 0%, #fdfbf7 100%);
    border: 1px solid rgba(253, 186, 116, 0.2);
    /* Subtle gold hint */
}

.about-card.highlight-card .card-icon {
    background: white;
}

/* Section 3: Features */
.section-features {
    background-color: white;
    align-items: flex-start;
    padding-top: 140px;
}

.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-column h2 {
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

.feature-item {
    margin-bottom: 3rem;
    padding-left: 20px;
    border-left: 2px solid #eee;
    transition: border-left-color 0.3s;
}

.feature-item:hover {
    border-left-color: var(--color-accent);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--color-primary);
}

.feature-item p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Highlighted story text */
.story-example {
    font-family: var(--font-primary);
    font-style: italic;
    color: #4b5563;
    background: #f8fafc;
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent);
    margin-top: 1rem;
    border-radius: 0 8px 8px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Footer */
.footer {
    padding: 2rem 5%;
    text-align: center;
    background: white;
    border-top: 1px solid #eee;
    color: var(--color-text-light);
    font-size: 0.9rem;
    scroll-snap-align: end;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    z-index: 2000;
    /* Above everything */
}

.bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .bar {
    background-color: var(--color-primary);
}

/* Hamburger Animation active state */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* Responsive */
@media (max-width: 1200px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .section-hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }

    .hero-image-container {
        width: 80%;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .features-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-logo-img {
        height: 50px;
        /* Resize back down for mobile */
    }

    .logo-text {
        height: 38px;
    }

    /* Mobile Side Panel logic */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 1500;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-link {
        color: var(--color-primary);
        /* Dark text on mobile panel */
        font-size: 1.5rem;
        text-shadow: none;
    }

    .nav-link::after {
        background-color: var(--color-primary);
    }
}

/* Video Modal Styles - REDESIGNED for 3D Fix */
.hero-image-container {
    position: relative;
    cursor: pointer;
    /* Move visual styles here */
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: perspective(1000px) rotateY(-6deg) rotateX(4deg);
    transition: transform 0.5s ease;
    /* Ensure content stays inside (including overlay) */
    overflow: hidden;
    /* Fix for Safari 3D overflow clipping */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.hero-ui-preview {
    display: block;
    width: 100%;
    height: auto;
    /* Remove individual transforms/shadows */
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.hero-image-container:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0) scale(1.02) translateY(-10px);
}

.hero-image-container:hover .hero-ui-preview {
    transform: none;
    /* Override old rule */
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Start transparent */
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(3px);
}

.hero-image-container:hover .play-button-overlay {
    opacity: 1;
}

.play-button-overlay svg {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    transform: scale(0.8) translateY(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.hero-image-container:hover .play-button-overlay svg {
    transform: scale(1) translateY(0);
    fill: #ffffff;
    opacity: 1;
}


/* Modal Overlay */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 3000;
    /* Above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 2rem;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    background: transparent;
    border-radius: 12px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.video-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    line-height: 1;
}

.modal-close:hover {
    opacity: 1;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: black;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Documentation Page Styles */
.docs-container {
    display: block;
    /* Layout to support fixed sidebar */
    max-width: 1400px;
    margin: 120px auto 0;
    padding: 2rem 5%;
    min-height: 100vh;
}

.docs-sidebar {
    position: fixed;
    top: 130px;
    /* Increased to prevent overlap with navbar */
    left: 5%;
    /* Align with container padding */
    width: 250px;
    height: calc(100vh - 150px);
    /* Adjusted height */
    overflow-y: auto;
    padding-right: 1rem;
    padding-top: 1rem;
    /* Added internal spacing */
    border-right: 1px solid #e2e8f0;
    /* Prevent scroll chaining */
    overscroll-behavior: contain;
    z-index: 10;
}

.docs-content {
    margin-left: 290px;
    /* Width + Gap */
    max-width: 900px;
}

/* Specific nav layout for docs */
.docs-navbar .nav-links {
    margin-left: 0;
    margin-right: auto;
    justify-content: flex-start;
}

.docs-nav-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.docs-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-list li {
    margin-bottom: 0.5rem;
}

.docs-nav-link {
    display: block;
    padding: 0.5rem 0.8rem;
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.docs-nav-link:hover,
.docs-nav-link.active {
    background: #f1f5f9;
    color: var(--color-primary);
    font-weight: 500;
}

.docs-submenu {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    display: none;
    /* Collapsed by default */
}

.docs-nav-link.expanded+.docs-submenu {
    display: block;
}

/* Content Styles */
.docs-content {
    flex: 1;
    max-width: 800px;
}

.doc-section {
    margin-bottom: 5rem;
    scroll-margin-top: 100px;
    /* Clear fixed navbar */
}

.doc-article {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.docs-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text-dark);
}

.docs-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-dark);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.docs-content h3 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.docs-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.docs-content p,
.docs-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
}

.note-block {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    color: #78350f;
}

.note-block.important {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.tool-list li strong {
    color: var(--color-primary);
}

/* Mobile Docs responsiveness */
@media (max-width: 968px) {
    .docs-container {
        flex-direction: column;
        margin-top: 60px;
        gap: 2rem;
    }

    .docs-sidebar {
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 1rem;
    }
}