/* ============================================
   ReturnCalc - Investment Calculator Styles
   Modern Light Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   DESIGN SYSTEM - Modern Professional
   ============================================ */

:root {
    /* Light Theme Color Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-card: #ffffff;
    --bg-input: #f8f9fb;
    --bg-hover: #f0f2f5;

    /* Accent Colors */
    --accent-primary: #4F46E5;
    --accent-primary-hover: #4338CA;
    --accent-secondary: #06B6D4;
    --accent-success: #10B981;
    --accent-error: #EF4444;
    --accent-warning: #F59E0B;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Border Colors */
    --border-default: #e2e8f0;
    --border-focus: var(--accent-primary);
    --border-hover: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.875rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

body {
    font-family: var(--font-body);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-md);
}

@media (min-width: 1024px) {
    .container {
        max-width: 1400px;
        padding: var(--space-lg) var(--space-xl);
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

/* ============================================
   HEADER
   ============================================ */

header {
    padding: var(--space-lg) 0;
    position: relative;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-logo {
    width: 40px;
    height: 40px;
    display: block;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.brand-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-white);
    stroke-width: 2.5;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 400;
    margin-top: var(--space-xs);
    line-height: 1.5;
}

.features-list {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-icon {
    color: var(--accent-success);
    font-size: 1.25rem;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 3;
}

/* ============================================
   TOP NAVBAR
   ============================================ */

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-default);
    transition: all 0.3s ease;
}

.top-navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.navbar-logo {
    width: 36px;
    height: 36px;
}

.navbar-brand-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.08);
}

/* Hamburger toggle - hidden on desktop */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.open .navbar-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.open .navbar-toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.open .navbar-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-default);
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
    }

    .navbar-links.open {
        display: flex;
    }

    .nav-link {
        padding: var(--space-md);
        width: 100%;
    }
}

/* Spacer for fixed navbar */
header#home {
    padding-top: 60px;
}

/* Footer styles */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo {
    width: 28px;
    height: 28px;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
    padding: var(--space-3xl) 0;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-lg);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero-circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.hero-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -50px;
    animation-delay: -7s;
}

.hero-circle-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero-highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-feature {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.hero-feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(56, 189, 248, 0.1));
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.hero-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-feature-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hero-feature-text span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.cta-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

.cta-primary svg {
    width: 20px;
    height: 20px;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feature Showcase */
.feature-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 640px;
}

.showcase-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.showcase-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 217, 255, 0.15);
}

.showcase-card:hover::before {
    opacity: 1;
}

.showcase-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(56, 189, 248, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.showcase-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

.showcase-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.showcase-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.showcase-example {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 217, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
}

.example-input {
    color: var(--text-secondary);
}

.showcase-example svg {
    width: 12px;
    height: 12px;
    color: var(--accent-primary);
}

.example-output {
    color: var(--accent-success);
    font-weight: 600;
}

.showcase-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Mobile CTA button - hidden on desktop */
.hero-cta-mobile {
    display: none;
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .feature-showcase {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: 10px;
    }

    .showcase-card {
        padding: 12px;
    }

    .showcase-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .showcase-icon svg {
        width: 16px;
        height: 16px;
    }

    .showcase-card h3 {
        font-size: 0.8rem;
    }

    .showcase-card p {
        font-size: 0.65rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .showcase-example {
        padding: 6px 8px;
        font-size: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .showcase-date {
        font-size: 0.55rem;
        margin-top: 6px;
    }

    /* Hide desktop CTA, show mobile CTA */
    .hero-cta {
        display: none;
    }

    .hero-cta-mobile {
        display: block;
    }

    /* Reduce hero spacing on mobile */
    .hero-features {
        margin-bottom: var(--space-md);
    }

    .hero-description {
        margin-bottom: var(--space-md);
    }
}

/* Demo Widget */
.demo-widget {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 360px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Demo Widget Rotation */
.demo-widget {
    opacity: 0;
    visibility: hidden;
    transform: translateX(0);
}

.demo-widget.active {
    opacity: 1;
    visibility: visible;
}

/* Slide animations */
.demo-widget.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

.demo-widget.slide-in-right {
    animation: slideInFromRight 0.6s ease-out forwards;
}

.demo-widget.slide-out-left {
    animation: slideOutToLeft 0.6s ease-out forwards;
}

.demo-widget.slide-out-right {
    animation: slideOutToRight 0.6s ease-out forwards;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Demo Navigation Buttons */
.demo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(56, 189, 248, 0.15));
    border: 1.5px solid rgba(0, 217, 255, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.2);
}

.demo-nav-btn:hover {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(56, 189, 248, 0.3));
    border-color: var(--accent-primary);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 217, 255, 0.35);
}

.demo-nav-btn:active {
    transform: translateY(-50%) scale(1.05);
}

.demo-nav-prev {
    left: calc(50% - 225px);
}

.demo-nav-next {
    right: calc(50% - 225px);
}

.demo-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

/* Responsive adjustments for demo navigation */
@media (max-width: 768px) {
    .hero-visual {
        width: 100%;
        padding: 0 16px;
    }

    .demo-widget {
        max-width: 100%;
        width: 100%;
    }

    /* Move arrows below the demo on mobile */
    .demo-nav-btn {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 48px;
        height: 48px;
    }

    .demo-nav-btn svg {
        width: 24px;
        height: 24px;
    }

    .demo-nav-prev {
        left: auto;
    }

    .demo-nav-next {
        right: auto;
    }

    /* Create mobile navigation row */
    .hero-visual {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    /* Mobile pagination dots - larger for touch */
    .demo-pagination {
        gap: 16px;
        margin-top: 24px;
    }

    /* Mobile demo container */
    .demo-container {
        min-height: 480px;
    }

    .demo-dot {
        width: 12px;
        height: 12px;
    }

    .demo-dot.active {
        width: 32px;
    }
}

/* Mobile navigation row container */
@media (max-width: 768px) {
    .demo-nav-btn {
        display: none;
    }
}

/* Add swipe hint on mobile */
@media (max-width: 768px) {
    .demo-pagination::after {
        content: "Swipe or tap dots to switch";
        display: block;
        position: absolute;
        bottom: -24px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        color: var(--text-secondary);
        white-space: nowrap;
        opacity: 0.8;
    }
}

/* Demo Pagination Dots */
.demo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    position: relative;
    z-index: 20;
}

.demo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.demo-dot:hover {
    background: rgba(148, 163, 184, 0.7);
    transform: scale(1.2);
    border-color: rgba(148, 163, 184, 0.5);
}

.demo-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
    border-color: var(--accent-primary);
}

/* Typing Animation Keyframes */
@keyframes typing-ticker {
    from { width: 0; }
    to { width: 4ch; }
}

@keyframes typing-amount {
    from { width: 0; }
    to { width: 7ch; }
}

@keyframes typing-date {
    from { width: 0; }
    to { width: 8ch; }
}

/* Demo 2: Portfolio animations */
@keyframes typing-portfolio {
    from { width: 0; }
    to { width: 30ch; }
}

/* Demo 3: Future SIP animations */
@keyframes typing-sip-amount {
    from { width: 0; }
    to { width: 4ch; }
}

@keyframes typing-sip-return {
    from { width: 0; }
    to { width: 8ch; }
}

@keyframes typing-sip-period {
    from { width: 0; }
    to { width: 8ch; }
}

/* Demo 4: Historical SIP animations */
@keyframes typing-hist-ticker {
    from { width: 0; }
    to { width: 15ch; }
}

@keyframes typing-hist-amount {
    from { width: 0; }
    to { width: 7ch; }
}

@keyframes typing-hist-period {
    from { width: 0; }
    to { width: 20ch; }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent-primary);
    }
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-default);
}

.demo-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.demo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(0, 217, 255, 0.1);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.demo-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-phase {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.demo-field label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.demo-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 6px 10px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: var(--radius-sm);
    min-width: 100px;
    height: 34px;
    display: flex;
    align-items: center;
    overflow: hidden;
    opacity: 0;
}

.demo-value::before {
    content: attr(data-text);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--accent-primary);
    padding-right: 2px;
}

.ticker-animate {
    animation: fadeInUp 0.3s 0.3s ease forwards;
}

.ticker-animate::before {
    animation:
        typing-ticker 0.5s 0.7s steps(4) forwards,
        blink-caret 0.4s 1.2s step-end 2 forwards;
}

.amount-animate {
    animation: fadeInUp 0.3s 1.5s ease forwards;
}

.amount-animate::before {
    animation:
        typing-amount 0.9s 1.9s steps(7) forwards,
        blink-caret 0.4s 2.8s step-end 2 forwards;
}

.date-animate {
    animation: fadeInUp 0.3s 3.1s ease forwards;
}

.date-animate::before {
    animation:
        typing-date 1.1s 3.5s steps(8) forwards,
        blink-caret 0.4s 4.6s step-end 2 forwards;
}

.demo-arrow {
    text-align: center;
    color: var(--accent-primary);
    animation: bounce 2s infinite;
    margin: 4px 0;
}

.demo-arrow svg {
    width: 16px;
    height: 16px;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

.demo-result {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    opacity: 0;
    animation: fadeInUp 0.3s 5.1s ease forwards;
}

.demo-result-card {
    background: rgba(0, 217, 255, 0.03);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 6px 4px;
    text-align: center;
}

.demo-result-card.highlight {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.08), rgba(56, 189, 248, 0.08));
    border-color: var(--accent-primary);
}

.demo-result-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.demo-result-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.demo-result-value.positive {
    color: var(--accent-success);
}

.value-animate {
    animation-delay: 5.3s;
}

.returns-animate {
    animation-delay: 5.6s;
}

.period-animate {
    animation-delay: 5.9s;
}

/* ============================================
   DEMO 2: PORTFOLIO RETURNS (8 seconds)
   ============================================ */

/* Portfolio-specific layout */
.demo-field-compact {
    margin-bottom: 8px;
}

.demo-field-compact label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.demo-stock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    opacity: 0;
    animation: fadeInUp 0.3s 0.3s ease forwards;
}

.demo-stock-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.demo-value-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 6px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: var(--radius-sm);
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
}

.demo-value-compact::before {
    content: attr(data-text);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--accent-primary);
    padding-right: 2px;
}

.demo-allocation {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 2px 0;
}

.demo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.demo-field-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-field-small label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.demo-value-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 8px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: var(--radius-sm);
    height: 28px;
    display: flex;
    align-items: center;
    overflow: hidden;
    opacity: 0;
}

.demo-value-small::before {
    content: attr(data-text);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--accent-primary);
    padding-right: 2px;
}

/* Portfolio animations */
.portfolio-stock1-animate {
    animation: fadeInUp 0.3s 0.5s ease forwards;
}

.portfolio-stock1-animate::before {
    animation:
        typing-ticker 0.4s 0.9s steps(4) forwards,
        blink-caret 0.4s 1.3s step-end 2 forwards;
}

.portfolio-stock2-animate {
    animation: fadeInUp 0.3s 1.7s ease forwards;
}

.portfolio-stock2-animate::before {
    animation:
        typing-ticker 0.4s 2.1s steps(4) forwards,
        blink-caret 0.4s 2.5s step-end 2 forwards;
}

.portfolio-stock3-animate {
    animation: fadeInUp 0.3s 2.9s ease forwards;
}

.portfolio-stock3-animate::before {
    animation:
        typing-ticker 0.5s 3.3s steps(5) forwards,
        blink-caret 0.4s 3.8s step-end 2 forwards;
}

.portfolio-amount-animate {
    animation: fadeInUp 0.3s 4.2s ease forwards;
}

.portfolio-amount-animate::before {
    animation:
        typing-amount 0.8s 4.6s steps(7) forwards,
        blink-caret 0.4s 5.4s step-end 2 forwards;
}

.portfolio-date-animate {
    animation: fadeInUp 0.3s 4.2s ease forwards;
}

.portfolio-date-animate::before {
    animation:
        typing-date 0.9s 4.6s steps(8) forwards,
        blink-caret 0.4s 5.5s step-end 2 forwards;
}

#demo-2 .demo-result {
    animation: fadeInUp 0.3s 6s ease forwards;
}

.portfolio-value-animate {
    animation-delay: 6.2s;
}

.portfolio-returns-animate {
    animation-delay: 6.6s;
}

.portfolio-cagr-animate {
    animation-delay: 7s;
}

/* ============================================
   DEMO 3: FUTURE SIP CALCULATOR (7 seconds)
   ============================================ */
.sip-amount-animate {
    animation: fadeInUp 0.3s 0.3s ease forwards;
}

.sip-amount-animate::before {
    animation:
        typing-sip-amount 0.6s 0.7s steps(4) forwards,
        blink-caret 0.4s 1.3s step-end 2 forwards;
}

.sip-return-animate {
    animation: fadeInUp 0.3s 1.7s ease forwards;
}

.sip-return-animate::before {
    animation:
        typing-sip-return 1.1s 2.1s steps(8) forwards,
        blink-caret 0.4s 3.2s step-end 2 forwards;
}

.sip-period-animate {
    animation: fadeInUp 0.3s 3.6s ease forwards;
}

.sip-period-animate::before {
    animation:
        typing-sip-period 1.1s 4s steps(8) forwards,
        blink-caret 0.4s 5.1s step-end 2 forwards;
}

#demo-3 .demo-result {
    animation: fadeInUp 0.3s 5.5s ease forwards;
}

.sip-invested-animate {
    animation-delay: 5.7s;
}

.sip-value-animate {
    animation-delay: 6.1s;
}

.sip-gain-animate {
    animation-delay: 6.5s;
}

/* ============================================
   DEMO 4: HISTORICAL SIP TIME MACHINE (9 seconds)
   ============================================ */
.hist-ticker-animate {
    animation: fadeInUp 0.3s 0.3s ease forwards;
}

.hist-ticker-animate::before {
    animation:
        typing-hist-ticker 1.3s 0.7s steps(15) forwards,
        blink-caret 0.4s 2s step-end 2 forwards;
}

.hist-amount-animate {
    animation: fadeInUp 0.3s 2.4s ease forwards;
}

.hist-amount-animate::before {
    animation:
        typing-hist-amount 0.8s 2.8s steps(7) forwards,
        blink-caret 0.4s 3.6s step-end 2 forwards;
}

.hist-period-animate {
    animation: fadeInUp 0.3s 4s ease forwards;
}

.hist-period-animate::before {
    animation:
        typing-hist-period 2.3s 4.4s steps(20) forwards,
        blink-caret 0.4s 6.7s step-end 2 forwards;
}

#demo-4 .demo-result {
    animation: fadeInUp 0.3s 7.1s ease forwards;
}

.hist-invested-animate {
    animation-delay: 7.3s;
}

.hist-value-animate {
    animation-delay: 7.7s;
}

.hist-cagr-animate {
    animation-delay: 8.1s;
}

.demo-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    justify-content: center;
}

.demo-note svg {
    width: 12px;
    height: 12px;
    color: var(--accent-primary);
}

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

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .hero-section {
        padding: var(--space-2xl) 0;
    }

    .demo-widget {
        padding: var(--space-lg);
    }

    .demo-result {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .hero-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
}

/* ============================================
   PAGE-LEVEL TABS (Home, Tools, About, Contact)
   ============================================ */

.page-tabs-wrapper {
    position: relative;
}

.page-tab {
    display: none;
    animation: pageTabFadeIn 0.4s ease;
}

.page-tab.active {
    display: block;
}

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

/* ============================================
   TABS
   ============================================ */

.tabs-container {
    margin-top: 0;
    margin-bottom: var(--space-xl);
    scroll-margin-top: 20px;
}

.tabs-nav {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding: var(--space-xs);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.tab-btn.active svg {
    color: var(--text-white);
}

.tabs-content-wrapper {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Tab Description */
.tab-description {
    text-align: center;
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.03), rgba(56, 189, 248, 0.03));
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-md);
    animation: slideDown 0.5s ease;
}

.tab-description p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Coming Soon State */
.coming-soon {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.coming-soon-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin: 0 auto var(--space-lg);
    display: block;
}

.coming-soon h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.full-width {
    grid-column: 1 / -1;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 420px 1fr;
        gap: var(--space-xl);
    }
}

/* Chart and Commentary Grid */
.chart-commentary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 1200px) {
    .chart-commentary-grid {
        grid-template-columns: 1fr 400px;
        gap: var(--space-xl);
        align-items: start;
    }
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.card-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-default);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.1rem;
}

.card-title-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-white);
    stroke-width: 2.5;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.label-icon {
    color: var(--accent-primary);
    font-size: 1rem;
}

.label-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    input[type="date"] {
        width: 85%;
        max-width: 85%;
    }
}

input:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    width: 100%;
    min-width: 400px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 2px solid var(--border-focus);
    border-radius: var(--radius-md);
    margin-top: 8px;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .suggestions-dropdown {
        min-width: 100%;
    }
}

.suggestions-dropdown.visible {
    display: block;
}

.suggestion-item {
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-default);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-hover);
}

.suggestion-symbol {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.suggestion-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.suggestion-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.suggestions-loading {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ============================================
   RESULTS DISPLAY
   ============================================ */

#results {
    display: none;
}

#results.visible {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.metric-card {
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.metric-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.metric-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
    stroke-width: 2;
}

.metric-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-value.positive {
    color: var(--accent-success);
}

.metric-value.negative {
    color: var(--accent-error);
}

.metric-change {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    font-weight: 500;
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.chart-container canvas {
    max-height: 400px;
}

@media (min-width: 1200px) {
    .chart-container canvas {
        max-height: 450px;
    }
}

/* Commentary Section */
.commentary-section {
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 1200px) {
    .commentary-section {
        position: sticky;
        top: var(--space-lg);
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
}

.commentary-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.commentary-title-icon {
    font-size: 1.5rem;
}

.commentary-title-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-warning);
    stroke-width: 2;
}

.commentary-item {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-default);
    font-size: 0.9375rem;
}

.commentary-item:last-child {
    border-bottom: none;
}

.commentary-label {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.commentary-value {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
}

.commentary-highlight {
    color: var(--accent-primary);
    font-weight: 700;
}

.commentary-positive {
    color: var(--accent-success);
    font-weight: 700;
}

.commentary-negative {
    color: var(--accent-error);
    font-weight: 700;
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */

.loading {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
}

.loading.visible {
    display: block;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-weight: 500;
}

.error {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--accent-error);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    color: var(--accent-error);
    font-weight: 500;
}

.error.visible {
    display: block;
}

/* ============================================
   INFO SECTION
   ============================================ */

.info-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
    border-left: 4px solid var(--accent-warning);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-section strong {
    color: var(--accent-warning);
    font-weight: 700;
}

/* ============================================
   EXTRAPOLATION NOTICE
   ============================================ */

.extrapolation-notice {
    display: flex;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(56, 189, 248, 0.05));
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    align-items: flex-start;
}

.extrapolation-notice i {
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.extrapolation-notice-content {
    flex: 1;
}

.extrapolation-notice strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ============================================
   FEATURES & MARKETING SECTIONS
   ============================================ */

/* Features Section */
.features-section {
    margin: var(--space-2xl) 0;
    padding: var(--space-2xl) 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

@media (min-width: 768px) {
    .features-section {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
}

.feature-box {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.feature-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-large svg {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    stroke-width: 2;
}

.feature-box-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

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

/* How It Works Section */
.how-it-works-section {
    margin: var(--space-2xl) 0;
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(6, 182, 212, 0.03));
    border-radius: var(--radius-xl);
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: var(--space-2xl);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: var(--space-lg) auto var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    stroke-width: 2;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.step-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Why Choose Section */
.why-choose-section {
    margin: var(--space-2xl) 0;
    padding: var(--space-2xl) 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}

.why-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.why-item:hover {
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-md);
}

.why-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    color: var(--accent-secondary);
    stroke-width: 2;
}

.why-item h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.why-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    margin: var(--space-2xl) 0;
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-xl);
    text-align: center;
}

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

.cta-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-xl);
    background: var(--text-white);
    color: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.cta-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        opacity: 1;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.bounce-in {
    animation: bounceIn 0.8s ease forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
    opacity: 0;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
@media (prefers-reduced-motion: no-preference) {
    .fade-in,
    .bounce-in,
    .slide-in-left,
    .slide-in-right {
        animation-play-state: paused;
    }

    .fade-in.animate,
    .bounce-in.animate,
    .slide-in-left.animate,
    .slide-in-right.animate {
        animation-play-state: running;
        opacity: 1;
    }
}

/* ============================================
   PORTFOLIO COMPONENTS
   ============================================ */

/* Portfolio Stocks Section */
.portfolio-stocks-section {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-default);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: nowrap;
    gap: var(--space-md);
}

.section-header h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.allocation-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.allocation-total-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: var(--space-xs);
}

.allocation-total-value.valid {
    color: var(--accent-success);
}

.allocation-total-value.invalid {
    color: var(--accent-danger);
}

/* Stock Allocation Row */
.stock-allocation-row {
    display: grid;
    grid-template-columns: 3fr 80px 44px;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    align-items: start;
}

@media (max-width: 768px) {
    .stock-allocation-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        gap: var(--space-xs);
        flex-wrap: wrap;
    }

    .section-header h3 {
        font-size: 0.875rem;
        white-space: normal;
        flex: 1 1 auto;
        min-width: 0;
    }

    .allocation-total {
        font-size: 0.8125rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    label {
        font-size: 0.8125rem;
        flex-wrap: nowrap;
    }

    .portfolio-stocks-section {
        padding: var(--space-xs);
        margin: var(--space-sm) 0;
    }

    .tab-content {
        padding: var(--space-sm);
    }

    .card {
        padding: var(--space-sm);
    }
}

.stock-ticker-group {
    position: relative;
    flex: 1;
}

.stock-ticker-group .suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 4px;
}

.stock-ticker-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.stock-ticker-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.stock-allocation-input {
    width: 80px;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: center;
}

@media (max-width: 768px) {
    .stock-allocation-input {
        width: 100%;
    }
}

.stock-allocation-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Delete Button */
.btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.btn-delete svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Secondary Button */
.btn-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-secondary svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Portfolio Breakdown */
.portfolio-breakdown {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.breakdown-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.breakdown-title svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
    stroke-width: 2;
}

.portfolio-holding-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.portfolio-holding-item:last-child {
    margin-bottom: 0;
}

.portfolio-holding-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.holding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-default);
}

.holding-ticker {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.holding-allocation {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.1);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
}

.holding-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.holding-metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.holding-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.holding-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.holding-value.positive {
    color: var(--accent-success);
}

.holding-value.negative {
    color: var(--accent-danger);
}

/* ============================================
   SIP COMPONENTS
   ============================================ */

/* Select Dropdown */
select {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Input Hint */
.input-hint {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* SIP Results */
#sip-results {
    display: none;
}

#sip-results.visible {
    display: block;
}

/* SIP Breakdown */
.sip-breakdown {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.sip-year-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sip-year-item:last-child {
    margin-bottom: 0;
}

.sip-year-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-default);
}

.year-label {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.year-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.year-metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.year-metric-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.year-metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.year-metric-value.positive {
    color: var(--accent-success);
}

.year-metric-value.negative {
    color: var(--accent-danger);
}

/* ============================================
   SIP TIME MACHINE COMPONENTS
   ============================================ */

/* Ticker Input Wrapper */
.ticker-input-wrapper {
    position: relative;
}

.ticker-input-wrapper .suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 4px;
}

/* SIP History Results */
#sip-history-results {
    display: none;
}

#sip-history-results.visible {
    display: block;
}

/* Extra Metrics */
.sip-history-extra-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.extra-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
}

.extra-metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.extra-metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-default);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Ad Placeholder Slots */
.ad-slot {
    background: linear-gradient(135deg, #f8f9fb, #ffffff);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    margin: var(--space-xl) 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile Phones */
@media (max-width: 767px) {
    .container {
        padding: var(--space-sm);
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .features-list {
        gap: var(--space-sm);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .card {
        padding: var(--space-md);
    }

    .chart-container {
        padding: var(--space-md);
    }

    .chart-container canvas {
        max-height: 280px !important;
    }

    .commentary-section {
        padding: var(--space-md);
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container canvas {
        max-height: 350px !important;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9375rem;
    }

    .metric-card {
        padding: var(--space-md);
    }
}

/* ============================================
   ABOUT & CONTACT SECTIONS
   ============================================ */

.about-section,
.contact-section {
    padding: var(--space-2xl) 0;
    text-align: center;
}

.about-content,
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .about-content,
    .contact-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-card,
.contact-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s ease;
    text-align: center;
}

.about-card:hover,
.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.about-icon,
.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-icon svg,
.contact-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    stroke-width: 2;
}

.about-card h3,
.contact-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.about-card p,
.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   UTILITIES
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
