/* ==========================================================================
   Email Migration Tool — design system
   Dependency-free (system font stack + inline SVG icons) so the page stays
   fast and doesn't rely on any third-party CDN being up — matters both for
   Core Web Vitals (a real ranking factor) and for shared-hosting reliability.
   ========================================================================== */

:root {
    --ink: #0f1424;
    --ink-soft: #4b5468;
    --muted: #6b7280;
    --line: #e4e7ee;
    --bg: #f6f7fb;
    --card: #ffffff;

    --brand-1: #6d5bf7;
    --brand-2: #4f7cff;
    --brand-3: #22d3c7;
    --brand-grad: linear-gradient(120deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));

    --success: #17a673;
    --danger: #e5484d;
    --warn: #d97706;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 1px 2px rgba(15, 20, 36, 0.04), 0 12px 32px -12px rgba(15, 20, 36, 0.14);
    --shadow-pop: 0 4px 10px rgba(15, 20, 36, 0.06), 0 24px 48px -20px rgba(109, 91, 247, 0.35);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-2); }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ---------- Top nav ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(246, 247, 251, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--brand-grad);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-pop);
}
.brand-mark svg { width: 18px; height: 18px; }

.nav-links {
    display: flex;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
}
.nav-links a:hover { color: var(--brand-1); }
.nav-cta {
    background: var(--ink);
    color: #fff !important;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover { box-shadow: var(--shadow-pop); transform: translateY(-1px); }

/* Any anchor styled to look like a button should never show the default
   underline, in the nav or anywhere else in the page. */
.btn, .btn-primary, .btn-secondary, .btn-danger, .nav-cta, .share-btn {
    text-decoration: none !important;
}

@media (max-width: 760px) {
    .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 40px;
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    z-index: 0;
    animation: float 14s ease-in-out infinite;
}
.hero::before {
    width: 420px; height: 420px;
    background: var(--brand-1);
    top: -180px; left: -120px;
}
.hero::after {
    width: 380px; height: 380px;
    background: var(--brand-3);
    top: -80px; right: -140px;
    animation-delay: -6s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 40px) scale(1.08); }
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-1);
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}
.eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(23, 166, 115, 0.18);
}

h1.hero-title {
    font-size: clamp(32px, 5.4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    font-weight: 800;
    color: var(--ink);
}
h1.hero-title .grad {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto 28px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; color: var(--success); }

/* ---------- Stats bar ---------- */
.stats-bar {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 760px;
    margin: 34px auto 0;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.stat-num {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
@media (max-width: 560px) {
    .stats-bar { grid-template-columns: 1fr; }
}

/* ---------- Tool card (glass) ---------- */
.tool-section { padding: 26px 0 60px; position: relative; z-index: 1; }

.tool-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    padding: 30px;
    max-width: 980px;
    margin: 0 auto;
}

.tool-card-head { margin-bottom: 20px; }
.tool-card-head h2 {
    margin: 0 0 4px;
    font-size: 21px;
    letter-spacing: -0.01em;
}
.tool-card-head p { margin: 0; color: var(--muted); font-size: 14px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}
.alert.error { background: #fef2f2; color: #99231f; border: 1px solid #fbd0cf; }
.alert.success { background: #ecfdf6; color: #0b6b4c; border: 1px solid #bdf0da; }
.hidden { display: none !important; }

.servers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 760px) {
    .servers { grid-template-columns: 1fr; }
}

.server-panel {
    background: #fbfbfe;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 20px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.server-panel:focus-within {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}
.server-panel legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14.5px;
    padding: 0 4px;
    color: var(--ink);
}
.legend-icon {
    width: 24px; height: 24px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: var(--brand-grad);
    color: #fff;
    flex: none;
}
.legend-icon svg { width: 13px; height: 13px; }

label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

input, select {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: var(--shadow-pop);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 22px -8px rgba(109, 91, 247, 0.55); }

.btn-secondary { background: #eef0f8; color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: #e3e6f3; }

.btn-danger { background: #fdecec; color: #b3211d; }
.btn-danger:hover:not(:disabled) { background: #fbdada; }

.btn-full { width: 100%; }

.test-result {
    display: inline-block;
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
}
.test-result.ok { color: var(--success); }
.test-result.fail { color: var(--danger); }
.test-result.pending { color: var(--muted); }

.actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ---------- Progress ---------- */
#progress-section {
    margin-top: 26px;
    background: #fbfbfe;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
}
#progress-section h2 { margin-top: 0; font-size: 16px; }

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e7e9f3;
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--brand-grad);
    background-size: 200% 100%;
    animation: shimmer 2.4s linear infinite;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    white-space: nowrap;
    transition: width 0.3s ease;
    min-width: 30px;
}
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

#progress-status { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

.log-panel {
    margin-top: 14px;
    background: #0f1424;
    color: #c9cee0;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    height: 170px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.security-note {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    color: var(--muted);
    background: #f6f7fb;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.security-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--brand-1); }

/* ---------- Generic content sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-kicker {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-1);
    margin-bottom: 10px;
}
.section-head h2 {
    font-size: clamp(24px, 3.4vw, 32px);
    letter-spacing: -0.015em;
    margin: 0 0 12px;
}
.section-head p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    box-shadow: var(--shadow-soft);
}
.step-num {
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--brand-grad);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}
.step-card h3 { margin: 0 0 6px; font-size: 15.5px; }
.step-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Feature grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.feature-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(109,91,247,0.14), rgba(34,211,199,0.14));
    color: var(--brand-1);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}
.feature-icon svg { width: 19px; height: 19px; }
.feature-card h3 { margin: 0 0 6px; font-size: 15.5px; }
.feature-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Provider chips */
.provider-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.provider-chip {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-soft);
}

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 17px 20px;
    font-weight: 700;
    font-size: 14.5px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 20px;
    color: var(--brand-1);
    transition: transform 0.2s ease;
    flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    margin: 0;
    padding: 0 20px 18px;
    color: var(--muted);
    font-size: 13.5px;
}

/* ---------- Share buttons ---------- */
.share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.share-btn svg { width: 16px; height: 16px; flex: none; }
.share-btn.whatsapp:hover { background: #e9fbf1; color: #128c4a; border-color: #bdf0da; }
.share-btn.facebook:hover { background: #eaf2ff; color: #1359c9; border-color: #cfe1ff; }
.share-btn.x:hover { background: #eef0f3; color: #111827; border-color: #dde1e7; }
.share-btn.linkedin:hover { background: #eaf3fb; color: #0a5f9c; border-color: #cfe6f7; }
.share-btn.copy:hover { background: #f3f0ff; color: var(--brand-1); border-color: #e2d9ff; }

/* ---------- Simple content pages (privacy / terms / about) ---------- */
.content-page { max-width: 760px; margin: 0 auto; padding: 56px 22px 70px; }
.content-page h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.015em; margin: 0 0 8px; }
.content-page .lede { color: var(--muted); font-size: 14.5px; margin: 0 0 36px; }
.content-page h2 { font-size: 18px; margin: 34px 0 10px; letter-spacing: -0.01em; }
.content-page p, .content-page li { color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }
.content-page ul { padding-left: 20px; }
.content-page a { font-weight: 600; }
.content-page .back-link { display: inline-block; margin-bottom: 26px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--brand-1); }
.content-page .updated { color: var(--muted); font-size: 12.5px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }

/* Footer */
.site-footer {
    padding: 34px 0 44px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--brand-1); }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 0 0 14px;
}
