/* ========================================
   Timeline-O-Tron Marketing Website
   ======================================== */

/* --- RESET & BASE --- */

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

:root {
    /* App color palette */
    --red: #E74C3C;
    --orange: #E67E22;
    --gold: #F1C40F;
    --green: #2ECC71;
    --teal: #1ABC9C;
    --blue: #3498DB;
    --indigo: #5B5EA6;
    --purple: #9B59B6;
    --pink: #E91E63;
    --brown: #8B4513;

    /* UI colors */
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --text: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e0e0e0;
    --axis-color: #333;
    --axis-dot: #333;

    /* Layout */
    --nav-height: 56px;
    --card-width: 340px;
    --card-gap: 100px;
    --timeline-axis-y: 50%;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --bg-card: #2a2a2a;
        --text: #f0f0f0;
        --text-secondary: #aaa;
        --text-muted: #777;
        --border: #444;
        --axis-color: #ccc;
        --axis-dot: #ccc;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- NAVIGATION --- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

@media (prefers-color-scheme: dark) {
    .nav {
        background: rgba(26, 26, 26, 0.85);
    }
}

.nav-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* --- HERO SECTION --- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 32px 100px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.hero h1 {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
    line-height: 1.4;
}

.hero-platforms {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 64px;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.platform-pill svg {
    width: 20px;
    height: 20px;
}

.hero-screenshot {
    max-width: 900px;
    width: 90%;
    margin-bottom: 48px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
    .hero-screenshot {
        box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

.hero-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

.scroll-prompt {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

.scroll-prompt .arrow {
    font-size: 24px;
    animation: bounce-right 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- TIMELINE SECTION --- */

/* The outer section is tall — vertical scrolling through it drives horizontal motion */
.timeline-section {
    position: relative;
    /* Height is set by JS based on card count; fallback for 8 cards */
    height: 500vh;
}

/* Sticky inner frame that stays in the viewport */
.timeline-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* The horizontal track — positioned by JS via translateX */
.timeline-scroll {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 50vw;
    will-change: transform;
}

/* The axis line */
.timeline-axis {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--axis-color);
    pointer-events: none;
    z-index: 1;
}

/* Feature stops */
.timeline-stop {
    flex: 0 0 var(--card-width);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 calc(var(--card-gap) / 2);
    z-index: 2;
}

/* Alternate above and below */
.timeline-stop.above {
    padding-bottom: calc(50vh + 20px);
    justify-content: flex-end;
}

.timeline-stop.below {
    padding-top: calc(50vh + 20px);
    justify-content: flex-start;
}

/* Connector line (dashed, like the app) */
.timeline-stop::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--connector-color, var(--blue)) 0px,
        var(--connector-color, var(--blue)) 5px,
        transparent 5px,
        transparent 10px
    );
    z-index: 1;
}

.timeline-stop.above::before {
    bottom: calc(50vh - 6px);
    height: 80px;
}

.timeline-stop.below::before {
    top: calc(50vh - 6px);
    height: 80px;
}

/* Dot on the axis */
.timeline-stop::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--connector-color, var(--blue));
    transform: translate(-50%, -50%);
    z-index: 3;
}

/* Feature card */
.feature-card {
    background: var(--bg-card);
    border: 2px solid var(--connector-color, var(--blue));
    border-radius: 12px;
    padding: 28px 24px;
    width: var(--card-width);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .feature-card {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    }
    .feature-card:hover {
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    }
}

.feature-year {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--connector-color, var(--blue));
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.2;
}

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

.feature-card .detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 50;
    padding: 8px 16px;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid var(--border);
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .scroll-progress {
        background: rgba(26, 26, 26, 0.85);
    }
}

.scroll-progress.visible {
    opacity: 1;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.3s ease, transform 0.3s ease;
}

.progress-dot.active {
    transform: scale(1.4);
}

/* --- CLOSING SECTION --- */

.closing {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 32px;
}

.closing h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    line-height: 1.1;
}

.closing p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--blue);
    color: #fff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.cta-button:hover {
    background: #2980b9;
    text-decoration: none;
    transform: translateY(-1px);
}

/* --- FOOTER --- */

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

/* --- SUPPORT & PRIVACY PAGES --- */

.page {
    padding-top: calc(var(--nav-height) + 64px);
    padding-bottom: 80px;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.page h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.page .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.page h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 48px;
    margin-bottom: 16px;
}

.page h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 8px;
}

.page p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.page ul, .page ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.page li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.page strong {
    color: var(--text);
    font-weight: 600;
}

/* FAQ accordion */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    line-height: 1.4;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 600px;
    padding-top: 12px;
}

.faq-answer p {
    font-size: 15px;
}

/* Keyboard shortcuts table */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.shortcuts-table th {
    text-align: left;
    padding: 10px 16px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shortcuts-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.shortcuts-table kbd {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, monospace;
    font-size: 12px;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Contact card */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-top: 32px;
}

.contact-card h3 {
    margin-top: 0;
}

.contact-card a {
    font-size: 18px;
    font-weight: 600;
}

/* Privacy highlights */
.privacy-highlight {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.privacy-highlight .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.privacy-highlight h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.privacy-highlight p {
    margin: 0;
    font-size: 14px;
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
    .nav {
        padding: 0 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-platforms {
        flex-direction: column;
        gap: 12px;
    }

    .scroll-prompt {
        display: none;
    }

    /* Vertical layout on mobile */
    .timeline-section {
        height: auto !important;
    }

    .timeline-sticky {
        position: relative;
        height: auto;
    }

    .timeline-scroll {
        flex-direction: column;
        transform: none !important;
        padding: 40px 20px;
        height: auto;
        gap: 32px;
    }

    .timeline-axis {
        display: none;
    }

    .timeline-stop {
        margin: 0;
        padding: 0 !important;
        flex: none;
        width: 100%;
    }

    .timeline-stop::before,
    .timeline-stop::after {
        display: none;
    }

    .feature-card {
        width: 100%;
        opacity: 1;
        transform: none;
    }

    .scroll-progress {
        display: none;
    }

    .closing {
        min-height: auto;
        padding: 60px 20px;
    }

    .footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 32px 20px;
    }

    .page {
        padding-left: 20px;
        padding-right: 20px;
    }
}
