/* ===================================
   InsightBZ Landing Page Styles
   Mobile-first, responsive, accessible
   =================================== */

:root {
    --ink: #0F172A;
    --primary: #F97316;
    --secondary: #EA580C;
    --accent: #FB923C;
    --paper: #FFFFFF;
    --smoke: #F8FAFC;
    --warm-bg: #FFFBEB;
    --muted: #64748B;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
    --maxw: 1120px;
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
    color: var(--muted);
}

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

/* Container */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.btn-primary:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.btn-secondary {
    background: var(--smoke);
    color: var(--ink);
}

.btn-secondary:hover {
    background: #e8ebf1;
}

.btn-ghost {
    border: 1px solid rgba(18, 20, 23, 0.12);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--smoke);
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    color: var(--ink);
    font-weight: 500;
}

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

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

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--warm-bg), var(--paper));
}

.hero-content {
    display: grid;
    gap: 3rem;
}

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

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--ink), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subhead {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Dashboard Mock */
.hero-dashboard {
    display: grid;
    gap: 1rem;
}

.dashboard-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.dashboard-card.active {
    border: 2px solid var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1rem;
    color: var(--ink);
}

.badge, .progress-label {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--smoke);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}

.log-list {
    list-style: none;
}

.log-list li {
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--muted);
}

.question-item {
    padding: 0.75rem;
    background: var(--smoke);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--muted);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--smoke);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    animation: fillProgress 2s ease;
}

@keyframes fillProgress {
    from { width: 0%; }
}

.draft-preview {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Social Proof */
.social-proof {
    padding: 3rem 0;
    background: var(--warm-bg);
    text-align: center;
}

.social-proof-text {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.logo-placeholder {
    padding: 0.75rem 1.5rem;
    background: var(--paper);
    border-radius: 8px;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.875rem;
}

/* Section Styles */
section {
    padding: min(10vw, 6rem) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.125rem;
}

/* Features */
.features-grid {
    display: grid;
    gap: 2rem;
}

.feature-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--paper);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.9375rem;
}

/* How It Works */
.steps {
    display: grid;
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--paper);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.step-icon svg {
    width: 48px;
    height: 48px;
}

.step h3 {
    margin-bottom: 0.75rem;
}

.step p {
    color: var(--muted);
    max-width: 300px;
    margin: 0 auto;
}

/* Divider Section */
.divider-section {
    padding: 3rem 0;
    background: var(--paper);
    text-align: center;
}

.divider-waves {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--primary), var(--accent), transparent);
    background-size: 200% 100%;
    animation: wave 3s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes wave {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.divider-section .caption {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
}

/* Pricing */
.pricing-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.toggle-input {
    display: none;
}

.toggle {
    display: inline-flex;
    align-items: center;
    background: var(--smoke);
    border-radius: 999px;
    padding: 4px;
    cursor: pointer;
    position: relative;
}

.toggle span {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    color: var(--muted);
}

.toggle span:first-child {
    background: var(--paper);
    color: var(--ink);
}

.toggle-input:checked ~ .toggle span:first-child {
    background: transparent;
    color: var(--muted);
}

.toggle-input:checked ~ .toggle span:last-child {
    background: var(--paper);
    color: var(--ink);
}

.save-badge {
    font-size: 0.75rem;
    color: var(--beat);
    margin-left: 0.5rem;
}

.pricing-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(to bottom, rgba(249, 115, 22, 0.05), var(--paper));
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--paper);
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.user-range {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.price {
    margin-bottom: 0.5rem;
}

.price-annual {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ink);
}

.period {
    color: var(--muted);
    font-size: 1rem;
    margin-left: 0.25rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.pricing-features li:not(:last-child) {
    border-bottom: 1px solid var(--smoke);
}

.pricing-card .btn-primary {
    width: 100%;
}

.pricing-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

.pricing-note a {
    color: var(--primary);
    text-decoration: underline;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--paper);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 3rem;
}

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

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

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

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    color: var(--muted);
    line-height: 1.6;
}

.faq-item a {
    color: var(--primary);
    text-decoration: underline;
}

.microcopy {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 2rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--paper);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    color: var(--paper);
    margin-bottom: 2rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

.cta-section .btn-primary:hover {
    background: var(--warm-bg);
}

/* Footer */
.footer {
    background: var(--ink);
    color: var(--muted);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--paper);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--muted);
    font-size: 0.9375rem;
}

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

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--paper);
    font-size: 0.9375rem;
}

.newsletter-form input::placeholder {
    color: var(--muted);
}

.newsletter-form input:focus {
    outline: 2px solid var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-tagline {
    font-size: 1rem;
    color: var(--paper);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Responsive Design */
@media (min-width: 640px) {
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .newsletter-form {
        flex-direction: row;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (min-width: 960px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .hero-cta {
        justify-content: flex-start;
    }
}

@media (max-width: 639px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    
    .nav-links a:hover {
        background: var(--smoke);
    }
}

/* Accessibility Improvements */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Legal Pages */
.legal-page {
    padding: 4rem 0;
    min-height: 60vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.legal-intro {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 3rem;
}

.legal-section {
    margin-bottom: 0.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
    padding-top: 0.25rem;
    margin-top: 1.5rem;
}

.legal-section:first-child h2 {
    margin-top: 0;
}

.legal-section p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--primary);
    text-decoration: underline;
}

.legal-section a:hover {
    color: var(--secondary);
}

.legal-section ul, .legal-section ol {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
}

.legal-section li {
    margin-bottom: 0;
    line-height: 1.5;
}

/* Print Styles */
@media print {
    .header, .footer, .hero-dashboard {
        display: none;
    }
}

