/* =========================================================
   Nothing but Joyful – main.css
   Design tokens + global resets + layout utilities
   ========================================================= */

:root {
    /* Colors */
    --color-navy:     #1a2f5a;
    --color-blue:     #1e4db7;
    --color-teal:     #2d7dd2;
    --color-gold:     #f5a623;
    --color-white:    #ffffff;
    --color-offwhite: #f8f9ff;
    --color-text:     #2c3e6b;
    --color-muted:    #6b7a99;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body:    'Source Sans 3', sans-serif;

    /* Spacing */
    --section-pad: clamp(3rem, 8vw, 7rem);
    --card-radius: 1.25rem;
    --card-shadow: 0 8px 40px rgba(30, 58, 110, 0.13);
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-offwhite);
    margin: 0;
}

.nbj-home {
    overflow-x: hidden;
}

/* ── Hero ──────────────────────────────────────────────── */
.nbj-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../img/beach-bg.jpg');
    background-size: cover;
    background-position: center top;
    padding: var(--section-pad) 1.5rem;
}

.nbj-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.55)
    );
    pointer-events: none;
}

.nbj-hero__content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
}

.nbj-hero__eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-teal);
    margin: 0 0 1rem;
}

.nbj-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.1;
    margin: 0 0 0.25rem;
}

.nbj-hero__subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 400;
    color: var(--color-teal);
    margin: 0 0 1.25rem;
}

.nbj-hero__subtext {
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0 0 2.5rem;
    opacity: 0.9;
}

/* ── Radio Jars hidden container ──────────────────────── */
.nbj-rj-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ── Subscribe ────────────────────────────────────────── */
.nbj-subscribe {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 2.5rem 1.5rem;
}

.nbj-subscribe__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.nbj-subscribe__icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.nbj-subscribe__copy {
    flex: 1 1 260px;
}

.nbj-subscribe__copy strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nbj-subscribe__copy p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.nbj-subscribe__form {
    flex: 0 1 460px;
}

/* ── EmailOctopus embed overrides ─────────────────────── */

/* 1. Nuclear reset: strip background/shadow from every element EO injects */
.nbj-subscribe__form--eo *:not(input) {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* 2. Strip all structural chrome — use the data-form attribute in the
   selector to reach specificity 0,3,0 and beat EO's own !important rules
   (EO's selectors are only 0,2,0). */
.nbj-subscribe__form--eo [data-form="f45e9d6c-5875-11f1-be10-4f524cf7ba82"].inline-container {
    max-width: 100% !important;
    width: 100% !important;
    position: static !important;
}

.nbj-subscribe__form--eo .inline-container,
.nbj-subscribe__form--eo .eo-form-wrapper,
.nbj-subscribe__form--eo .form-container,
.nbj-subscribe__form--eo .emailoctopus-form-wrapper,
.nbj-subscribe__form--eo .emailoctopus-form-default {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    min-height: 0 !important;
    height: auto !important;
}

/* EO's .form-row has margin: 0 -5px which causes overflow; zero it out */
.nbj-subscribe__form--eo .form-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* EO's .form-group adds margin-bottom: 1rem between rows */
.nbj-subscribe__form--eo .form-group {
    margin-bottom: 0 !important;
}

/* 3. Make the <form> a flex row.
   NO !important on display so EO can set display:none after a successful
   submission — inline styles beat !important and we don't want to
   keep the form visible after the user subscribes. */
.nbj-subscribe__form--eo .emailoctopus-form {
    display: flex;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
}

/* 4. Row wrappers – flex children, no extra spacing, same height */
.nbj-subscribe__form--eo .emailoctopus-form-row,
.nbj-subscribe__form--eo .emailoctopus-form-row-subscribe {
    display: flex !important;
    align-items: stretch !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
}

.nbj-subscribe__form--eo .emailoctopus-form-row-subscribe {
    flex: 0 0 auto !important;
}

/* 5. Hide EO's own headings, description text, and "Powered by" footer */
.nbj-subscribe__form--eo h1,
.nbj-subscribe__form--eo h2,
.nbj-subscribe__form--eo h3,
.nbj-subscribe__form--eo .masfoot,
.nbj-subscribe__form--eo .emailoctopus-form-heading,
.nbj-subscribe__form--eo p:not(.emailoctopus-error-message):not(.emailoctopus-success-message) {
    display: none !important;
}

/* Show success/error messages */
.nbj-subscribe__form--eo .emailoctopus-success-message:not(:empty),
.nbj-subscribe__form--eo .emailoctopus-error-message:not(:empty) {
    display: block !important;
    color: var(--color-white) !important;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.5rem !important;
}

/* 6. Honeypot – stay invisible */
.nbj-subscribe__form--eo input[tabindex="-1"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 7. Email input – white pill, fills its row wrapper.
   Also target .form-control which EO adds to the input and sets a
   Bootstrap calc() height that fights our explicit height. */
.nbj-subscribe__form--eo input[type="email"],
.nbj-subscribe__form--eo input.form-control[type="email"] {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 2.75rem !important;
    padding: 0 1.25rem !important;
    border: none !important;
    border-radius: 3rem !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    color: var(--color-text) !important;
    background-color: var(--color-white) !important;
    box-shadow: none !important;
    margin: 0 !important;
    outline-offset: 2px;
    box-sizing: border-box !important;
}

/* 8. Submit button – same height as input, pill shape */
.nbj-subscribe__form--eo input[type="submit"] {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 2.75rem !important;
    padding: 0 1.75rem !important;
    border-radius: 3rem !important;
    border: 2px solid rgba(255,255,255,0.35) !important;
    background-color: var(--color-blue) !important;
    color: var(--color-white) !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin: 0 !important;
    line-height: 2.75rem !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s, border-color 0.2s;
}

.nbj-subscribe__form--eo input[type="submit"]:hover,
.nbj-subscribe__form--eo input[type="submit"]:focus {
    background-color: var(--color-navy) !important;
    border-color: var(--color-white) !important;
    outline: none !important;
}

/* ── Features ─────────────────────────────────────────── */
.nbj-features {
    background-color: var(--color-offwhite);
    padding: var(--section-pad) 1.5rem;
}

.nbj-features__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.nbj-feature-card {
    text-align: center;
    padding: 2rem 1.25rem;
}

.nbj-feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: rgba(45, 125, 210, 0.12);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-teal);
}

.nbj-feature-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy);
    margin: 0 0 0.5rem;
}

.nbj-feature-card__body {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.6;
}

/* ── Live badge animations ────────────────────────────── */
@keyframes pulse-bars {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.nbj-live-badge.is-playing {
    animation: pulse-bars 1.2s ease-in-out infinite;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .nbj-subscribe {
        padding: 1.75rem 1.25rem;
    }

    .nbj-subscribe__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
        text-align: left;
    }

    /* Inline icon with heading on mobile */
    .nbj-subscribe__icon {
        display: none;
    }

    .nbj-subscribe__copy strong::before {
        content: '🔔 ';
    }

    .nbj-subscribe__copy {
        flex: none;
        width: 100%;
    }

    .nbj-subscribe__form {
        width: 100%;
    }

    .nbj-subscribe-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nbj-subscribe-form input[type="email"],
    .nbj-subscribe-form button {
        width: 100%;
        box-sizing: border-box;
    }

    /* EmailOctopus – stack to full-width columns on mobile */
    .nbj-subscribe__form--eo .emailoctopus-form {
        flex-direction: column !important;
    }

    .nbj-subscribe__form--eo .emailoctopus-form-row,
    .nbj-subscribe__form--eo .emailoctopus-form-row-subscribe {
        width: 100% !important;
        flex: none !important;
    }

    .nbj-subscribe__form--eo input[type="email"],
    .nbj-subscribe__form--eo input[type="submit"] {
        width: 100% !important;
        flex: none !important;
        box-sizing: border-box !important;
    }

    /* After successful subscription collapse the form area neatly */
    .nbj-subscribe__form--eo .inline-container,
    .nbj-subscribe__form--eo .eo-form-wrapper,
    .nbj-subscribe__form--eo .form-container,
    .nbj-subscribe__form--eo .emailoctopus-form-wrapper {
        min-height: 0 !important;
        height: auto !important;
    }

    /* Success message – style it to fit the navy bar */
    .nbj-subscribe__form--eo .emailoctopus-success-message:not(:empty) {
        font-size: 0.95rem !important;
        padding: 0.5rem 0 !important;
        margin: 0 !important;
    }
}
