:root {
    /* Lytho App Theme Palette (from palette.dart) */
    /* Primary Brand Colors (Slate/Blue-Grey Family) */
    --primary-brand: #1E293B;
    /* Slate 800 */
    --primary-brand-light: #334155;
    /* Slate 700 */
    --primary-brand-dark: #0F172A;
    /* Slate 900 */

    /* Accent Colors (Electric Blue/Sky Family) */
    --accent: #0EA5E9;
    /* Sky 500 */
    --accent-light: #38BDF8;
    /* Sky 400 */
    --accent-dark: #0284C7;
    /* Sky 600 */

    /* Backgrounds */
    --bg-light: #F8FAFC;
    /* Slate 50 */
    --bg-dark-mode: #0F172A;
    /* Slate 900 */
    --surface-light: #FFFFFF;
    --surface-dark: #1E293B;
    /* Slate 800 */

    /* Semantic */
    --error: #EF4444;
    /* Red 500 */
    --success: #10B981;
    /* Emerald 500 */
    --warning: #F59E0B;
    /* Amber 500 */

    /* Text */
    --text-primary: #0F172A;
    /* Slate 900 */
    --text-secondary: #64748B;
    /* Slate 500 */
    --text-primary-dark: #F8FAFC;
    /* Slate 50 */
    --text-secondary-dark: #94A3B8;
    /* Slate 400 */

    /* Legacy Mappings to minimize initial diffs where possible, but overriding values */
    --bg-dark: var(--surface-light);
    --bg-card: var(--bg-light);
    --primary: var(--accent);
    /* Mapping old primary blue to new accent Sky */
    --primary-dark: var(--accent-dark);
    --secondary: var(--text-secondary);

    --text-main: var(--text-primary);
    --text-muted: var(--text-secondary);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque for better readability */
    --glass-border: rgba(148, 163, 184, 0.2);
    /* Slate 400 at 20% */

    /* Navbar */
    --nav-bg: rgba(15, 23, 42, 0.95);
    /* Slate 900 */
    --nav-text: #F8FAFC;

    --font-main: 'Outfit', sans-serif;
    --nav-height: 80px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
    /* Sky glow */
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for fixed navbar */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, white, var(--accent));
    /* Lighter gradient for dark mode */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 99px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--accent-dark);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    /* Visible on light & dark */
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: white;
    background: var(--accent);
}

.btn-lg {
    padding: 18px 48px;
    font-size: 1.125rem;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 10000;
    /* Increased z-index */
    background: var(--nav-bg);
    /* Use strict variable */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
}

.logo img {
    height: 40px;
    /* Constrain height */
    width: auto;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    /* Logo left, Links right */
    gap: 60px;
    /* Space between logo and links */
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-links {
    display: flex;
    /* Explicitly set flex */
    align-items: center;
}

.nav-links a {
    color: white !important;
    /* Force white text */
    font-weight: 500;
    margin-left: 32px;
    transition: color 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--accent) !important;
}

/* ... existing styles ... */

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    overflow: hidden;
    isolation: isolate;
    /* Create new stacking context */
    z-index: 1;
    background: var(--bg-dark-mode);
    /* Fallback */
}

/* Remove .glow-bg entirely implicitly by not styling it or ensuring it's hidden */
.glow-bg {
    display: none !important;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Deep background */
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* Gradient Overlay for Hero */
.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fix: Gradient should be dark overlay, not fading to white opaque */
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.9) 0%,
            rgba(15, 23, 42, 0.6) 100%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    padding: 0 20px;
}

.hero-text h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    /* Fix contrast issue */
}

.hero-text p {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Features Cards */
.card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 32px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(14, 165, 233, 0.3);
}

.icon-box {
    width: 64px;
    height: 64px;
    background: rgba(14, 165, 233, 0.1);
    /* Sky 100ish */
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--accent);
    font-size: 1.8rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-secondary);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* How It Helps / Workflows (Alternating Layouts) */
.alternating-section .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.alternating-section .row.reverse {
    direction: rtl;
}

.alternating-section .row.reverse>* {
    direction: ltr;
}

.row-content h3 {
    font-size: 2.25rem;
    margin-bottom: 20px;
}

.row-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.row-media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

.row-media img,
.row-media video {
    width: 100%;
    height: auto;
    display: block;
}

/* Pricing */
.pricing-card {
    background: white;
    border-radius: 32px;
    padding: 48px 32px;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
    /* Slight scale */
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-tag {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--accent);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 100px;
}

.plan-name {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-brand);
    margin-bottom: 32px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    transition: opacity 0.3s ease;
    /* Animate toggle transition */
}

.plan-price span {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.plan-features ul {
    margin-bottom: 40px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.plan-features li i {
    color: var(--success);
    font-size: 1.25rem;
}

.pricing-card .btn {
    width: 100%;
    margin-top: auto;
}

/* Animations (Scroll Reveal) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Responsive */
@media (max-width: 992px) {
    .alternating-section .row {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        direction: ltr !important;
        /* Reset logical order on mobile */
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .pricing-card.popular {
        transform: none;
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

/* Responsive */
@media (max-width: 992px) {
    /* ... */
}

.mobile-menu-btn {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu needed */
    }

    .mobile-menu-btn {
        display: block;
        /* Show on mobile */
        color: white;
        /* Ensure visible */
        cursor: pointer;
    }

    /* ... */

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.75rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .section {
        padding: 60px 0;
    }
}

/* Mobile Drawer Styles */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    /* Hidden */
    width: 300px;
    height: 100vh;
    background: var(--bg-dark-mode);
    z-index: 20000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    color: white;
}

.drawer-header .logo-text {
    font-weight: 700;
    font-size: 1.5rem;
}

.close-btn {
    cursor: pointer;
    color: white;
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.drawer-links a {
    color: var(--text-secondary-dark);
    font-size: 1.25rem;
    font-weight: 500;
    transition: color 0.2s;
}

.drawer-links a:hover {
    color: var(--accent);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10005;
    /* Below drawer, above nav */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Share Page & Modal */
.share-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.photo-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-item:hover {
    transform: scale(1.02);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.error-msg {
    color: var(--error);
    text-align: center;
    display: none;
    margin: 20px 0;
}

.loading-msg {
    color: var(--text-secondary);
    text-align: center;
    margin: 20px 0;
}

.label {
    font-size: 0.85em;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.value {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* --- New Design Elements (Refactor V2) --- */

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 24px;
}

.bento-item {
    background: var(--surface-light);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-xl);
    border-color: rgba(14, 165, 233, 0.4);
}

.bento-item img {
    width: 100%;
    /* Fill card width */
    height: auto;
    max-height: 400px;
    /* Allow larger images but prevent massive explosion */
    object-fit: cover;
    display: block;
    margin: 24px auto 0;
    border-radius: 12px;
}

.bento-span-4 {
    grid-column: span 4;
}

.bento-span-6 {
    grid-column: span 6;
}

.bento-span-8 {
    grid-column: span 8;
}

.bento-span-12 {
    grid-column: span 12;
}

/* Marquee (Infinite Scroll) */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: inline-flex;
    animation: marquee 40s linear infinite;
    gap: 80px;
    padding-left: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Assumes content is duplicated */
}

/* Glow Effects */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* Responsive Utilities */
.responsive-text {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
}

@media (max-width: 992px) {

    .bento-span-4,
    .bento-span-6,
    .bento-span-8 {
        grid-column: span 12;
        /* Stack on tablet */
    }
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
    /* Force scroll on small screens */
}

.comparison-table th,
.comparison-table td {
    padding: 24px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.comparison-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    background: var(--bg-light);
}

.comparison-table td:nth-child(2) {
    color: var(--error);
    opacity: 0.7;
    background: #FEF2F2;
    /* Subtle red bg */
}

.comparison-table td:nth-child(3) {
    color: var(--success);
    font-weight: 700;
    background: #ECFDF5;
    /* Subtle green bg */
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 900;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Newsletter Input */
.newsletter-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.newsletter-input {
    padding: 16px 24px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 300px;
    backdrop-filter: blur(4px);
    font-family: var(--font-main);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

/* Error Message */
.error-msg {
    color: var(--error);
    text-align: center;
    background: #FEF2F2;
    border: 1px solid var(--error);
    padding: 16px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
    display: none;
}