/*
 * Gated brochure modal.
 *
 * Plain CSS on purpose. tailwind.css in this theme is a compiled build artefact, and a
 * utility class that was never compiled renders as nothing at all — silently, with no
 * console error. On a modal that surfaces as an invisible overlay or a zero-height panel,
 * which looks like a JavaScript fault and sends you debugging the wrong layer. Writing the
 * rules here removes that failure mode instead of re-checking for it every time.
 *
 * Visual language follows the existing hero CTA and #fidu-hero-filter-modal: dark glass,
 * the asymmetric 30px corner pair, and the same gold accent.
 */

.fidu-bro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fidu-bro[hidden] { display: none; }

.fidu-bro__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.fidu-bro__panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 40px 34px 30px;
    background: #14161a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px 8px;          /* mirrors the site's existing modal treatment */
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.75);
    /* Never scale from 0 — nothing in the real world appears out of nothing. */
    transform: scale(0.96) translateY(8px);
    opacity: 0;
    transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1),
                opacity 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

.fidu-bro.is-open .fidu-bro__backdrop { opacity: 1; }
.fidu-bro.is-open .fidu-bro__panel   { transform: none; opacity: 1; }

.fidu-bro__x {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    font-size: 26px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.55);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}
.fidu-bro__x:hover  { color: #fff; background: rgba(255, 255, 255, 0.08); }
.fidu-bro__x:active { transform: scale(0.94); }

.fidu-bro__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bea26b;
}

.fidu-bro__title {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 600;
    text-wrap: balance;
}

.fidu-bro__lede {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
}

.fidu-bro__field { margin-bottom: 16px; }

.fidu-bro__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
}

.fidu-bro__field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;               /* >=16px avoids iOS zoom-on-focus; 15 is a knowing trade */
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    transition: border-color 160ms ease, background-color 160ms ease;
}
.fidu-bro__field input::placeholder { color: rgba(255, 255, 255, 0.3); }
.fidu-bro__field input:focus {
    outline: none;
    border-color: #bea26b;
    background: rgba(255, 255, 255, 0.09);
}
.fidu-bro__field input[aria-invalid="true"] { border-color: #e06a63; }

.fidu-bro__err {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: #e06a63;
}
.fidu-bro__err[hidden] { display: none; }
.fidu-bro__err--form { margin-top: 12px; text-align: center; }

.fidu-bro__submit {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 14px 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #14161a;
    text-align: center;
    text-decoration: none;
    background: #bea26b;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 140ms ease-out, background-color 160ms ease, opacity 160ms ease;
}
.fidu-bro__submit:hover  { background: #cdb27a; color: #14161a; }
.fidu-bro__submit:active { transform: scale(0.985); }   /* the press must be felt */
.fidu-bro__submit[disabled] { opacity: 0.6; cursor: default; }
.fidu-bro__submit[disabled]:active { transform: none; }

.fidu-bro__small {
    margin: 14px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
    color: rgba(255, 255, 255, 0.42);
}

/* Honeypot. Off-screen rather than display:none — some bots skip hidden fields, and a
   field they never see but do fill is the whole trick. */
.fidu-bro__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.fidu-bro__tick {
    width: 46px;
    height: 46px;
    margin: 0 0 16px;
    display: grid;
    place-items: center;
    color: #14161a;
    background: #bea26b;
    border-radius: 50%;
}
.fidu-bro__tick svg { width: 24px; height: 24px; }

.fidu-bro__step[hidden] { display: none; }

/* Focus must always be visible for keyboard users, including inside the modal. */
.fidu-bro :focus-visible {
    outline: 2px solid #bea26b;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .fidu-bro__panel { padding: 34px 22px 24px; border-radius: 22px 6px; }
    .fidu-bro__title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .fidu-bro__backdrop,
    .fidu-bro__panel,
    .fidu-bro__submit,
    .fidu-bro__x { transition: none; }
    .fidu-bro__panel { transform: none; }
}
