/* =====================================================================
   ListMailing — standalone marketing page stylesheet
   No Tailwind, no Flux, no Vite. Self-contained.
   ===================================================================== */

/* === Tokens ========================================================= */
:root {
    --bg:          #08080f;
    --bg-2:        #0d0d1a;
    --bg-card:     rgba(255, 255, 255, 0.04);
    --bg-card-h:   rgba(255, 255, 255, 0.07);
    --border:      rgba(255, 255, 255, 0.07);
    --border-h:    rgba(255, 255, 255, 0.16);
    --text:        #f0eeff;
    --muted:       rgba(240, 238, 255, 0.55);
    --accent:      #7c3aed;
    --accent-2:    #a855f7;
    --accent-glow: rgba(124, 58, 237, 0.28);
    --radius:      1rem;
    --radius-sm:   0.5rem;
    --max-w:       1120px;
    --transition:  0.22s ease;
}

/* === Reset =========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* === Base ============================================================ */
body {
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* === Typography ====================================================== */
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--muted); }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 1rem;
}

/* === Buttons ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-h);
    transform: translateY(-1px);
}

.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* === Nav ============================================================= */
.lm-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.lm-nav.scrolled {
    background: rgba(8, 8, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: var(--border);
}
.lm-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.lm-nav .brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lm-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lm-nav .lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}
.lm-nav .lang-btn {
    color: var(--muted);
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    transition: color var(--transition);
}
.lm-nav .lang-btn:hover,
.lm-nav .lang-btn.active { color: var(--text); }
.lm-nav .lang-btn.active { font-weight: 700; }
.lm-nav .lang-sep { color: var(--border-h); user-select: none; }

.lm-nav .nav-login {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    transition: color var(--transition);
}
.lm-nav .nav-login:hover { color: var(--text); }

/* === Hero ============================================================ */
.lm-hero {
    padding: 9rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lm-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.hero-text {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.hero-text h1 {
    margin-bottom: 1.25rem;
    background: linear-gradient(160deg, #fff 40%, rgba(168, 85, 247, 0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    max-width: 580px;
    margin: 0 auto 2.25rem;
    color: var(--muted);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 4rem;
}

/* Browser chrome screenshot wrapper */
.screenshot-browser {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.18),
        0 0 80px rgba(124, 58, 237, 0.18),
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.screenshot-browser::before {
    content: '';
    display: block;
    height: 36px;
    background: #23233a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    background-image:
        radial-gradient(circle 5px at 18px 18px, #10b981 0%, #10b981 100%),
        radial-gradient(circle 5px at 34px 18px, #febc2e 0%, #febc2e 100%),
        radial-gradient(circle 5px at 50px 18px, #28c840 0%, #28c840 100%),
        linear-gradient(to right, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.06) 100%);
    background-repeat: no-repeat;
    background-size: auto, auto, auto, calc(100% - 160px) 20px;
    background-position: left center, left center, left center, 80px center;
    flex-shrink: 0;
}

.screenshot-browser img {
    display: block;
    width: 100%;
}

.hero-screenshot {
    max-width: 900px;
    margin: 0 auto;
    transform: perspective(1200px) rotateX(6deg);
    transition: transform 0.6s ease;
}
.hero-screenshot:hover {
    transform: perspective(1200px) rotateX(1deg);
}

/* === Features ======================================================== */
.lm-features {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.lm-features .section-head {
    text-align: center;
    margin-bottom: 3.5rem;
}
.lm-features .section-head p {
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
    background: var(--bg-card-h);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-3px);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(124, 58, 237, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.feature-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: var(--accent-2);
    fill: none;
}

.feature-card h3 { margin-bottom: 0.4rem; color: var(--text); }
.feature-card p  { font-size: 0.9rem; line-height: 1.65; }

/* === Screenshot sections ============================================= */
.lm-screen {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}
.lm-screen:nth-child(even) { background: var(--bg-2); }

.screen-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}
.screen-inner.reverse { direction: rtl; }
.screen-inner.reverse > * { direction: ltr; }

.screen-text h2 { margin-bottom: 1rem; }
.screen-text p  { font-size: 1rem; line-height: 1.75; margin-bottom: 1.5rem; }

.screen-shot {
    position: relative;
}
.screen-shot::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius) + 1px);
    background: linear-gradient(135deg, rgba(124,58,237,0.15), transparent 60%);
    pointer-events: none;
}

/* === How it works ==================================================== */
.lm-how {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.lm-how h2 { margin-bottom: 3.5rem; }

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

.steps::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: calc(16.66% + 1rem);
    right: calc(16.66% + 1rem);
    height: 1px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    opacity: 0.35;
}

.step { position: relative; }

.step-number {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12), 0 8px 24px var(--accent-glow);
}

.step h3 { margin-bottom: 0.5rem; }
.step p  { font-size: 0.9rem; max-width: 240px; margin: 0 auto; }

/* === Final CTA ======================================================= */
.lm-cta {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.lm-cta::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
    pointer-events: none;
}
.lm-cta h2 {
    margin-bottom: 0.75rem;
    position: relative;
}
.lm-cta p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    position: relative;
}
.lm-cta .btn { position: relative; }

/* === Footer ========================================================== */
.lm-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}
.lm-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.lm-footer .brand {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #fff, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lm-footer p {
    font-size: 0.85rem;
    color: var(--muted);
}
.lm-footer .footer-links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
}
.lm-footer .footer-links a {
    color: var(--muted);
    transition: color var(--transition);
}
.lm-footer .footer-links a:hover { color: var(--text); }

/* === Scroll-reveal animations ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.12s; }
.stagger > *:nth-child(3) { transition-delay: 0.19s; }
.stagger > *:nth-child(4) { transition-delay: 0.26s; }
.stagger > *:nth-child(5) { transition-delay: 0.33s; }
.stagger > *:nth-child(6) { transition-delay: 0.40s; }
.stagger > *:nth-child(7) { transition-delay: 0.47s; }

/* Hero initial animation */
@keyframes heroFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-anim-1 { animation: heroFade 0.7s ease 0.1s both; }
.hero-anim-2 { animation: heroFade 0.7s ease 0.25s both; }
.hero-anim-3 { animation: heroFade 0.7s ease 0.4s both; }
.hero-anim-4 { animation: heroFade 0.85s ease 0.55s both; }

/* Pulse glow on primary btn */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4); }
    50%       { box-shadow: 0 4px 40px rgba(168, 85, 247, 0.65); }
}
.btn-primary { animation: glowPulse 3s ease-in-out infinite; }
.btn-primary:hover { animation: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
    .hero-screenshot { transform: none; }
}

/* === Responsive ====================================================== */
@media (max-width: 900px) {
    .screen-inner,
    .screen-inner.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2.5rem;
    }
    .screen-inner.reverse .screen-text { order: -1; }
    .steps { grid-template-columns: 1fr; gap: 2.5rem; }
    .steps::before { display: none; }
    .hero-screenshot { transform: none; }
}

@media (max-width: 600px) {
    .lm-hero { padding: 7rem 0 3rem; }
    .lm-nav .nav-links .nav-login { display: none; }
    .lm-footer .container { flex-direction: column; align-items: flex-start; }
}
