/* ============================================================
   FloreData — Global chrome: header (floating pill + mobile menu) + footer
   The footer visuals live in outro.css (.fd-footer*); this file owns the
   header + mobile nav, plus the inner-page main offset.
   ============================================================ */

/* --- Skip link (a11y) ------------------------------------------------ */
.fd-skip-link {
    position: fixed;
    top: -100px;
    left: 14px;
    z-index: 1000;
    background: var(--wp--preset--color--surface-dark);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.18s ease;
}
.fd-skip-link:focus { top: 14px; outline: 2px solid var(--wp--preset--color--punchy); outline-offset: 2px; }

.fd-header__sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

/* --- Header: floating lavender pill, fixed, overlays any background ---- */
.fd-header {
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;                 /* let clicks pass except on the pill */
}

.fd-header__pill {
    pointer-events: auto;
    box-sizing: border-box;
    width: min(1441px, calc(100% - 28px));
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 28px;
    background: var(--wp--preset--color--primary-soft);
    border-radius: 999px;
    /* Subtle resting shadow — the .ai floats the pill with a soft drop, even
       at the top of the hero. Kept gentle (low alpha, soft spread). */
    box-shadow: 0 6px 20px -10px rgba(40, 40, 57, 0.20);
    transition: box-shadow 0.25s ease;
}

/* Stronger lift once scrolled off the very top */
.fd-header.is-stuck .fd-header__pill {
    box-shadow: 0 10px 30px -12px rgba(40, 40, 57, 0.45);
}

/* HOME: drop the pill to y=36 — exactly where the in-hero nav sat — so the
   landing stays pixel-identical. Inner pages keep the default top:14px. */
body.fd-page-home .fd-header { top: 36px; }

/* Inner pages: a slightly firmer resting shadow seats the pill on flat cream. */
body:not(.fd-page-home) .fd-header__pill {
    box-shadow: 0 4px 16px -10px rgba(40, 40, 57, 0.28);
}

.fd-header__brand { display: inline-flex; align-items: center; line-height: 1; flex-shrink: 0; }
.fd-header__brand:focus-visible { outline: 2px solid var(--wp--preset--color--punchy); outline-offset: 4px; border-radius: 6px; }
.fd-header__logo { height: 30px; width: auto; display: block; }

.fd-header__nav { display: flex; align-items: center; gap: 36px; flex-shrink: 0; }

.fd-header__links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fd-header__links a {
    font-family: var(--wp--preset--font-family--satoshi);
    font-size: var(--wp--preset--font-size--nav);
    font-weight: 700;
    color: var(--wp--preset--color--text-inverse);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}
.fd-header__links a { transition: color 0.15s ease; }
.fd-header__links a:hover { color: var(--wp--preset--color--primary-soft); }   /* no underline (Geetha #4) — clean GrapeSoda hover on the dark pill */
.fd-header__links a:focus-visible {
    outline: 2px solid var(--wp--preset--color--text-inverse);
    outline-offset: 4px;
    border-radius: 4px;
}

.fd-header__cta {
    font-family: var(--wp--preset--font-family--satoshi);
    font-size: var(--wp--preset--font-size--nav);
    font-weight: 700;
    color: #000;
    background: var(--wp--preset--color--sage);
    border-radius: 999px;
    padding: 14px 26px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.fd-header__cta:hover { background: var(--wp--preset--color--text-inverse); color: #000; transform: translateY(-1px); }
.fd-header__cta:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* --- Hamburger (mobile only) ----------------------------------------- */
.fd-burger {
    display: none;
    width: 48px;
    height: 48px;
    margin-right: 6px;
    padding: 0;
    border: none;
    background: var(--wp--preset--color--sage);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
}
.fd-burger:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
/* The burger is a <button>, so GeneratePress's button:hover/:focus paints it a dark
   grey (#3f4047). Pin its background to the resting colour on every interaction state
   (sage closed / purple open) so it never "sticks" dark — esp. the sticky :hover that
   touch devices keep after the tap that closed the menu (Riccardo 2026-06-26). */
.fd-burger:hover, .fd-burger:focus, .fd-burger:active { background: var(--wp--preset--color--sage); }
.fd-menu-open .fd-burger:hover, .fd-menu-open .fd-burger:focus, .fd-menu-open .fd-burger:active { background: var(--wp--preset--color--primary); }
.fd-burger__box { position: relative; width: 22px; height: 16px; display: block; }
.fd-burger__line,
.fd-burger__line::before,
.fd-burger__line::after {
    position: absolute;
    left: 0;
    width: 22px;
    height: 2.5px;
    background: var(--wp--preset--color--surface-dark);   /* brand dark, not pure black */
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.fd-burger__line { top: 50%; transform: translateY(-50%); }
.fd-burger__line::before { content: ""; top: -7px; }
.fd-burger__line::after  { content: ""; top: 7px; }
/* open state (toggled on <html> while menu is open) */
.fd-menu-open .fd-burger__line { background: transparent; }
.fd-menu-open .fd-burger__line::before { top: 0; transform: rotate(45deg); }
.fd-menu-open .fd-burger__line::after  { top: 0; transform: rotate(-45deg); }
/* close (X) state → on-brand: purple circle + white X (was sage circle + black icon) */
.fd-menu-open .fd-burger { background: var(--wp--preset--color--primary); }
.fd-menu-open .fd-burger__line::before,
.fd-menu-open .fd-burger__line::after { background: #fff; }

/* --- Full-screen mobile menu ----------------------------------------- */
.fd-mobile {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--wp--preset--color--primary-soft);
    display: grid;
    place-items: start center;                    /* top-align: was centred → big blank void under the logo (Francesca 2026-06-29) */
    padding: clamp(100px, 16vh, 146px) 0 44px;    /* clear the header pill, trim the blank space; links start just below the logo */
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.fd-mobile[hidden] { display: none; }
.fd-mobile.is-open { opacity: 1; }

.fd-mobile__inner {
    width: min(520px, 86%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fd-mobile__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fd-mobile__links a {
    display: block;
    padding: 12px 0;
    font-family: var(--wp--preset--font-family--satoshi);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--text-inverse);
    text-decoration: none;
}
/* inset frame keeps the full-width tap target but reads as a designed row,
   not a default full-bleed outline box */
.fd-mobile__links a { border-radius: 12px; }
.fd-mobile__links a:focus-visible { outline: 2px solid var(--wp--preset--color--text-inverse); outline-offset: -6px; }

.fd-mobile__cta {
    margin: 14px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--wp--preset--color--punchy);
    color: var(--wp--preset--color--growth);
    border-radius: 999px;
    padding: 16px 16px 16px 28px;
    font-weight: 700;
    font-size: 1.22rem;
    text-decoration: none;
}
.fd-mobile__cta:focus-visible { outline: 2px solid var(--wp--preset--color--growth); outline-offset: 3px; }
/* Full-width + larger Book-a-Call in the mobile menu (Sandro 2026-06-26). Higher
   specificity + !important to beat ds-2026-06.css §2 (inline-flex + small padding). */
.fd-mobile .fd-mobile__cta {
    width: 100%;
    box-sizing: border-box;
    margin-top: 18px;
    padding: 17px 26px !important;
    font-size: 1.2rem !important;
}

/* --- Inner-page main offset (clear the fixed pill; home hero needs none) */
body:not(.fd-page-home) #fd-main { padding-top: 92px; }

/* --- Generic inner page scaffold (base until per-archetype templates) -- */
.fd-page__inner {
    max-width: 1080px;            /* widened from 880 (Sandro 2026-06-28: legal/generic pages too narrow) */
    margin: 0 auto;
    padding: 40px 24px 64px;      /* trimmed bottom 96→64 to tighten the gap to the footer */
}
.fd-page__title {
    font-family: var(--wp--preset--font-family--satoshi);
    font-weight: 300;
    font-size: clamp(2.4rem, 1.6rem + 2.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--wp--preset--color--text);
    margin: 0 0 28px;
}
.fd-page__content { font-size: 1.125rem; line-height: 1.7; color: #161616; }
.fd-page__content :where(h2, h3) { font-weight: 700; margin: 1.6em 0 0.5em; }
.fd-page__content a { color: var(--wp--preset--color--primary); }

/* Mail shortcut lives only in the mobile pill (desktop has the "Contact Us" CTA). */
.fd-header__mail { display: none; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
    .fd-header__nav { display: none; }
    .fd-burger { display: grid; width: 44px; height: 44px; }   /* a11y tap target */
    .fd-header__pill { padding: 0 7px 0 18px; height: 50px; }   /* slimmer pill (Francesca: nav too big) */
    .fd-header__logo { height: 23px; }                          /* match the slimmer pill */

    /* Quick contact affordance in the mobile bar (Backlog #25). margin-left:auto
       groups it with the burger at the right; brand stays left. */
    .fd-header__mail {
        display: grid;
        place-items: center;
        width: 40px; height: 40px;
        margin-left: auto; margin-right: 2px;
        color: var(--wp--preset--color--text-inverse);
        border-radius: 50%;
        text-decoration: none;
    }
    .fd-header__mail:active { background: rgba(255, 255, 255, 0.18); }
    .fd-header__mail:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
}

/* lock scroll while the mobile menu is open */
.fd-menu-open, .fd-menu-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .fd-skip-link,
    .fd-header__pill,
    .fd-header__cta,
    .fd-burger__line,
    .fd-burger__line::before,
    .fd-burger__line::after,
    .fd-mobile { transition: none; }
}

/* -----------------------------------------------------------------------------
   Breadcrumbs (Backlog #10) — site-wide visible trail (Yoast-powered, matches
   the BreadcrumbList schema). Inner-page default; blog-single narrows it to the
   reading column via .fd-page-blog-single .fd-breadcrumbs (more specific).
   -------------------------------------------------------------------------- */
.fd-breadcrumbs {
    width: min(1441px, calc(100% - 28px));     /* match header pill box exactly so the left edge aligns */
    max-width: none;
    margin: clamp(28px, 3.5vw, 44px) auto 0;
    padding: 0 28px;                            /* = pill left padding → breadcrumb text-left == nav text-left */
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--wp--preset--color--text-muted);
}
.fd-breadcrumbs a { color: var(--wp--preset--color--text-muted); text-decoration: none; transition: color 0.15s ease; }
.fd-breadcrumbs a:hover { color: var(--wp--preset--color--primary); }
.fd-breadcrumbs .breadcrumb_last { color: var(--wp--preset--color--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .fd-breadcrumbs a { transition: none; } }
