/* ============================================================
   popup.css — Welcome / email capture modal
   Colors aligned with the site palette:
   #053717 primary dark green  |  #0a4d23 secondary dark green
   #278e4d button green        |  #34a749 accent green
   #a8e6cf light mint          |  #e1ebdb pale green
   #ffffff
   ============================================================ */

.tn-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 55, 23, 0.62);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.tn-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tn-popup {
    position: relative;
    background: linear-gradient(160deg, #0a4d23 0%, #053717 55%, #032211 100%);
    color: #e1ebdb;
    border: 1px solid rgba(39, 142, 77, 0.35);
    border-radius: 20px;
    width: 100%;
    max-width: 470px;
    padding: 42px 34px 28px;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(255, 255, 255, .04) inset,
        0 0 46px rgba(39, 142, 77, .12);
    transform: translateY(18px) scale(.96);
    transition: transform .32s cubic-bezier(.2, .9, .3, 1.2);
    max-height: 92vh;
    overflow-y: auto;
}

.tn-popup-overlay.active .tn-popup {
    transform: translateY(0) scale(1);
}

.tn-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #ffffff;
    opacity: .55;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    transition: opacity .2s ease, background-color .2s ease, transform .2s ease;
}

.tn-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .1);
    transform: rotate(90deg);
}

.tn-popup h3 {
    font-size: 1.65rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: #ffffff;
    line-height: 1.2;
}

.tn-popup .tn-popup-sub {
    font-size: .95rem;
    line-height: 1.55;
    margin: 0 0 22px;
    color: #a8e6cf;
}

.tn-popup-label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #a8e6cf;
    margin-bottom: 12px;
}

.tn-audience {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.tn-audience-btn {
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, .06);
    border: 2px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 16px 10px 13px;
    cursor: pointer;
    transition: all .22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tn-audience-btn i {
    font-size: 1.25rem;
    color: #34a749;
    transition: color .2s ease, transform .2s ease;
}

.tn-audience-cap {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .3px;
    color: #a8e6cf;
}

.tn-audience-btn:hover {
    border-color: rgba(52, 167, 73, .7);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .09);
}

.tn-audience-btn:hover i {
    transform: scale(1.12);
}

.tn-popup .tn-audience-btn.selected {
    background: rgba(52, 167, 73, .16);
    border-color: #34a749;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(52, 167, 73, .5), 0 6px 22px rgba(52, 167, 73, .28);
}

.tn-popup .tn-audience-btn.selected i {
    color: #a8e6cf;
}

.tn-popup .tn-audience-btn.selected .tn-audience-cap {
    color: #a8e6cf;
}

.tn-role-wrap {
    display: none;
    margin-bottom: 16px;
}

.tn-role-wrap.visible {
    display: block;
    animation: tn-role-in .25s ease;
}

@keyframes tn-role-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tn-popup select,
.tn-popup input[type="email"] {
    width: 100%;
    font-family: inherit;
    font-size: .95rem;
    color: #ffffff;
    padding: 13px 14px;
    border: 2px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    outline: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.tn-popup select option {
    color: #053717;
    background: #ffffff;
}

.tn-popup input[type="email"]::placeholder {
    color: #a8e6cf;
}

.tn-popup select:focus,
.tn-popup input[type="email"]:focus {
    border-color: #34a749;
    background: rgba(255, 255, 255, .1);
}

.tn-email-row {
    margin-bottom: 12px;
}

.tn-popup-error {
    display: none;
    font-size: .82rem;
    color: #ffb3a0;
    margin: -4px 0 12px;
}

.tn-popup-error.visible {
    display: block;
}

.tn-popup-submit {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .3px;
    color: #ffffff;
    background: linear-gradient(135deg, #278e4d 0%, #34a749 100%);
    border: none;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(39, 142, 77, .35);
    transition: box-shadow .25s ease, transform .2s ease, filter .2s ease;
}

.tn-popup-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(39, 142, 77, .5);
}

.tn-popup-submit[disabled] {
    opacity: .65;
    cursor: default;
    transform: none;
}

.tn-popup-fine {
    font-size: .74rem;
    line-height: 1.5;
    color: #a8e6cf;
    margin: 14px 0 0;
    text-align: center;
}

.tn-popup-fine a {
    color: #ffffff;
    text-decoration: underline;
}

.tn-popup-thanks {
    text-align: center;
    padding: 12px 0 4px;
}

.tn-popup-thanks h3 {
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .tn-popup {
        padding: 36px 20px 22px;
    }

    .tn-popup h3 {
        font-size: 1.35rem;
    }

    .tn-audience {
        grid-template-columns: 1fr;
    }
}
