/* ==========================================================
   Site theme: the homepage (home-demo) design language applied
   to every page that loads styles.css. Hairline borders, Manrope
   headings, mono labels, logo blue accent, full-width header and
   dark footer. Opt in with <body class="fd-theme">.
   ========================================================== */
body.fd-theme {
    --fd-ink: #0b1020;
    --fd-ink-2: #2a3142;
    --fd-muted: #5d6577;
    --fd-faint: #8a91a1;
    --fd-line: #e6e8ee;
    --fd-line-strong: #d6d9e2;
    --fd-soft: #f7f8fb;
    --fd-accent: #1d4ed8;
    --fd-accent-ink: #1e40af;
    --fd-accent-soft: #eef4ff;
    --fd-dark: #0b1220;
    --fd-dark-line: #1f2a44;
    --fd-head: 'Manrope', 'Inter', system-ui, sans-serif;
    --fd-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --fd-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Re-point the legacy styles.css tokens at the new palette */
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --primary-light: #2563eb;
    --dark: #0b1020;
    --gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    --gradient-subtle: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%);
    --shadow-glow: 0 0 40px rgba(29, 78, 216, 0.12);

    font-family: var(--fd-body);
    color: var(--fd-ink-2);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Type ---------- */
body.fd-theme h1,
body.fd-theme h2,
body.fd-theme h3,
body.fd-theme h4 {
    font-family: var(--fd-head);
    color: var(--fd-ink);
}
body.fd-theme h1 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
body.fd-theme h2 { font-weight: 800; letter-spacing: -0.03em; }
body.fd-theme h3,
body.fd-theme h4 { font-weight: 700; letter-spacing: -0.01em; }

/* Page titles on the inner pages */
body.fd-theme .blog-title,
body.fd-theme .contact-title,
body.fd-theme .download-header .download-title,
body.fd-theme .privacy-title,
body.fd-theme .policy-title,
body.fd-theme .guide-title,
body.fd-theme .account-title,
body.fd-theme .profile-title,
body.fd-theme .nf-title,
body.fd-theme .hero-title,
body.fd-theme .hero h1,
body.fd-theme .mac-hero h1 {
    font-family: var(--fd-head);
    font-size: clamp(34px, 4.6vw, 54px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
    color: var(--fd-ink);
    background: none;
    -webkit-text-fill-color: currentColor;
}
body.fd-theme .post-title {
    font-family: var(--fd-head);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--fd-ink);
}

/* Page header band: same dotted field as the homepage hero */
body.fd-theme .blog-header,
body.fd-theme .contact-header,
body.fd-theme .download-header,
body.fd-theme .privacy-header,
body.fd-theme .policy-header,
body.fd-theme .guide-header,
body.fd-theme .mac-hero,
body.fd-theme .hero {
    position: relative;
    isolation: isolate;
}
body.fd-theme .blog-header::before,
body.fd-theme .contact-header::before,
body.fd-theme .download-header::before,
body.fd-theme .guide-header::before,
body.fd-theme .mac-hero::before,
body.fd-theme .hero::before {
    content: '';
    position: absolute;
    top: -64px;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: -1;
    background: transparent radial-gradient(rgba(15, 23, 42, 0.13) 1px, transparent 1.2px) 0 0 / 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, transparent 30%, #000 75%, transparent 100%);
            mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, transparent 30%, #000 75%, transparent 100%);
    pointer-events: none;
}

body.fd-theme .post-content a:not(.btn-primary):not(.btn-secondary):not(.cta-button),
body.fd-theme .policy-content a,
body.fd-theme .privacy-container a:not([class]) {
    color: var(--fd-accent);
    text-underline-offset: 3px;
}

/* ---------- Buttons ---------- */
body.fd-theme .btn-primary {
    background: var(--fd-accent);
    border-radius: 11px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 22px -10px rgba(29, 78, 216, 0.55);
}
body.fd-theme .btn-primary:hover { background: var(--fd-accent-ink); }
body.fd-theme .btn-secondary {
    background: #fff;
    color: var(--fd-ink);
    border: 1px solid var(--fd-line-strong);
    border-radius: 11px;
}
body.fd-theme .btn-secondary:hover { border-color: var(--fd-ink); }

/* ---------- Header: full-width bar ---------- */
body.fd-theme .navbar,
body.fd-theme .navbar.scrolled {
    left: 0;
    right: 0;
    border: 0;
    border-bottom: 1px solid var(--fd-line);
    border-radius: 0;
    box-shadow: none;
    transform: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}
body.fd-theme .navbar .container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
body.fd-theme .nav-content { height: 64px; }
body.fd-theme .logo { gap: 10px; }
body.fd-theme .logo-svg { width: 32px; height: 32px; }
body.fd-theme .logo-text { font: 800 19px var(--fd-head); letter-spacing: -0.02em; color: var(--fd-ink); }
body.fd-theme .logo-text .logo-accent { color: var(--fd-accent); }

body.fd-theme .nav-links { gap: 28px; }
body.fd-theme .nav-link { font-size: 14.5px; font-weight: 400; color: var(--fd-ink-2); transition: color .15s ease; }
body.fd-theme .nav-link:hover { opacity: 1; color: var(--fd-accent); }
body.fd-theme .nav-link.active { font-weight: 400; color: var(--fd-accent); }
body.fd-theme .nav-link.active:not(:has(+ .btn-primary))::after { bottom: -8px; background: var(--fd-accent); border-radius: 2px; }

/* Sign In as plain text, Download as the dark pill */
body.fd-theme .nav-links > a.nav-link:has(+ .btn-primary) {
    height: auto;
    padding: 0;
    border: 0;
    margin-left: auto;
    font-size: 14.5px;
    color: var(--fd-ink-2);
}
body.fd-theme .nav-links > a.nav-link:has(+ .btn-primary):hover { background: none; color: var(--fd-accent); }
/* 28px link gap - 10px = 18px between Sign in and Download, as on the homepage */
body.fd-theme .nav-links > .btn-primary { order: 2; margin-left: -10px; }
body.fd-theme .navbar .btn-primary {
    height: auto;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--fd-ink);
    box-shadow: none;
    transition: transform .15s ease;
}
body.fd-theme .navbar .btn-primary:hover { background: var(--fd-ink); transform: translateY(-1px); }

/* Space after the logo so the links centre exactly as on the homepage */
@media (min-width: 901px) {
    body.fd-theme .nav-links { margin-left: 26px; }
}

@media (max-width: 900px) {
    body.fd-theme .nav-links,
    body.fd-theme.banner-hidden .nav-links {
        top: 64px;
        max-height: calc(100vh - 64px);
        gap: 0;
        padding: 8px 20px 20px;
        border-bottom: 1px solid var(--fd-line);
        box-shadow: 0 16px 32px -20px rgba(11, 16, 32, 0.25);
    }
    body.fd-theme .nav-link,
    body.fd-theme .nav-links > a.nav-link:has(+ .btn-primary) {
        width: 100%;
        margin: 0;
        padding: 13px 0;
        font-size: 15.5px;
        justify-content: flex-start;
        border-bottom: 1px solid var(--fd-line);
    }
    body.fd-theme .nav-link.active::after { display: none; }
    body.fd-theme .nav-links > .btn-primary {
        width: 100%;
        margin: 14px 0 0;
        padding: 13px 16px;
        text-align: center;
    }
}

/* ---------- Footer (same as the homepage) ---------- */
body.fd-theme .foot { background: var(--fd-dark); color: #c3cad8; padding: 72px 0 40px; font-size: 14px; line-height: 1.6; }
body.fd-theme .foot .wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
body.fd-theme .foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
body.fd-theme .foot-grid p { color: #8f9ab0; margin: 14px 0 0; max-width: 280px; line-height: 1.6; font-size: 14px; }
body.fd-theme .foot .brand { display: flex; align-items: center; gap: 11px; font: 800 20px var(--fd-head); letter-spacing: -0.02em; color: #fff; text-decoration: none; }
body.fd-theme .foot .brand svg { width: 32px; height: 32px; flex: none; }
body.fd-theme .foot .foot-h { font: 500 11.5px var(--fd-mono); letter-spacing: .08em; text-transform: uppercase; color: #6f7b93; margin: 4px 0 14px; max-width: none; }
body.fd-theme .foot ul { list-style: none; padding: 0; margin: 0; }
body.fd-theme .foot li { margin-bottom: 9px; }
body.fd-theme .foot li a { color: #c3cad8; text-decoration: none; transition: color .15s ease; }
body.fd-theme .foot li a:hover { color: #fff; }
body.fd-theme .foot-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--fd-dark-line); color: #6f7b93; font-size: 13px; flex-wrap: wrap; }

@media (max-width: 1000px) {
    body.fd-theme .foot-grid { grid-template-columns: 1fr 1fr; }
    body.fd-theme .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    body.fd-theme .foot .wrap { padding: 0 16px; }
}

/* ---------- Page-level fixes ---------- */
body.fd-theme h2 { line-height: 1.12; }

/* White page canvas like the homepage (old pages had tinted gradients) */
body.fd-theme .contact-page,
body.fd-theme .download-page,
body.fd-theme .policy-page,
body.fd-theme .guide-page,
body.fd-theme .mac-hero {
    background: #fff;
}
/* Free tools: drop the grey centre column and its edge lines */
body.fd-theme { background-image: none; }
body.fd-theme::after { content: none; }

/* Auth-flow cards sit below the fixed header */
body.fd-theme .auth-container,
body.fd-theme .check-email-container,
body.fd-theme .verify-container,
body.fd-theme .success-container {
    min-height: calc(100vh - 64px);
    padding-top: calc(64px + 3rem);
    padding-bottom: 4rem;
    background: #f5f7fb;
}

/* Cards: hairline borders instead of drop shadows */
body.fd-theme .download-card,
body.fd-theme .requirements-card,
body.fd-theme .contact-card,
body.fd-theme .policy-content,
body.fd-theme .auth-box,
body.fd-theme .check-email-box,
body.fd-theme .verify-box,
body.fd-theme .success-card {
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(11, 16, 32, 0.04);
}

/* Blog featured post: soft panel instead of a solid blue block */
body.fd-theme .featured-image {
    background: var(--fd-accent-soft);
    border-bottom: 1px solid var(--fd-line);
}
body.fd-theme .featured-badge,
body.fd-theme .filter-btn.active {
    font-family: var(--fd-mono);
    letter-spacing: 0.06em;
}
