/* DM Serif Display Font Face Declarations */
@font-face {
    font-family: 'DMSerifDisplay';
    src: url('/img/fonts/DMSerifDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body, html, main {
    background: white !important;
    overflow-x: hidden !important;
}

section {
    overflow-x: hidden !important;
}

/* =====================
   Hero Section
   ===================== */
/* Skip navigation */
.skip-nav {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-nav:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: #00843e;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 99999;
    outline: 3px solid #ffd100;
    outline-offset: 2px;
}

.newsletter-hero-section {
    background: linear-gradient(to bottom, #00843e 0%, #00843e 40%, #007f79 100%);
    padding: 140px 20px 80px;
    text-align: center;
    font-family: 'DMSerifDisplay', serif;
}

.newsletter-hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.newsletter-hero-content {
    color: white;
}

.newsletter-hero-title {
    font-family: 'DMSerifDisplay', serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 24px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    line-height: 1.1;
}

.newsletter-hero-description {
    font-size: 1.5rem;
    color: white;
    opacity: 0.93;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 700px;
    font-family: sans-serif;
    font-weight: 400;
}

/* =====================
   Newsletter Options Section
   ===================== */
.newsletter-options-section {
    background: #f8f9fa;
    padding: 80px 20px;
}

.newsletter-options-container {
    max-width: 1200px;
    margin: 0 auto;
}

.newsletter-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

/* =====================
   Newsletter Cards
   ===================== */
.newsletter-card {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    border-top: 5px solid #00843e;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.13);
}

.newsletter-card-partner {
    border-top-color: #007f79;
}

.newsletter-card-icon {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.newsletter-card-icon img {
    filter: brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(600%) hue-rotate(115deg) brightness(90%);
}

.newsletter-card-partner .newsletter-card-icon img {
    filter: brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(400%) hue-rotate(155deg) brightness(85%);
}

.newsletter-card-title {
    font-family: 'DMSerifDisplay', serif;
    font-size: 2rem;
    color: #1a3d3e;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.newsletter-card-description {
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0 0 24px 0;
    flex-grow: 1;
}

.newsletter-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 36px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-card-features li {
    font-size: 1rem;
    color: #2d3748;
    padding-left: 28px;
    position: relative;
    line-height: 1.5;
}

.newsletter-card-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00843e;
    font-weight: 700;
    font-size: 1rem;
}

.newsletter-card-partner .newsletter-card-features li::before {
    color: #007f79;
}

.btn-newsletter-subscribe {
    display: inline-block;
    background: #ffd100;
    color: #0d3542;
    padding: 16px 32px;
    border-radius: 8px;
    border: none;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 14px rgba(255, 209, 0, 0.25);
    margin-top: auto;
}

.btn-newsletter-subscribe:hover {
    background: #e6bc00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 209, 0, 0.4);
}

.btn-newsletter-subscribe-partner {
    background: #00843e;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 132, 62, 0.25);
}

.btn-newsletter-subscribe-partner:hover {
    background: #006f34;
    box-shadow: 0 6px 20px rgba(0, 132, 62, 0.35);
}

/* =====================
   Bottom CTA Section
   ===================== */
.newsletter-cta-section {
    background: linear-gradient(to bottom, #00843e 0%, #007f79 100%);
    padding: 80px 20px;
    text-align: center;
}

.newsletter-cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.newsletter-cta-title {
    font-family: 'DMSerifDisplay', serif;
    font-size: 3rem;
    color: white;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.newsletter-cta-description {
    font-size: 1.2rem;
    color: white;
    opacity: 0.9;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.newsletter-cta-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-newsletter-cta {
    display: inline-block;
    background: #ffd100;
    color: #0d3542;
    padding: 16px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 209, 0, 0.3);
    letter-spacing: 0.5px;
}

.btn-newsletter-cta:hover {
    background: #e6bc00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 209, 0, 0.45);
    color: #0d3542;
}

.btn-newsletter-cta-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: none;
}

.btn-newsletter-cta-outline:hover {
    background: white;
    color: #0d3542;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

/* =====================
   Newsletter Modal
   ===================== */
.newsletter-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.newsletter-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-modal-content {
    background: white;
    padding: 50px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: newsletterModalSlideIn 0.3s ease-out;
}

@keyframes newsletterModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.newsletter-modal-close:hover {
    color: #000;
}

.newsletter-modal-title {
    font-family: 'DMSerifDisplay', serif;
    font-size: 2rem;
    color: #1a3d3e;
    margin: 0 0 15px 0;
    line-height: 1.2;
    padding-right: 30px;
}

.newsletter-modal-description {
    color: #4a5568;
    font-size: 1.05rem;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.newsletter-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-form-group label {
    font-weight: 600;
    color: #1a3d3e;
    font-size: 1rem;
}

.optional-label {
    font-weight: 400;
    color: #5c6678;
    font-size: 0.9rem;
}

.newsletter-form-group input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.newsletter-form-group input:focus {
    outline: none;
    border-color: #00843e;
    box-shadow: 0 0 0 3px rgba(0, 132, 62, 0.1);
}

.btn-newsletter-form-submit {
    background: #ffd100;
    color: #0d3542;
    padding: 16px 32px;
    border-radius: 8px;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.btn-newsletter-form-submit:hover {
    background: #e6bc00;
    transform: translateY(-1px);
}

.btn-newsletter-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.newsletter-privacy-notice {
    font-size: 0.85rem;
    color: #5c6678;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.newsletter-privacy-notice a {
    color: #00843e;
    text-decoration: underline;
}

.newsletter-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    line-height: 1.5;
}

.newsletter-message.success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.newsletter-message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 900px) {
    .newsletter-options-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .newsletter-hero-title {
        font-size: 3rem;
    }

    .newsletter-hero-description {
        font-size: 1.2rem;
    }

    .newsletter-cta-title {
        font-size: 2.2rem;
    }

    .newsletter-cta-links {
        flex-direction: column;
        align-items: center;
    }

    .btn-newsletter-cta {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .newsletter-hero-section {
        padding: 70px 20px 60px;
    }

    .newsletter-hero-title {
        font-size: 2.4rem;
    }

    .newsletter-options-section {
        padding: 50px 16px;
    }

    .newsletter-card {
        padding: 36px 24px;
    }

    .newsletter-modal-content {
        padding: 36px 24px;
    }

    .newsletter-modal-title {
        font-size: 1.6rem;
    }
}

/* Also bump mobile hero top padding to keep the extra breathing room */
@media (max-width: 600px) {
    .newsletter-hero-section {
        padding-top: 100px;
    }
}

/* =====================
   Focus indicators (WCAG 2.1 AA)
   ===================== */
.btn-newsletter-subscribe:focus-visible,
.btn-newsletter-subscribe-partner:focus-visible {
    outline: 3px solid #ffd100;
    outline-offset: 3px;
}

.btn-newsletter-form-submit:focus-visible {
    outline: 3px solid #00843e;
    outline-offset: 3px;
}

.newsletter-modal-close:focus-visible {
    outline: 3px solid #00843e;
    outline-offset: 3px;
    border-radius: 4px;
}

.newsletter-form-group input:focus-visible {
    outline: none;
    border-color: #00843e;
    box-shadow: 0 0 0 3px rgba(0, 132, 62, 0.2);
}

.newsletter-privacy-notice a:focus-visible {
    outline: 2px solid #00843e;
    outline-offset: 2px;
    border-radius: 2px;
}

/* =====================
   Reduced motion (WCAG 2.1 AA)
   ===================== */
@media (prefers-reduced-motion: reduce) {
    .newsletter-card,
    .btn-newsletter-subscribe,
    .btn-newsletter-subscribe-partner,
    .btn-newsletter-form-submit {
        transition: none;
    }

    .newsletter-modal-content {
        animation: none;
    }
}
