/* MailCast Website — Indigo theme */

:root {
    --indigo: #4847AE;
    --indigo-light: #6A68FF;
    --indigo-dark: #363488;
    --indigo-50: #eef0ff;
    --indigo-100: #dfe2ff;
    --indigo-900: #1e1b4b;
    --text: #1a1a2e;
    --text-secondary: #64648b;
    --bg: #ffffff;
    --bg-alt: #f8f8fd;
    --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Nav */
nav {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-right: auto;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: white; }

/* Hero */
.hero {
    background: linear-gradient(145deg, var(--indigo) 0%, #3224a8 50%, #2a1d8a 100%);
    color: white;
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 32px 0;
    text-align: center;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--indigo);
    padding: 16px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.apple-logo {
    width: 20px;
    height: 20px;
}

/* Features */
.features {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 32px 100px;
}

.features h2,
.how-it-works h2,
.pricing h2,
.bottom-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text);
}

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

.feature-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(72,71,174,0.1);
}

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

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

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

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

/* How it works */
.how-it-works {
    background: var(--bg-alt);
    padding: 80px 32px 100px;
}

.how-it-works h2 { color: var(--text); }

.steps {
    display: flex;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
}

.step {
    flex: 1;
    text-align: center;
    max-width: 260px;
}

.step-number {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--indigo), var(--indigo-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 auto 20px;
}

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

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

/* Pricing */
.pricing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 32px 100px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.plan-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.plan-card:hover {
    transform: translateY(-4px);
}

.plan-card.featured {
    border-color: var(--indigo);
    background: white;
    box-shadow: 0 12px 40px rgba(72,71,174,0.15);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--indigo), var(--indigo-light));
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

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

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--indigo);
    margin-bottom: 24px;
}

.price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.plan-card ul {
    list-style: none;
}

.plan-card li {
    padding: 8px 0;
    font-size: 0.93rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    padding-left: 24px;
}

.plan-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234847AE' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: contain;
}

.plan-card li:last-child { border-bottom: none; }

/* Bottom CTA */
.bottom-cta {
    background: linear-gradient(145deg, var(--indigo) 0%, #3224a8 50%, #2a1d8a 100%);
    color: white;
    text-align: center;
    padding: 100px 32px;
    position: relative;
    overflow: hidden;
}

.bottom-cta::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.bottom-cta h2 {
    color: white;
    margin-bottom: 12px;
}

.bottom-cta p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
    font-size: 1.1rem;
}

.cta-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--indigo-900);
    color: rgba(255,255,255,0.6);
    padding: 48px 32px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
    margin-right: auto;
}

.footer-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

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

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.copyright {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 16px;
    color: rgba(255,255,255,0.3);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 48px 40px 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    margin: 0 auto 20px;
}

.modal h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.5;
}

.modal-button {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-light));
    color: white;
    border: none;
    padding: 12px 36px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(72,71,174,0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { flex-direction: column; align-items: center; gap: 32px; }
}

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .hero-content { padding-top: 40px; }
    .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
    nav { gap: 16px; padding: 16px 20px; }
    .footer-content { justify-content: center; text-align: center; }
    .footer-brand { margin-right: 0; }
}
