/* ==========================================================================
   Flexable Home V3 — base
   Everything is scoped under .flxb-home so it cannot leak into other pages.
   Module 1: tokens, layout primitives, nav
   ========================================================================== */

.flxb-home {
    --flxb-bg: #fdfdfd;
    --flxb-panel: #ffffff;
    --flxb-ink: #111113;
    --flxb-muted: #777985;
    --flxb-soft: #f5f6f7;
    --flxb-line: #e4e6e9;
    --flxb-brand: #05bc5b;
    --flxb-brand-dark: #049b4b;
    --flxb-green: #05bc5b;
    --flxb-charcoal: #3e3e45;
    --flxb-bubble: #eff4f8;
    --flxb-active: #e6faeb;
    --flxb-shadow: 0 14px 40px rgba(17, 17, 19, .055), 0 2px 8px rgba(17, 17, 19, .035);
    --flxb-radius: 28px;
    --flxb-nav-h: 76px;

    background: var(--flxb-bg);
    color: var(--flxb-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.015em;
}

/* Theme stylesheets set font-family on bare h1/h2/h3, which beats inheritance. */
.flxb-home h1,
.flxb-home h2,
.flxb-home h3,
.flxb-home h4,
.flxb-home p,
.flxb-home button,
.flxb-home input,
.flxb-home textarea,
.flxb-home a {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.flxb-home *,
.flxb-home *::before,
.flxb-home *::after {
    box-sizing: border-box;
}

/* The mockup set these globally; keep them opt-in to this page only. */
.flxb-home-body {
    margin: 0;
    background: #fdfdfd;
    scroll-behavior: smooth;
}

.flxb-home a {
    color: inherit;
    text-decoration: none;
    line-height: 16px;
}

.flxb-home button,
.flxb-home input,
.flxb-home textarea {
    font: inherit;
}

/* Anchor targets clear the fixed WP admin bar for logged-in users. */
/* Clear the sticky header (and the admin bar) when jumping to an anchor. */
.flxb-home [id] {
    scroll-margin-top: calc(var(--flxb-nav-h) + 20px);
}

body.admin-bar .flxb-home [id] {
    scroll-margin-top: calc(var(--flxb-nav-h) + 52px);
}

.flxb-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* ---------- Nav ---------- */

.flxb-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--flxb-line);
    background: rgba(253, 253, 253, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* Sit below the WP admin bar rather than under it. */
body.admin-bar .flxb-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .flxb-nav {
        top: 46px;
    }
}

/* Below 600px the admin bar scrolls away with the page. */
@media screen and (max-width: 600px) {
    body.admin-bar .flxb-nav {
        top: 0;
    }
}

/* Backdrop blur is unsupported in some browsers — fall back to solid. */
@supports not (backdrop-filter: blur(1px)) {
    .flxb-nav {
        background: var(--flxb-bg);
    }
}


.flxb-nav-inner {
    height: var(--flxb-nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flxb-brand {
    display: flex;
    align-items: center;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.045em;
    color: #09090a;
}

.flxb-brand-dot {
    color: var(--flxb-brand);
    font-weight: 900;
}

.flxb-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #4f5251;
    font-size: 14px;
}

.flxb-nav-links a:hover {
    color: var(--flxb-ink);
}

.flxb-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flxb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--flxb-line);
    background: #fff;
    color: var(--flxb-ink);
    font-weight: 600 !important;
    cursor: pointer;
    transition: .2s ease;
}

.flxb-btn:hover {
    transform: translateY(-1px);
    border-color: #c8c8c2;
}

.flxb-btn-primary {
    border-color: var(--flxb-charcoal);
    background: var(--flxb-charcoal);
    color: #fff;
    padding: 0 18px;
}

.flxb-btn-primary:hover {
    background: #323138;
    color: #fff;
}

/* ---------- Shared section primitives (used by Modules 3–9) ---------- */

.flxb-section {
    padding: 120px 0;
}

.flxb-section-head {
    max-width: 690px;
    margin-bottom: 48px;
}

.flxb-kicker {
    color: var(--flxb-brand);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

.flxb-home .flxb-h2 {
    font-size: clamp(40px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -.055em;
    margin: 0;
    font-weight: 700;
    color: var(--flxb-ink);
}

.flxb-section-copy {
    font-size: 18px;
    line-height: 1.55;
    color: var(--flxb-muted);
    max-width: 610px;
    margin: 16px 0 0;
}

/* ---------- Shared split layout (used by Modules 5 & 6) ---------- */

.flxb-split {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 60px;
    align-items: center;
}

/* Module 6 puts the visual first on desktop. */
.flxb-split-reverse {
    grid-template-columns: 1.15fr .85fr;
}

.flxb-product-copy .flxb-h2 {
    max-width: 470px;
}

.flxb-product-copy p {
    color: var(--flxb-muted);
    font-size: 17px;
    line-height: 1.55;
    max-width: 470px;
}

.flxb-micro {
    display: flex;
    gap: 9px;
    align-items: center;
    color: #555856;
    font-size: 12px;
    margin-top: 26px;
}

.flxb-micro i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--flxb-green);
    flex-shrink: 0;
}

/* ---------- Signed-in menu ---------- */

.flxb-guest {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flxb-guest[hidden],
.flxb-user[hidden],
.flxb-user-menu[hidden] {
    display: none;
}

.flxb-user {
    position: relative;
}

.flxb-user-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 12px 0 6px;
    border: 1px solid transparent;
    border-radius: 99px;
    background: transparent;
    color: var(--flxb-ink);
    cursor: pointer;
    transition: .2s ease;
}

.flxb-user-trigger:hover {
    background: var(--flxb-soft);
    border-color: var(--flxb-line);
}

.flxb-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--flxb-charcoal);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.flxb-user-name {
    font-size: 14px;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flxb-user-caret {
    color: #8b8e90;
    transition: transform .2s ease;
}

.flxb-user-trigger[aria-expanded="true"] .flxb-user-caret {
    transform: rotate(180deg);
}

/* ---------- Dropdown ---------- */

.flxb-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 258px;
    background: #fff;
    border: 1px solid var(--flxb-line);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(17, 17, 19, .12), 0 2px 8px rgba(17, 17, 19, .05);
    padding: 8px;
    z-index: 50;
    animation: flxbMenuIn .18s ease;
}

@keyframes flxbMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.flxb-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 10px 14px;
    border-bottom: 1px solid var(--flxb-line);
    margin-bottom: 6px;
}

.flxb-user-avatar-sm {
    width: 38px;
    height: 38px;
    font-size: 15px;
}

.flxb-user-card-text {
    min-width: 0;
}

.flxb-user-fullname {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flxb-user-handle {
    font-size: 12px;
    color: var(--flxb-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flxb-user-links {
    display: flex;
    flex-direction: column;
}

.flxb-user-links a,
.flxb-user-logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #3a3d3f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .15s ease;
}

.flxb-user-links a:hover,
.flxb-user-logout:hover {
    background: var(--flxb-soft);
    color: var(--flxb-ink);
}

.flxb-user-divider {
    height: 1px;
    background: var(--flxb-line);
    margin: 6px 4px;
}

.flxb-user-logout {
    color: #c0392b;
}

.flxb-user-logout:hover {
    background: #fdf1ef;
    color: #a13b28;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
    .flxb-user-name,
    .flxb-user-caret {
        display: none;
    }

    .flxb-user-trigger {
        padding: 0 5px;
    }

    .flxb-user-menu {
        min-width: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flxb-user-menu {
        animation: none;
    }

    .flxb-user-caret {
        transition: none;
    }
}

@media (max-width: 900px) {

    .flxb-split,
    .flxb-split-reverse {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    /* Copy always leads on mobile, whatever the desktop order. */
    .flxb-product-copy {
        order: 0;
    }

    .flxb-split-visual {
        order: 1;
    }
}

@media (max-width: 560px) {
    .flxb-product-copy p {
        font-size: 16px;
    }

    .flxb-micro {
        margin-top: 20px;
    }
}


@media (max-width: 900px) {
    .flxb-section {
        padding: 95px 0;
    }

    .flxb-section-head {
        margin-bottom: 36px;
    }
}

@media (max-width: 560px) {
    .flxb-section {
        padding: 85px 0;
    }

    .flxb-section-copy {
        font-size: 16px;
    }

    .flxb-section-head {
        margin-bottom: 30px;
    }
}


/* ---------- Responsive ---------- */

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

    .flxb-wrap {
        width: min(100% - 28px, 1180px);
    }
}

@media (max-width: 560px) {
    .flxb-home {
        --flxb-nav-h: 64px;
    }

    .flxb-nav-actions .flxb-btn:first-child {
        display: none;
    }

    .flxb-brand {
        font-size: 18px;
    }

    .flxb-nav-actions {
        gap: 6px;
    }

    .flxb-btn {
        height: 38px;
        padding: 0 18px;
        font-size: 12px !important;
    }
}


