/* ============================================
   The Ondo Tokyo — Newsletter CTA Styles
   ============================================
   Created: 2026-05-10
   See: operations/nl-acquisition/cta-implementation-spec.md

   How to enqueue:
     Add to functions.php (or rely on enqueue in inc/nl-cta-functions.php):
     wp_enqueue_style('ondo-nl-cta',
       get_stylesheet_directory_uri() . '/assets/css/ondo-nl-cta.css',
       ['ondo-base'], '1.0.0');

   Or merge into ondo-base.css if preferred.
   ============================================ */

/* ─────────────────────────────────────────
   Inline CTA (article footer)
   ───────────────────────────────────────── */

.ondo-nl-cta {
    margin: 64px auto;
    max-width: 680px;
    background: var(--bg-tint, #fceeea);
    border: 1px solid var(--red-line, #faebe9);
    border-radius: 4px;
    padding: 40px 32px;
    text-align: center;
}

.ondo-nl-cta__inner {
    max-width: 540px;
    margin: 0 auto;
}

.ondo-nl-cta__kicker {
    font-family: var(--sans, "Inter", sans-serif);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red, #c8161e);
    display: block;
    margin-bottom: 12px;
}

.ondo-nl-cta__title {
    font-family: var(--serif, "Fraunces", Georgia, serif);
    font-style: italic;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.3;
    color: var(--ink, #0f0f0f);
    margin: 0 0 16px;
}

.ondo-nl-cta__lead {
    font-family: var(--body-jp, "Gen Interface JP"), var(--sans, "Inter"), sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft, #2a2a2a);
    margin: 0 0 24px;
}

.ondo-nl-cta__lead strong {
    color: var(--red, #c8161e);
    font-weight: 600;
}

.ondo-nl-cta__form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto 12px;
}

.ondo-nl-cta__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--rule, #e8e4dc);
    border-radius: 2px;
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 14px;
    background: #fff;
    color: var(--ink, #0f0f0f);
}

.ondo-nl-cta__input:focus {
    outline: none;
    border-color: var(--red, #c8161e);
    box-shadow: 0 0 0 3px rgba(200, 22, 30, 0.1);
}

.ondo-nl-cta__btn {
    background: var(--red, #c8161e);
    color: #fff;
    border: none;
    border-radius: 2px;
    padding: 12px 24px;
    font-family: var(--sans, "Inter", sans-serif);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.ondo-nl-cta__btn:hover,
.ondo-nl-cta__btn:focus {
    background: #a30e15;
    outline: none;
}

.ondo-nl-cta__fineprint {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 11px;
    color: var(--gray, #6b6b6b);
    margin: 0;
}

/* Mobile */
@media (max-width: 600px) {
    .ondo-nl-cta { padding: 32px 20px; margin: 48px auto; }
    .ondo-nl-cta__title { font-size: 22px; }
    .ondo-nl-cta__form { flex-direction: column; }
    .ondo-nl-cta__btn { width: 100%; padding: 14px 24px; }
}

/* ─────────────────────────────────────────
   Popup (80% scroll trigger)
   ───────────────────────────────────────── */

.ondo-nl-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ondo-nl-popup.is-open {
    display: flex;
    animation: ondoFadeIn 0.3s ease;
}

@keyframes ondoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ondo-nl-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ondo-nl-popup__inner {
    position: relative;
    background: #fff;
    border-radius: 4px;
    padding: 48px 40px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    animation: ondoPopupSlide 0.3s ease;
}

@keyframes ondoPopupSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ondo-nl-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--gray, #6b6b6b);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 2px;
    transition: color 0.15s ease;
}

.ondo-nl-popup__close:hover {
    color: var(--ink, #0f0f0f);
}

/* Reuse .ondo-nl-cta__* styles inside the popup */

@media (max-width: 600px) {
    .ondo-nl-popup__inner { padding: 40px 24px 32px; }
}

/* ─────────────────────────────────────────
   Top Bar (sticky banner)
   ───────────────────────────────────────── */

.ondo-nl-bar {
    background: var(--ink, #0f0f0f);
    color: #fff;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 13px;
}

.ondo-nl-bar__link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.ondo-nl-bar__link strong {
    color: var(--red, #c8161e);
    font-weight: 700;
}

.ondo-nl-bar__link:hover {
    text-decoration: underline;
}

.ondo-nl-bar__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.ondo-nl-bar__close:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .ondo-nl-bar { font-size: 12px; padding: 6px 12px; }
}
