/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #007AFF;
    --primary-dark: #0051D5;
    --secondary: #5856D6;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --background: #FFFFFF;
    --surface: #F5F5F7;
    --border: #D2D2D7;
    --success: #34C759;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header & Navigation */
header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    height: 32px;
    width: auto;
    mix-blend-mode: multiply;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    transition: color 0.2s;
}

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

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    padding: 80px 0 120px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content h2 {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.buffett-quote {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(88, 86, 214, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    position: relative;
}

.quote-icon {
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 12px;
}

.quote-text {
    font-size: 18px;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.quote-author {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hero-buttons {
    margin-bottom: 32px;
}

.data-source {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.data-source svg {
    color: var(--success);
}

/* Phone Mockup */
.phone-mockup {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    aspect-ratio: 9 / 19.5;
    background: #1D1D1F;
    border-radius: 48px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    box-sizing: border-box;
}

.dynamic-island {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #000000;
    border-radius: 20px;
    z-index: 1000;
}

.phone-screen {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    background: var(--background);
    border-radius: 36px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
}

.app-preview {
    padding: 12px;
    background: var(--background);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-top: 24px;
}

.preview-ticker-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.preview-ticker {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.preview-company {
    font-size: 9px;
    color: var(--text-secondary);
}

.preview-logo-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-logo-image {
    height: 16px;
    width: auto;
    mix-blend-mode: multiply;
}

.preview-logo-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

.charts-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}

.preview-chart-container {
    background: var(--background);
    border-radius: 8px;
    padding: 8px;
}

.chart-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-align: center;
}

.preview-chart {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1px;
    padding: 0 2px;
    position: relative;
}

/* Zero line for all charts */
.preview-chart::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--text-secondary);
    opacity: 0.3;
    z-index: 1;
}

.chart-bar {
    flex: 1;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

/* Blue bars for quarterly/TTM charts - extend upward from zero */
.chart-bar.blue {
    background: var(--primary);
    align-self: flex-end;
}

/* Green bars for positive growth - start at zero line, extend upward */
.chart-bar.positive {
    background: var(--success);
    align-self: center;
    transform: translateY(-50%); /* Bottom edge at zero line, extends upward */
}

/* Red bars for negative growth - start at zero line, extend downward */
.chart-bar.negative {
    background: #FF3B30;
    align-self: center;
    transform: translateY(50%); /* Top edge at zero line, extends downward */
}

.chart-bar.active {
    opacity: 0.8;
}

.preview-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.metric-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-label {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Features Section */
.features {
    padding: 120px 0;
    background: var(--background);
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.feature-card {
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

/* Metrics Showcase */
.metrics-showcase {
    padding: 80px 0;
    background: var(--surface);
}

.metrics-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
}

.metric-item svg {
    color: var(--success);
    flex-shrink: 0;
}

/* CTA Section */
.cta {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cta p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta .btn-primary {
    background: white;
    color: var(--primary);
}

.cta .btn-primary:hover {
    background: var(--surface);
}

.disclaimer {
    margin-top: 24px;
    font-size: 14px;
    opacity: 0.7;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-column a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.footer-column a:hover {
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h2 {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .phone-mockup {
        max-width: 280px;
    }

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

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .buffett-quote {
        padding: 20px;
        margin-bottom: 24px;
    }

    .quote-text {
        font-size: 16px;
    }

    .quote-author {
        font-size: 14px;
    }

    .section-title {
        font-size: 36px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .metrics-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .nav-links a:not(.btn-primary) {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .cta h2 {
        font-size: 32px;
    }

    .cta p {
        font-size: 16px;
    }
}
