/* ============================================
   CTA button (in landing content)
   ============================================ */
.cta {
    margin-top: clamp(2rem, 5vh, 3rem);
    background: rgba(155, 213, 224, 0.06);
    border: 1px solid rgba(232, 236, 245, 0.22);
    color: var(--fg);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    padding: 1rem 2.4rem;
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        border-color 0.5s ease,
        background 0.5s ease,
        color 0.5s ease,
        box-shadow 0.5s ease,
        transform 0.4s ease;
    opacity: 0;
    animation: fade-in 2s ease-out 2.8s forwards;
}

.cta:hover,
.cta:focus-visible {
    border-color: rgba(155, 213, 224, 0.55);
    background: rgba(155, 213, 224, 0.12);
    color: #ffffff;
    box-shadow: 0 0 30px rgba(155, 213, 224, 0.18);
    outline: none;
}

.cta:active {
    transform: translateY(1px);
}

/* ============================================
   Modal overlay + card
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.modal.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 24, 0.65);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
    background:
        linear-gradient(160deg, rgba(40, 50, 90, 0.55) 0%, rgba(20, 30, 60, 0.55) 100%);
    border: 1px solid rgba(232, 236, 245, 0.12);
    border-radius: 18px;
    padding: clamp(2rem, 4vh, 3rem) clamp(1.6rem, 4vw, 2.6rem);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(155, 213, 224, 0.08) inset;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.modal.is-open .modal__card {
    transform: scale(1) translateY(0);
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 1px solid rgba(232, 236, 245, 0.15);
    border-radius: 50%;
    color: var(--fg-dim);
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
    color: var(--fg);
    border-color: rgba(232, 236, 245, 0.4);
    background: rgba(232, 236, 245, 0.05);
    outline: none;
}

.modal__body {
    text-align: center;
}

.modal__title {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.005em;
    color: rgba(232, 236, 245, 0.92);
    margin-bottom: 0.6rem;
}

.modal__lead {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--fg-dim);
    margin: 0 auto 2rem;
    max-width: 32ch;
}

.modal__lead em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.modal__privacy {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    line-height: 1.55;
    color: var(--fg-faint);
    text-align: left;
    margin: 1.4rem 0 1.6rem;
}

.modal__privacy a {
    color: var(--fg-dim);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.modal__privacy a:hover {
    color: var(--accent);
}

/* ============================================
   Brevo form overrides
   ============================================ */
.sib-form,
#sib-form-container,
#sib-container {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    text-align: left;
}

#sib-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sib-form-block,
.sib-input.sib-form-block {
    padding: 0;
    margin: 0;
}

.form__entry,
.entry_block,
.form__label-row {
    width: 100%;
}

.entry__field {
    display: block;
    width: 100%;
}

#sib-form .input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(232, 236, 245, 0.18);
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.04em;
    padding: 0.7rem 0;
    transition: border-color 0.4s ease;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

#sib-form .input::placeholder {
    color: rgba(232, 236, 245, 0.32);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

#sib-form .input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

#sib-form .input:-webkit-autofill,
#sib-form .input:-webkit-autofill:hover,
#sib-form .input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--fg);
    -webkit-box-shadow: 0 0 0 30px rgba(20, 30, 60, 0.001) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.input--hidden {
    display: none !important;
}

/* error label under each input (Brevo populates dynamically) */
#sib-form .entry__error {
    display: none;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 300;
    color: rgba(255, 130, 150, 0.85) !important;
    background: transparent !important;
    border: none !important;
    padding: 0.4rem 0 0 !important;
    border-radius: 0 !important;
    text-align: left !important;
    letter-spacing: 0.08em;
}

#sib-form .entry__error:not(:empty) {
    display: block;
}

/* submit button — full width, glass */
.sib-form-block__button,
#sib-form .sib-form-block__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    width: 100%;
    background: linear-gradient(120deg, rgba(155, 213, 224, 0.18) 0%, rgba(124, 92, 196, 0.18) 100%) !important;
    border: 1px solid rgba(155, 213, 224, 0.35) !important;
    border-radius: 999px !important;
    color: var(--fg) !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    padding: 1rem 2rem !important;
    margin-top: 0.4rem;
    cursor: pointer;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    text-align: center !important;
}

.sib-form-block__button:hover,
.sib-form-block__button:focus-visible {
    background: linear-gradient(120deg, rgba(155, 213, 224, 0.3) 0%, rgba(124, 92, 196, 0.3) 100%) !important;
    border-color: rgba(155, 213, 224, 0.6) !important;
    box-shadow: 0 0 30px rgba(155, 213, 224, 0.2);
    outline: none;
}

.sib-form-block__button:active {
    transform: translateY(1px);
}

/* loader icon — hidden by default, Brevo shows during submit */
.sib-hide-loader-icon {
    display: none !important;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.sib-form-block__button-with-loader.sib-show-loader .sib-hide-loader-icon {
    display: inline-block !important;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* success / error panels — hidden by default, shown when Brevo adds --active */
.sib-form-message-panel {
    display: none;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    line-height: 1.5;
    text-align: left;
    border-radius: 8px !important;
    border: 1px solid !important;
    padding: 0.9rem 1rem !important;
    margin-bottom: 1rem;
    background: transparent !important;
}

.sib-form-message-panel.sib-form-message-panel--active {
    display: block;
    animation: panel-fade-in 0.2s ease forwards;
}

@keyframes panel-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sib-form-message-panel--error {
    color: rgba(255, 170, 180, 0.95) !important;
    border-color: rgba(255, 95, 140, 0.4) !important;
    background: rgba(255, 95, 140, 0.08) !important;
}

.sib-form-message-panel--success {
    color: rgba(150, 240, 200, 0.95) !important;
    border-color: rgba(95, 220, 180, 0.4) !important;
    background: rgba(95, 220, 180, 0.08) !important;
}

/* hide title + lead when success panel is active, so the success
   message is the only focus and there's no conflicting CTA copy */
.modal__card:has(.sib-form-message-panel--success.sib-form-message-panel--active) .modal__title,
.modal__card:has(.sib-form-message-panel--success.sib-form-message-panel--active) .modal__lead {
    display: none;
}

.sib-form-message-panel__text {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.sib-notification__icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    margin-top: 2px;
    fill: currentColor;
}

/* hide Brevo's default declaration block (we use modal__privacy instead) */
.sib-form__declaration {
    display: none;
}

/* ============================================
   Body lock when modal is open
   ============================================ */
body.modal-open {
    overflow: hidden;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .modal {
        padding: 1rem;
    }
    .modal__card {
        padding: 2rem 1.4rem;
    }
    .modal__title {
        font-size: 1.6rem;
    }
    .cta {
        font-size: 0.75rem;
        letter-spacing: 0.28em;
        padding: 0.85rem 1.8rem;
    }
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .cta {
        opacity: 1;
        animation: none;
    }
    .modal,
    .modal__card,
    .sib-form-block__button,
    .sib-hide-loader-icon,
    .sib-form-message-panel.sib-form-message-panel--active {
        transition: none !important;
        animation: none !important;
    }
}
