/* ═══════════════════════════════════════════════════════════════════════════
   Zypherius — marketing pages (alternatives, tools, guides)
   Shared shell for every page outside the app: header, hero, prose, tables,
   FAQ, CTA bands, footer. Dark surfaces, multi-hue accents, constant but quiet
   motion. Every interactive element carries hover / focus-visible / active.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Inter, self-hosted. Google's CSS endpoint costs two extra connections and
   blocks the first paint; these are the same variable woff2 files it serves. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --m-bg: #060312;
    --m-bg-soft: #0b0620;
    --m-surface: rgba(255, 255, 255, 0.035);
    --m-surface-hi: rgba(255, 255, 255, 0.06);
    --m-border: rgba(255, 255, 255, 0.09);
    --m-border-hi: rgba(255, 255, 255, 0.16);
    --m-text: #ffffff;
    --m-text-soft: #c9c2e8;
    --m-muted: #9a90c4;
    --m-indigo: #6366f1;
    --m-violet: #a855f7;
    --m-pink: #ec4899;
    --m-cyan: #22d3ee;
    --m-amber: #f59e0b;
    --m-green: #34d399;
    --m-radius: 14px;
    --m-radius-lg: 20px;
    --m-shadow: 0 20px 50px rgba(6, 3, 18, 0.55);
    --m-maxw: 1120px;
}

* { box-sizing: border-box; }

/* A display value in a component rule outranks the user-agent [hidden] rule,
   so auth-state swapping needs this to actually hide anything. */
[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.m-page {
    margin: 0;
    background: var(--m-bg);
    color: var(--m-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.m-page::before {
    content: '';
    position: fixed;
    inset: -20% -20% auto -20%;
    height: 90vh;
    background:
        radial-gradient(46% 52% at 18% 22%, rgba(99, 102, 241, 0.26), transparent 70%),
        radial-gradient(42% 48% at 82% 12%, rgba(236, 72, 153, 0.17), transparent 72%),
        radial-gradient(38% 46% at 55% 60%, rgba(34, 211, 238, 0.12), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.m-container {
    width: 100%;
    max-width: var(--m-maxw);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.m-narrow { max-width: 780px; }

/* ─── Header ─────────────────────────────────────────────────────────────── */

.m-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(6, 3, 18, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--m-border);
}

.m-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.m-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--m-text);
    text-decoration: none;
}

.m-logo img { width: 26px; height: 26px; }

.m-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.m-nav a {
    color: var(--m-muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: color 0.18s ease;
}

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

.m-header-cta { display: flex; align-items: center; gap: 10px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.m-btn-primary {
    background: linear-gradient(120deg, #6366f1, #a855f7);
    color: #fff;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.34);
}

.m-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(99, 102, 241, 0.44); }

.m-btn-ghost {
    background: var(--m-surface);
    border-color: var(--m-border);
    color: var(--m-text);
}

.m-btn-ghost:hover { background: var(--m-surface-hi); border-color: var(--m-border-hi); transform: translateY(-2px); }

.m-btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.m-btn-lg { padding: 15px 28px; font-size: 16.5px; border-radius: 14px; }

.m-btn:active { transform: translateY(0); }

.m-btn:focus-visible,
.m-nav a:focus-visible,
.m-logo:focus-visible,
.m-prose a:focus-visible,
.m-faq summary:focus-visible,
.m-footer a:focus-visible,
.m-crumbs a:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
    border-radius: 6px;
}

/* ─── Breadcrumbs ────────────────────────────────────────────────────────── */

.m-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 22px 0 0;
    font-size: 13.5px;
    color: var(--m-muted);
}

.m-crumbs a { color: var(--m-muted); text-decoration: none; transition: color 0.18s ease; }
.m-crumbs a:hover { color: var(--m-text); }
.m-crumbs span[aria-current] { color: var(--m-text-soft); }
.m-crumbs .sep { opacity: 0.45; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.m-hero { padding: 40px 0 56px; }

.m-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--m-border);
    border-radius: 999px;
    background: var(--m-surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--m-text-soft);
    margin-bottom: 22px;
}

.m-eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--m-green);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.m-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 5.4vw, 50px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 20ch;
}

.m-hero h1 .grad {
    background: linear-gradient(115deg, #818cf8 0%, #e879f9 48%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.m-lead {
    margin: 0 0 28px;
    font-size: clamp(16.5px, 2.2vw, 19px);
    line-height: 1.65;
    color: var(--m-text-soft);
    max-width: 62ch;
}

.m-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.m-note {
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--m-muted);
}

/* ─── Sections & prose ───────────────────────────────────────────────────── */

.m-section { padding: 52px 0; position: relative; z-index: 1; }
.m-section-tight { padding: 34px 0; }

.m-h2 {
    margin: 0 0 10px;
    font-size: clamp(23px, 3.6vw, 32px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.m-h3 {
    margin: 32px 0 10px;
    font-size: clamp(18px, 2.6vw, 21px);
    font-weight: 650;
    letter-spacing: -0.015em;
}

.m-sub {
    margin: 0 0 26px;
    color: var(--m-muted);
    font-size: 16px;
    max-width: 66ch;
}

.m-prose { max-width: 72ch; color: var(--m-text-soft); }
.m-prose p { margin: 0 0 16px; }
.m-prose strong { color: var(--m-text); font-weight: 620; }
.m-prose ul, .m-prose ol { margin: 0 0 18px; padding-left: 22px; }
.m-prose li { margin-bottom: 9px; }
.m-prose li::marker { color: var(--m-violet); }

.m-prose a {
    color: #a5b4fc;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.18s ease;
}

.m-prose a:hover { color: #c7d2fe; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.m-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.m-card {
    padding: 24px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018));
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.m-card:hover { border-color: var(--m-border-hi); transform: translateY(-3px); }

.m-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.m-card p { margin: 0; color: var(--m-muted); font-size: 14.8px; line-height: 1.6; }

.m-icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    margin-bottom: 14px;
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
}

.m-icon.pink { background: rgba(236, 72, 153, 0.14); color: #f9a8d4; }
.m-icon.cyan { background: rgba(34, 211, 238, 0.13); color: #67e8f9; }
.m-icon.amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.m-icon.green { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }

/* ─── Comparison table ───────────────────────────────────────────────────── */

.m-table-wrap {
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.022);
}

.m-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.m-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 15px;
}

.m-table th, .m-table td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.m-table thead th {
    background: rgba(255, 255, 255, 0.045);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--m-muted);
}

.m-table thead th.us { color: #c7d2fe; }
.m-table tbody tr:last-child td { border-bottom: none; }
.m-table tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
.m-table td:first-child { color: var(--m-text); font-weight: 550; }
.m-table td.us { color: var(--m-text); }
.m-table td.them { color: var(--m-muted); }

.m-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
}

.m-flag.yes { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.m-flag.no { background: rgba(244, 63, 94, 0.13); color: #fda4af; }
.m-flag.mid { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }

.m-table-note {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--m-muted);
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Steps ──────────────────────────────────────────────────────────────── */

.m-steps { counter-reset: step; display: grid; gap: 14px; }

.m-step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: start;
    padding: 20px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: rgba(255, 255, 255, 0.025);
}

.m-step::before {
    counter-increment: step;
    content: counter(step);
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 17px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.24));
    color: #e9d5ff;
}

.m-step h3 { margin: 0 0 5px; font-size: 16.5px; font-weight: 650; }
.m-step p { margin: 0; color: var(--m-muted); font-size: 14.8px; }

/* ─── FAQ ────────────────────────────────────────────────────────────────── */

.m-faq { display: grid; gap: 10px; max-width: 820px; }

.m-faq details {
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.m-faq details:hover { border-color: var(--m-border-hi); }
.m-faq details[open] { background: rgba(255, 255, 255, 0.042); border-color: var(--m-border-hi); }

.m-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 17px 52px 17px 20px;
    font-weight: 600;
    font-size: 16px;
    position: relative;
}

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

.m-faq summary::after {
    content: '';
    position: absolute;
    right: 22px;
    top: 50%;
    width: 9px; height: 9px;
    border-right: 2px solid var(--m-muted);
    border-bottom: 2px solid var(--m-muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.m-faq details[open] summary::after {
    transform: translateY(-25%) rotate(225deg);
    border-color: #c7d2fe;
}

.m-faq .answer {
    padding: 0 20px 18px;
    color: var(--m-text-soft);
    font-size: 15.3px;
    line-height: 1.65;
}

.m-faq .answer p { margin: 0 0 12px; }
.m-faq .answer p:last-child { margin-bottom: 0; }

/* ─── Callout ────────────────────────────────────────────────────────────── */

.m-callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--m-radius);
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: rgba(99, 102, 241, 0.09);
    color: var(--m-text-soft);
    font-size: 15px;
    line-height: 1.6;
}

.m-callout svg { flex-shrink: 0; color: #a5b4fc; margin-top: 2px; }
.m-callout strong { color: var(--m-text); }

/* ─── CTA band ───────────────────────────────────────────────────────────── */

.m-cta-band {
    margin: 12px 0 0;
    padding: 46px 34px;
    border-radius: 26px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background:
        radial-gradient(80% 130% at 50% 0%, rgba(139, 92, 246, 0.22), transparent 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    text-align: center;
    box-shadow: var(--m-shadow);
}

.m-cta-band h2 {
    margin: 0 0 10px;
    font-size: clamp(23px, 3.6vw, 31px);
    font-weight: 730;
    letter-spacing: -0.025em;
}

.m-cta-band p { margin: 0 auto 24px; max-width: 54ch; color: var(--m-text-soft); }
.m-cta-band .m-hero-cta { justify-content: center; }

/* ─── Related links ──────────────────────────────────────────────────────── */

.m-related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); }

.m-related a {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: rgba(255, 255, 255, 0.022);
    text-decoration: none;
    color: var(--m-text);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.m-related a:hover { border-color: var(--m-border-hi); background: var(--m-surface-hi); transform: translateY(-2px); }
.m-related .r-title { font-weight: 620; font-size: 15.5px; margin-bottom: 4px; }
.m-related .r-sub { color: var(--m-muted); font-size: 13.8px; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.m-footer {
    margin-top: 56px;
    border-top: 1px solid var(--m-border);
    padding: 30px 0;
    position: relative;
    z-index: 1;
}

.m-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 14px;
    color: var(--m-muted);
}

.m-footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.m-footer a { color: var(--m-muted); text-decoration: none; transition: color 0.18s ease; }
.m-footer a:hover { color: var(--m-text); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .m-nav { display: none; }
    .m-hero { padding: 30px 0 42px; }
    .m-section { padding: 40px 0; }
    .m-cta-band { padding: 34px 22px; border-radius: 20px; }
}

@media (max-width: 560px) {
    .m-container { padding: 0 18px; }
    .m-hero-cta { flex-direction: column; align-items: stretch; }
    .m-hero-cta .m-btn { width: 100%; }
    .m-step { grid-template-columns: 38px 1fr; gap: 13px; padding: 17px; }
    .m-step::before { width: 38px; height: 38px; font-size: 15px; }
    .m-header-cta .hide-xs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .m-btn, .m-card, .m-related a, .m-faq details, .m-faq summary::after { transition: none; }
    .m-btn:hover, .m-card:hover, .m-related a:hover { transform: none; }
}
