/* Landing Page Styles */
/* Removed local :root for global Theme Sync */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-card);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 400;
    letter-spacing: -0.5px;
}

h1 { font-size: 4rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
p { font-size: 1.125rem; margin-bottom: 1.5rem; line-height: 1.8; }

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

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

/* Right Side Navigation */
.side-nav {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%) translateX(100px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.side-nav.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    padding: 8px 12px;
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-base);
    width: fit-content;
    margin-left: auto;
}

.nav-item:hover {
    opacity: 0.8;
    background: var(--bg-main);
}

.nav-item.active {
    opacity: 1;
    background: var(--bg-main);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    padding: 8px 15px;
}

.nav-number {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
}

.nav-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-item.active .nav-title {
    max-width: 180px;
    opacity: 1;
}

.nav-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.nav-item.active .nav-indicator {
    background: var(--primary);
    transform: scale(1.3);
}

/* Hero Section */
.hero {
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-surface);
}

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

.hero h1 {
    font-size: 5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease forwards 0.5s;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease forwards 0.8s;
}

/* Chapter Sections */
.chapter {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
    position: relative;
    background-color: var(--bg-main);
}

.chapter:nth-child(even) { background-color: var(--bg-card); }

.chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.chapter-number {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease 0.2s;
}

.chapter-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.4s;
}

.chapter-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 1px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.8s ease 0.6s;
}

.chapter.visible .chapter-number,
.chapter.visible .chapter-title {
    opacity: 1;
    transform: translate(0);
}

.chapter.visible .chapter-title::after { transform: scaleX(1); }

/* Conversation Styles */
.conversation {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.message {
    display: flex;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.message.user { justify-content: flex-end; }
.message.ai { justify-content: flex-start; }

.message-bubble {
    max-width: 80%;
    padding: 1.5rem;
    border-radius: 18px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.user .message-bubble { background-color: var(--border-soft); border-bottom-right-radius: 4px; }
.ai .message-bubble { background-color: var(--border-base); border-bottom-left-radius: 4px; }

.message-bubble.highlighted {
    background-color: var(--highlight-color);
    box-shadow: 0 5px 15px rgba(0, 85, 255, 0.15);
    transform: scale(1.02);
    border: 1px solid rgba(0, 85, 255, 0.2);
}

.message-text { font-size: 1.1rem; line-height: 1.6; }
.message-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; text-align: right; }
.ai .message-time { text-align: left; }

.chapter.visible .message { opacity: 1; transform: translateY(0); }
.chapter.visible .message:nth-child(n) { transition-delay: calc(0.6s + (n - 1) * 0.2s); }

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-soft);
    z-index: 1001;
}

.progress-bar {
    height: 3px;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border-base);
    opacity: 0;
    transform: translateY(30px);
    background-color: var(--bg-main);
}

.footer-content { max-width: 600px; margin: 0 auto; }

/* Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
    z-index: 1;
}

.shape-1 { width: 300px; height: 300px; background: var(--primary); top: 10%; right: 10%; animation: float 20s infinite ease-in-out; }
.shape-2 { width: 200px; height: 200px; background: var(--text-main); bottom: 20%; left: 5%; animation: float 15s infinite ease-in-out reverse; }
.shape-3 { width: 150px; height: 150px; background: var(--primary); top: 50%; left: 10%; animation: float 25s infinite ease-in-out; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Dynamic Lines */
.dynamic-line { position: absolute; background: var(--primary-soft); z-index: 1; }
.line-vertical { width: 1px; height: 0; top: 0; transition: height 1.5s ease; }
.line-horizontal { width: 0; height: 1px; left: 0; transition: width 1.5s ease; }

.chapter.visible .dynamic-line.line-vertical { height: 100%; }
.chapter.visible .dynamic-line.line-horizontal { width: 100%; }

/* Architectural Grid */
.arch-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--primary-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-soft) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.chapter.visible .arch-grid { opacity: 1; }

.svg-line { position: absolute; z-index: 1; opacity: 0; transition: opacity 1s ease; }
.chapter.visible .svg-line { opacity: 1; }
.svg-line path { stroke: var(--primary); stroke-width: 1; fill: none; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.chapter.visible .svg-line path { animation: drawLine 3s ease forwards; }

@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* Chapter Images */
.chapter-image {
    position: absolute;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease 0.8s;
    max-width: 300px;
    max-height: 300px;
    filter: brightness(1.1);
    mix-blend-mode: multiply;
    animation: subtleFloat 15s ease-in-out infinite;
}

.chapter.visible .chapter-image { opacity: 0.5; }

@keyframes subtleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5px, -8px) rotate(0.5deg); }
    50% { transform: translate(-3px, 6px) rotate(-0.3deg); }
    75% { transform: translate(4px, 4px) rotate(0.2deg); }
}

/* Floating Animations variations */
.float-slow { animation-duration: 20s; }
.float-circular { animation-name: circularFloat; animation-duration: 25s; }
.float-pulse { animation-name: pulseFloat; animation-duration: 12s; }
.float-gentle { animation-name: gentleFloat; animation-duration: 18s; }

@keyframes circularFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(8px, -5px) rotate(1deg); }
    50% { transform: translate(5px, 8px) rotate(0deg); }
    75% { transform: translate(-8px, 5px) rotate(-1deg); }
}

@keyframes pulseFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.15; }
    25% { transform: translate(3px, -4px) scale(1.02); opacity: 0.18; }
    50% { transform: translate(-2px, 3px) scale(0.98); opacity: 0.12; }
}

@keyframes gentleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(4px, -6px) scale(1.01); }
    66% { transform: translate(-2px, 4px) scale(0.99); }
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover { color: var(--bg-main); }
.cta-button:hover::before { left: 0; }

.geometric-shape { position: absolute; z-index: 1; opacity: 0.03; border: 1px solid var(--text-main); animation: float 20s infinite ease-in-out; }
.shape-square { width: 150px; height: 150px; top: 20%; right: 10%; }
.shape-circle { width: 100px; height: 100px; border-radius: 50%; bottom: 15%; left: 8%; }
.shape-triangle { width: 0; height: 0; border-left: 75px solid transparent; border-right: 75px solid transparent; border-bottom: 130px solid var(--text-main); top: 60%; right: 15%; }

.bold-intent { font-weight: bold; text-transform: uppercase; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero h1 { font-size: 3rem; }
    .side-nav { right: 10px; }
    .nav-item { padding: 6px 10px; }
    .nav-title { display: none; }
    .shape-1, .shape-2, .shape-3 { display: none; }
    .message-bubble { max-width: 90%; }
    .chapter-image { max-width: 200px; max-height: 200px; opacity: 0.1; }
}
