/* Homepage newsletter pop-up (November 2026). Loaded on the homepage only (inc/newsletter-popup.php).
   Layout follows Victor's mock-up: blue brand panel on the left, copy and sign-up form on the right. */

.tkn-popup[hidden] {
    display: none;
}

html.tkn-popup-open {
    overflow: hidden;
}

.tkn-popup {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tkn-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 23, 54, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tkn-popup__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    width: min(1000px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(11, 23, 54, 0.3);
    outline: none;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tkn-popup.is-open .tkn-popup__overlay {
    opacity: 1;
}

.tkn-popup.is-open .tkn-popup__dialog {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .tkn-popup__overlay,
    .tkn-popup__dialog {
        transition: none;
    }
}

/* Left: brand panel with the concentric-rings motif */
.tkn-popup__brand {
    position: relative;
    overflow: hidden;
    padding: 40px 36px;
    color: #fff;
    background: #0039DB;
}

.tkn-popup__brand::before {
    content: "";
    position: absolute;
    width: 820px;
    height: 820px;
    right: -470px;
    top: -230px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, rgba(255, 255, 255, 0.13) 0 1.5px, transparent 1.5px 16px);
    pointer-events: none;
}

.tkn-popup__brand > * {
    position: relative;
}

.tkn-popup__logo {
    display: block;
    width: 168px;
    height: auto;
    margin-bottom: 72px;
}

.tkn-popup__eyebrow {
    margin: 0 0 14px;
    font-family: "AssistantBold", sans-serif;
    font-size: 28px;
    line-height: 1.2;
    color: #fff;
}

.tkn-popup__lede {
    margin: 0;
    max-width: 270px;
    font-family: "AssistantRegular", sans-serif;
    font-size: 19px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

/* Right: copy and form */
.tkn-popup__body {
    padding: 48px 48px 44px;
}

.tkn-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #4F5B71;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tkn-popup__close:hover,
.tkn-popup__close:focus-visible {
    background: #EBF1FE;
    color: #0039DB;
}

#tkn-newsletter-popup h2.tkn-popup__title {
    width: auto;
    margin: 0 0 16px;
    padding-right: 24px;
    text-align: left;
    font-family: "GothamRegular", sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0039DB;
}

.tkn-popup__text {
    margin: 0;
    font-family: "AssistantRegular", sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: #505050;
}

/* Gravity Forms inside the pop-up */
#tkn-newsletter-popup .gform_wrapper {
    /* Gravity Forms' own theme reads these: brand blue for its tick box and focus states. */
    --gf-color-primary: #0039DB;
    --gf-color-primary-rgb: 0, 57, 219;
    --gf-color-primary-darker: #002BA8;
    --gf-color-primary-lighter: #4BAAD7;
    --gf-ctrl-border-color: #D6DEEA;
    margin: 24px 0 0;
    font-family: "AssistantRegular", sans-serif;
}

#tkn-newsletter-popup .gform_wrapper * {
    font-family: inherit;
}

#tkn-newsletter-popup .gform_heading {
    display: none;
}

#tkn-newsletter-popup .gform_fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
}

#tkn-newsletter-popup .gfield_label {
    display: block;
    margin: 0 0 6px;
    font-family: "AssistantSemiBold", sans-serif;
    font-size: 15px;
    color: #1B2433;
}

#tkn-newsletter-popup .gfield_required {
    display: none;
}

#tkn-newsletter-popup input[type="email"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid #D6DEEA;
    border-radius: 12px;
    background: #fff;
    font-family: "AssistantRegular", sans-serif;
    font-size: 16px;
    color: #1B2433;
    box-shadow: none;
}

#tkn-newsletter-popup input[type="email"]:focus {
    border-color: #0039DB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 57, 219, 0.15);
}

#tkn-newsletter-popup .ginput_container_consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#tkn-newsletter-popup .ginput_container_consent input[type="checkbox"] {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    cursor: pointer;
}

#tkn-newsletter-popup .gfield_consent_label {
    font-family: "AssistantRegular", sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #1B2433;
    cursor: pointer;
}

#tkn-newsletter-popup .tkn-popup__note,
#tkn-newsletter-popup .tkn-popup__note p {
    margin: 0;
    font-family: "AssistantRegular", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #6B7280;
}

#tkn-newsletter-popup .tkn-popup__note a {
    color: #0039DB;
    text-decoration: underline;
}

#tkn-newsletter-popup .gform_footer {
    margin: 20px 0 0;
    padding: 0;
}

#tkn-newsletter-popup .tkn-popup__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 34px;
    border: 0;
    border-radius: 1000px;
    background: #0039DB;
    font-family: "AssistantSemiBold", sans-serif;
    font-size: 17px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

#tkn-newsletter-popup .tkn-popup__submit:hover,
#tkn-newsletter-popup .tkn-popup__submit:focus-visible {
    background: #002BA8;
}

#tkn-newsletter-popup .gform_validation_errors {
    display: none;
}

#tkn-newsletter-popup .validation_message,
#tkn-newsletter-popup .gfield_validation_message {
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: "AssistantRegular", sans-serif;
    font-size: 14px;
    color: #C0262D;
}

#tkn-newsletter-popup .gfield_error input[type="email"] {
    border-color: #C0262D;
}

#tkn-newsletter-popup .gform_confirmation_message {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #EBF1FE;
    font-family: "AssistantSemiBold", sans-serif;
    font-size: 17px;
    color: #0039DB;
}

/* Small screens: the brand panel becomes a slim band across the top */
@media (max-width: 768px) {
    .tkn-popup {
        padding: 12px;
    }

    .tkn-popup__dialog {
        grid-template-columns: minmax(0, 1fr);
        max-height: calc(100vh - 24px);
        border-radius: 20px;
    }

    .tkn-popup__brand {
        padding: 18px 64px 18px 22px;
    }

    .tkn-popup__logo {
        width: 120px;
        margin: 0 0 12px;
    }

    .tkn-popup__eyebrow {
        margin: 0 0 4px;
        font-size: 18px;
    }

    .tkn-popup__lede {
        max-width: none;
        font-size: 15px;
    }

    .tkn-popup__close {
        top: 10px;
        right: 10px;
        color: #fff;
    }

    .tkn-popup__close:hover,
    .tkn-popup__close:focus-visible {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .tkn-popup__body {
        padding: 24px 22px 24px;
    }

    .tkn-popup__text {
        font-size: 16px;
    }

    #tkn-newsletter-popup .tkn-popup__submit {
        width: 100%;
    }
}
