/* ============================================
   TRIPPY — AI Trip Planner Landing Page
   Design System & Styles
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: rgba(17, 24, 39, 0.7);
    --accent: #ff6b6b;
    --accent-hover: #ff5252;
    --accent-subtle: rgba(255, 107, 107, 0.12);
    --accent-glow: rgba(255, 107, 107, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --max-width: 1120px;
    --transition: 0.25s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
}

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-logo img {
    border-radius: var(--radius-sm);
}

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

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 24px;
        gap: 24px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a:not(.btn-primary) {
        font-size: 1.1rem;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-cta {
    margin-bottom: 16px;
}

.hero-note {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-height: 580px;
    width: auto;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
    border-radius: var(--radius-xl);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 40%, rgba(255, 107, 107, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 30% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image img {
        max-height: 420px;
    }
}

/* ---------- How It Works ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.step {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: border-color var(--transition), transform var(--transition);
}

.step:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 50%;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ---------- Screenshots ---------- */
.screenshots {
    overflow: hidden;
}

.screenshots-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0 40px;
    scrollbar-width: none;
}

.screenshots-carousel::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.screenshot-item img {
    height: 520px;
    width: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition);
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .screenshot-item img {
        height: 400px;
    }
}

/* ---------- Features ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ---------- Guides ---------- */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.guide-card {
    display: block;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.guide-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.08);
}

.guide-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.guide-card-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
}

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

/* ---------- FAQ ---------- */
.faq-list {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item[open] {
    border-color: rgba(255, 107, 107, 0.2);
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after {
    content: '−';
    color: var(--accent);
}

.faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.faq-learn-more {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.faq-learn-more:hover {
    color: var(--accent-hover);
}

/* ---------- CTA Section ---------- */
.cta-section {
    text-align: center;
}

.cta-content {
    padding: 80px 40px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .cta-content {
        padding: 48px 24px;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .nav-logo {
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    gap: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color var(--transition);
}

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

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 32px;
    }

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

/* ---------- Guide Pages ---------- */
.guide-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.guide-page {
    padding: 120px 0 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.guide-content {
    margin-bottom: 64px;
}

.guide-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    line-height: 1.15;
}

.guide-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.guide-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.guide-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.guide-content ol,
.guide-content ul {
    margin: 16px 0 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.guide-content ol {
    list-style: decimal;
}

.guide-content ul {
    list-style: disc;
}

.guide-content li {
    margin-bottom: 8px;
}

.guide-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guide-cta {
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 48px;
}

.guide-cta h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.guide-cta p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.guide-related {
    margin-bottom: 40px;
}

.guide-related h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.guide-related-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-related-link {
    display: block;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.guide-related-link:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ---------- Animations ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for grid children */
.steps-grid [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.steps-grid [data-reveal]:nth-child(3) { transition-delay: 0.2s; }

.features-grid [data-reveal]:nth-child(2) { transition-delay: 0.05s; }
.features-grid [data-reveal]:nth-child(3) { transition-delay: 0.1s; }
.features-grid [data-reveal]:nth-child(4) { transition-delay: 0.15s; }
.features-grid [data-reveal]:nth-child(5) { transition-delay: 0.2s; }
.features-grid [data-reveal]:nth-child(6) { transition-delay: 0.25s; }

.guides-grid [data-reveal]:nth-child(2) { transition-delay: 0.05s; }
.guides-grid [data-reveal]:nth-child(3) { transition-delay: 0.1s; }
.guides-grid [data-reveal]:nth-child(4) { transition-delay: 0.15s; }
.guides-grid [data-reveal]:nth-child(5) { transition-delay: 0.2s; }
.guides-grid [data-reveal]:nth-child(6) { transition-delay: 0.25s; }
.guides-grid [data-reveal]:nth-child(7) { transition-delay: 0.3s; }
.guides-grid [data-reveal]:nth-child(8) { transition-delay: 0.35s; }
.guides-grid [data-reveal]:nth-child(9) { transition-delay: 0.4s; }
.guides-grid [data-reveal]:nth-child(10) { transition-delay: 0.45s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Language Selector ---------- */
.lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-selector a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.lang-selector a:hover,
.lang-selector a.active {
    color: var(--text-primary);
}

.lang-selector span {
    opacity: 0.3;
}
