/* ===================================
   MailSignal Marketing Site
   Design: "Precision Utility"
   =================================== */

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

:root {
    /* Color System */
    --bg-primary: #0F1419;
    --bg-secondary: #1A1F26;
    --bg-tertiary: #252B33;
    --accent: #FF6B4A;
    --accent-hover: #FF8266;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #2D3748;
    --success: #10B981;

    /* Typography Scale */
    --font-headline: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Spacing */
    --section-padding: 6rem 1.5rem;
    --container-max: 1200px;
    --container-narrow: 800px;
}

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

.container--narrow {
    max-width: var(--container-narrow);
}

/* Section */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(15, 20, 25, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-color: var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

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

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    max-width: 560px;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

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

/* Inbox Pulse Animation */
.pulse-container {
    position: absolute;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 4s ease-out infinite;
}

.pulse-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.pulse-ring:nth-child(2) {
    width: 180px;
    height: 180px;
    animation-delay: 1s;
}

.pulse-ring:nth-child(3) {
    width: 260px;
    height: 260px;
    animation-delay: 2s;
}

.pulse-ring:nth-child(4) {
    width: 340px;
    height: 340px;
    animation-delay: 3s;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.hero-screenshot {
    position: relative;
    z-index: 1;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Screenshot placeholder */
.screenshot-placeholder {
    width: 400px;
    height: 300px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .pulse-container {
        width: 300px;
        height: 300px;
    }

    .pulse-ring:nth-child(1) { width: 80px; height: 80px; }
    .pulse-ring:nth-child(2) { width: 140px; height: 140px; }
    .pulse-ring:nth-child(3) { width: 200px; height: 200px; }
    .pulse-ring:nth-child(4) { width: 260px; height: 260px; }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-text {
    background: none;
    padding: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-text:hover {
    color: var(--accent);
}

.btn-text::after {
    content: ' \2192';
}

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

/* ===================================
   Problem Section
   =================================== */
.problem {
    background: var(--bg-secondary);
}

.pain-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.pain-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.pain-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 107, 74, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.pain-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}

.pain-card h3 {
    margin-bottom: 0.75rem;
}

.pain-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.solution-statement {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.1), rgba(255, 107, 74, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 74, 0.2);
}

.solution-statement p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

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

/* ===================================
   Features Section
   =================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--text-muted);
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.feature-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.feature-content p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* ===================================
   How It Works Section
   =================================== */
.how-it-works {
    background: var(--bg-secondary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
}

/* Connecting line */
.steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: calc(16.67% + 40px);
    right: calc(16.67% + 40px);
    height: 2px;
    background: var(--border);
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
}

.step-number span {
    font-family: var(--font-headline);
    font-size: 2rem;
    color: var(--accent);
}

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

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

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

    .steps::before {
        display: none;
    }
}

/* ===================================
   Pricing Section
   =================================== */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.pricing-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    position: relative;
}

.pricing-card--featured {
    border-color: var(--accent);
}

.pricing-card--featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-tier {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.pricing-price {
    margin-bottom: 1.5rem;
}

.pricing-amount {
    font-family: var(--font-headline);
    font-size: 3rem;
    color: var(--text-primary);
}

.pricing-period {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

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

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

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

/* ===================================
   FAQ Section
   =================================== */
.faq {
    background: var(--bg-secondary);
}

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

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

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

.faq-icon {
    width: 24px;
    height: 24px;
    stroke: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

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

.faq-answer-inner {
    padding-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer-inner code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* ===================================
   Final CTA Section
   =================================== */
.final-cta {
    text-align: center;
    padding: 8rem 1.5rem;
}

.final-cta h2 {
    margin-bottom: 2rem;
}

.final-cta .btn {
    margin-bottom: 1.5rem;
}

.final-cta-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.final-cta-trust span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.final-cta-trust svg {
    width: 16px;
    height: 16px;
    stroke: var(--success);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand svg {
    width: 24px;
    height: 24px;
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

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

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

@media (max-width: 640px) {
    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
