/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- LIGHT / DARK VARIABLES ---------- */
body.light {
    --bg: #ffffff;
    --bg-rgb: 255, 255, 255;
    --text: #111111;
    --text-soft: #5f5f5f;
    --card-bg: rgba(255, 255, 255, 0.6);
    --border: rgba(229, 229, 229, 0.5);
    --primary: #000000;
    --primary-rgb: 0, 0, 0;
    --primary-hover: #2a2a2a;
    --sidebar-bg: rgba(250, 250, 250, 0.6);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --selection-bg: #000000;
    --selection-text: #ffffff;
    --dropdown-bg: rgba(255, 255, 255, 0.8);
    --dropdown-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.02);
    --card-shadow: 0 4px 12px rgba(0,0,0,0.02);
    --card-hover-shadow: 0 8px 24px rgba(0,0,0,0.05);
    --chat-own-bg: rgba(0,0,0,0.05);
    --chat-other-bg: rgba(255,255,255,0.8);
    --modal-bg: rgba(0, 0, 0, 0.4);
    --step-bg: rgba(0,0,0,0.03);
}

body.dark {
    --bg: #1a1a1a;
    --bg-rgb: 26, 26, 26;
    --text: #ededed;
    --text-soft: #a0a0a0;
    --card-bg: rgba(42, 42, 42, 0.6);
    --border: rgba(61, 61, 61, 0.5);
    --primary: #ffffff;
    --primary-rgb: 255, 255, 255;
    --primary-hover: #d9d9d9;
    --sidebar-bg: rgba(34, 34, 34, 0.6);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --selection-bg: #ffffff;
    --selection-text: #000000;
    --dropdown-bg: rgba(42, 42, 42, 0.8);
    --dropdown-shadow: 0 10px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.2);
    --card-shadow: 0 4px 12px rgba(0,0,0,0.3);
    --card-hover-shadow: 0 8px 24px rgba(0,0,0,0.4);
    --chat-own-bg: rgba(255,255,255,0.1);
    --chat-other-bg: rgba(42,42,42,0.8);
    --modal-bg: rgba(0, 0, 0, 0.6);
    --step-bg: rgba(255,255,255,0.03);
}

::selection {
    background: var(--selection-bg);
    color: var(--selection-text);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- NAVIGATION (glass) ---------- */
.nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(var(--bg-rgb), 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.logo span {
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

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

.nav-links > a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links > a.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

.nav-links > a:hover {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 0.4rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--hover-bg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--bg-rgb), 0.95);
    backdrop-filter: blur(20px);
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-links a {
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-links a.active {
    color: var(--primary);
}

.mobile-dropdown {
    margin-top: 0.5rem;
}

.mobile-dropbtn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.mobile-dropdown-content a {
    font-size: 1.2rem;
    padding: 0.5rem 0;
    border-bottom: none;
    color: var(--text-soft);
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: flex;
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
}

.theme-toggle-mobile {
    background: var(--primary);
    color: var(--bg);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

/* ---------- Dropdown (desktop) ---------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.dropbtn:hover {
    color: var(--text);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    backdrop-filter: blur(12px);
    min-width: 180px;
    box-shadow: var(--dropdown-shadow);
    border-radius: 12px;
    border: 1px solid var(--border);
    z-index: 1;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    color: var(--text);
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.15s;
    border-radius: 8px;
    margin: 0.2rem;
}

.dropdown-content a:hover {
    background: var(--hover-bg);
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--text-soft);
}

.theme-toggle svg {
    stroke: currentColor;
    fill: none;
    width: 18px;
    height: 18px;
}

body.light .theme-toggle .moon,
body.dark .theme-toggle .sun {
    display: none !important;
}

body.light .theme-toggle .sun,
body.dark .theme-toggle .moon {
    display: inline !important;
}

.btn-small {
    padding: 0.4rem 1.2rem !important;
    font-size: 0.9rem !important;
}

/* ---------- MODAL (Coming Soon Card) ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--card-hover-shadow);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-soft);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-icon {
    margin-bottom: 1rem;
    color: var(--primary);
}

.modal-icon svg {
    stroke: currentColor;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-message {
    color: var(--text-soft);
    margin-bottom: 1.8rem;
    font-size: 1rem;
}

.modal-action {
    margin-top: 0.5rem;
    padding: 0.6rem 2rem;
    cursor: pointer;
}

/* ---------- MAIN CONTENT (Responsive) ---------- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero .gradient {
    background: linear-gradient(145deg, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: var(--text-soft);
    max-width: 650px;
    margin: 1.5rem auto;
}

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

.btn-primary, .btn-outline {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: var(--hover-bg);
    border-color: var(--text-soft);
    transform: scale(1.02);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card {
    width: 100%;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    background-color: var(--card-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.feature-card.clickable-card {
    cursor: pointer;
}

.feature-card:hover {
    transform: scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

.feature-icon {
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-text {
    margin-top: 1rem;
    width: 100%;
}

.feature-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-text p {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* Reasoning Section (updated for step-by-step) */
.showcase {
    margin: 4rem 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.reasoning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.reasoning-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.reasoning-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.card-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.reasoning-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.4;
    background: var(--step-bg);
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    transition: background 0.2s;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: var(--primary);
    color: var(--bg);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step.conclusion .step-number {
    background: transparent;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.step p {
    margin: 0;
    flex: 1;
}

.step.conclusion p strong {
    color: var(--primary);
}

/* Animation classes for scroll reveal (CSS only) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Callout */
.callout {
    max-width: 700px;
    margin: 4rem auto 0;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    transition: box-shadow 0.3s;
}

.callout:hover {
    box-shadow: var(--card-hover-shadow);
}

.quote-icon {
    font-size: 3rem;
    color: var(--border);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    opacity: 0.5;
}

.quote-text {
    font-size: 1.3rem;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-soft);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    width: 100%;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 0.6s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .nav-actions {
        gap: 0.5rem;
    }
    .theme-toggle {
        padding: 0.4rem;
    }
    .btn-small {
        padding: 0.4rem 1rem !important;
    }
    main {
        padding: 60px 16px 30px;
    }
    .hero {
        margin-bottom: 2rem;
    }
    .features {
        gap: 1.5rem;
        margin: 2rem 0;
    }
    .feature-card {
        min-height: 180px;
        padding: 1.5rem;
    }
    .reasoning-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    .callout {
        margin: 2rem auto 0;
        padding: 1.5rem;
    }
    .quote-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .cta {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-primary, .btn-outline {
        text-align: center;
    }
    .feature-card {
        min-height: 160px;
    }
    .feature-text h3 {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .step {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .step-number {
        align-self: flex-start;
    }
}
