
/* =========================================
   MAYZAY — SUBSCRIPTION & PRIVACY UI
   Cream · Navy · Warm Gold
========================================= */

/* Keep hidden components hidden regardless of display rules elsewhere. */
[hidden] {
    display: none !important;
}

:root {
    --engagement-navy: #10213b;
    --engagement-cream: #fbf8f1;
    --engagement-gold: #c69a54;
    --engagement-border: #e2dacb;
    --engagement-muted: #606775;
    --engagement-success: #21633f;
    --engagement-error: #a02c2c;
    --engagement-shadow: 0 28px 90px rgb(0 0 0 / 25%);
}

/* Prevent background scrolling while a modal is open. */
body.engagement-modal-open {
    overflow: hidden;
}

/* =========================================
   MODAL BACKDROP
========================================= */

.engagement-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: grid;
    place-items: center;

    overflow-x: hidden;
    overflow-y: auto;

    padding: 24px;

    background: rgb(10 20 36 / 66%);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.engagement-backdrop[hidden] {
    display: none !important;
}

/* =========================================
   MODAL PANEL
========================================= */

.engagement-modal {
    position: relative;

    box-sizing: border-box;
    width: min(100%, 490px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);

    overflow-x: hidden;
    overflow-y: auto;

    padding: clamp(26px, 5vw, 42px);

    border: 1px solid rgb(16 33 59 / 10%);
    border-radius: 22px;

    background: var(--engagement-cream);
    color: #17243a;

    box-shadow: var(--engagement-shadow);

    animation: engagement-enter 0.3s ease both;
    overscroll-behavior: contain;
}

@keyframes engagement-enter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   CLOSE BUTTON
========================================= */

.engagement-close {
    position: absolute;
    top: 14px;
    right: 15px;

    display: grid;
    place-items: center;

    width: 40px;
    height: 40px;
    padding: 0;

    border: 1px solid #e4ded2;
    border-radius: 50%;

    background: transparent;
    color: #17243a;

    font-family: Arial, sans-serif;
    font-size: 25px;
    line-height: 1;

    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.engagement-close:hover {
    border-color: #d4c8b5;
    background: #eee7db;
}

/* Keyboard focus visibility. */
.engagement-close:focus-visible,
.cookie-banner button:focus-visible,
.engagement-modal button:focus-visible,
.engagement-modal input:focus-visible,
.cookie-category-toggle:focus-within {
    outline: 3px solid var(--engagement-gold);
    outline-offset: 3px;
}

/* =========================================
   EYEBROW AND BRAND MARK
========================================= */

.engagement-eyebrow {
    display: block;
    margin-bottom: 16px;

    color: #8a6a35;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.5;
}

.newsletter-mark {
    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;
    margin-bottom: 19px;

    border-radius: 16px;

    background: var(--engagement-navy);
    color: #f5dfb6;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
}

/* =========================================
   MODAL TYPOGRAPHY
========================================= */

.engagement-modal h2 {
    margin: 0 0 13px;

    color: var(--engagement-navy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 2.35rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.engagement-modal > p {
    color: #5d6470;
    font-size: 0.96rem;
    line-height: 1.75;
}

.engagement-modal a,
.cookie-copy a {
    color: #765728;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.engagement-modal a:hover,
.cookie-copy a:hover {
    color: var(--engagement-navy);
}

/* =========================================
   NEWSLETTER FORM
========================================= */

#newsletterForm {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

#newsletterForm > label:not(.newsletter-consent) {
    color: #17243a;
    font-size: 0.9rem;
    font-weight: 600;
}

#newsletterEmail {
    box-sizing: border-box;
    width: 100%;
    min-height: 53px;
    padding: 14px 16px;

    border: 1px solid #d8d2c6;
    border-radius: 9px;

    background: #fff;
    color: #17243a;

    font-family: inherit;
    font-size: 1rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#newsletterEmail::placeholder {
    color: #89909a;
}

#newsletterEmail:focus {
    border-color: #9d7a42;
    outline: none;
    box-shadow: 0 0 0 3px rgb(198 154 84 / 18%);
}

.newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    color: #5d6470;
    font-size: 0.84rem;
    line-height: 1.6;
}

.newsletter-consent input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 4px;

    accent-color: var(--engagement-navy);
    cursor: pointer;
}

.newsletter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    padding: 13px 18px;

    border: 0;
    border-radius: 8px;

    cursor: pointer;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.newsletter-submit:hover:not(:disabled) {
    transform: translateY(-1px);
}

.newsletter-submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

/* Screen-reader-friendly feedback area. */
.engagement-feedback {
    margin: 0;

    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.engagement-feedback:empty {
    display: none;
}

.engagement-feedback.is-success {
    color: var(--engagement-success);
}

.engagement-feedback.is-error {
    color: var(--engagement-error);
}

.engagement-privacy {
    margin: 16px 0 0;
    font-size: 0.8rem !important;
    text-align: center;
}

/* Basic anti-spam honeypot. */
.newsletter-honeypot {
    position: absolute !important;
    left: -10000px !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;
}

/* =========================================
   COOKIE CONSENT BANNER
========================================= */

.cookie-banner {
    position: fixed;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 9000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    box-sizing: border-box;
    width: auto;
    max-width: 1120px;
    max-height: 80vh;
    max-height: 80dvh;

    margin-inline: auto;
    padding: 22px;

    overflow-y: auto;

    border: 1px solid var(--engagement-border);
    border-radius: 16px;

    background: var(--engagement-cream);
    color: #17243a;

    box-shadow: 0 18px 60px rgb(0 0 0 / 16%);
    overscroll-behavior: contain;
}

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-copy {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    min-width: 0;
}

.cookie-symbol {
    display: grid;
    flex: 0 0 40px;
    place-items: center;

    width: 40px;
    height: 40px;

    border-radius: 12px;

    background: #eae3d6;
    color: var(--engagement-navy);

    font-size: 1.4rem;
}

.cookie-copy h2 {
    margin: 0 0 7px;
    color: var(--engagement-navy);
    font-size: 1rem;
    line-height: 1.4;
}

.cookie-copy p {
    max-width: 580px;
    margin: 0 0 7px;

    color: var(--engagement-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.cookie-copy a {
    font-size: 0.86rem;
}

/* Cookie actions. */
.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.cookie-actions .button {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 0.84rem;
    cursor: pointer;
}

.cookie-preferences {
    min-height: 40px;
    padding: 9px 10px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #17243a;

    font-family: inherit;
    font-size: 0.84rem;
    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;
}

.cookie-preferences:hover {
    background: #eee7db;
}

/* =========================================
   COOKIE PREFERENCES DIALOG
========================================= */

.cookie-preferences-modal {
    width: min(100%, 520px);
}

.cookie-preferences-modal > p {
    color: #5d6470;
    font-size: 0.94rem;
    line-height: 1.7;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 16px 0;

    border-bottom: 1px solid #e5dfd4;
}

.cookie-category strong {
    color: #17243a;
    font-size: 0.95rem;
}

.cookie-category p,
.cookie-category small {
    display: block;
    margin: 6px 0 0;

    color: var(--engagement-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.cookie-required {
    flex: 0 0 auto;
    color: #47654f;
    font-size: 0.78rem;
    font-weight: 700;
}

.cookie-category-toggle {
    cursor: pointer;
}

.cookie-category-toggle input {
    flex: 0 0 auto;

    width: 19px;
    height: 19px;

    accent-color: var(--engagement-navy);
    cursor: pointer;
}

.cookie-save {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin-top: 22px;

    cursor: pointer;
}

/* =========================================
   ACCESSIBILITY UTILITIES
========================================= */

.visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================
   MOBILE AND SMALL SCREENS
========================================= */

@media (max-width: 760px) {
    .cookie-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;

        align-items: stretch;
        flex-direction: column;
        gap: 16px;

        max-height: 80vh;
        max-height: 80dvh;

        padding: 17px;
        border-radius: 14px;
    }

    .cookie-actions {
        justify-content: stretch;
    }

    .cookie-actions .button {
        flex: 1 1 130px;
    }

    .cookie-preferences {
        flex: 1 1 100%;
        min-height: 42px;
    }

    .engagement-backdrop {
        place-items: center;
        padding: 14px;
    }

    .engagement-modal {
        width: 100%;
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);

        padding: 27px 22px;
        border-radius: 17px;
    }

    .engagement-close {
        top: 10px;
        right: 10px;
    }

    .newsletter-mark {
        margin-top: 4px;
    }
}

@media (max-width: 380px) {
    .cookie-copy {
        gap: 10px;
    }

    .cookie-symbol {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .cookie-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions .button,
    .cookie-preferences {
        width: 100%;
    }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    .engagement-modal {
        animation: none;
    }

    .engagement-close,
    .newsletter-submit,
    #newsletterEmail {
        transition: none;
    }

    .newsletter-submit:hover:not(:disabled) {
        transform: none;
    }
}



/* ==========================================
   MAYZAY.DEV — POLICY PAGES
   Privacy Policy, Cookie Policy & Terms
========================================== */

.policy-page {
    min-height: 70vh;
    padding: 100px 24px 90px;
    background: #f8f5ef;
    color: #10213b;
}

.policy-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.policy-header {
    margin-bottom: 42px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(16, 33, 59, 0.15);
}

.policy-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: #a87528;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.policy-header h1 {
    margin: 0 0 16px;
    color: #10213b;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 600;
    line-height: 1.15;
}

.policy-header p {
    margin: 0;
    color: #5d6674;
    font-size: 1rem;
    line-height: 1.8;
}

.policy-updated {
    display: block;
    margin-top: 18px;
    color: #747b85;
    font-size: 0.85rem;
}

.policy-content {
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.policy-content h2 {
    margin: 38px 0 14px;
    color: #10213b;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 600;
    line-height: 1.35;
}

.policy-content h3 {
    margin: 26px 0 10px;
    color: #10213b;
    font-size: 1.08rem;
    font-weight: 700;
}

.policy-content p {
    margin: 0 0 18px;
    color: #465264;
}

.policy-content ul,
.policy-content ol {
    margin: 0 0 24px;
    padding-left: 26px;
    color: #465264;
}

.policy-content li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.policy-content a {
    color: #98651d;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(152, 101, 29, 0.4);
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.policy-content a:hover {
    color: #10213b;
}

.policy-content strong {
    color: #10213b;
    font-weight: 700;
}

.policy-content blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 3px solid #c69a51;
    border-radius: 0 8px 8px 0;
    background: rgba(198, 154, 81, 0.09);
    color: #465264;
}

.policy-content hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid rgba(16, 33, 59, 0.13);
}

.policy-content table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    background: #fff;
}

.policy-content th,
.policy-content td {
    padding: 14px 16px;
    border: 1px solid #e5e0d7;
    text-align: left;
    vertical-align: top;
}

.policy-content th {
    background: #10213b;
    color: #fff;
    font-weight: 600;
}

.policy-content td {
    color: #465264;
}

.policy-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(16, 33, 59, 0.15);
    color: #747b85;
    font-size: 0.9rem;
}

.policy-footer a {
    color: #98651d;
    font-weight: 600;
    text-decoration: none;
}

.policy-footer a:hover {
    text-decoration: underline;
}

/* Mobile layout */
@media (max-width: 768px) {
    .policy-page {
        padding: 76px 18px 64px;
    }

    .policy-header {
        margin-bottom: 30px;
        padding-bottom: 22px;
    }

    .policy-content {
        font-size: 0.96rem;
        line-height: 1.8;
    }

    .policy-content h2 {
        margin-top: 30px;
    }

    .policy-content table {
        display: block;
        overflow-x: auto;
        white-space: normal;
    }

    .policy-content th,
    .policy-content td {
        min-width: 140px;
        padding: 11px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .policy-content a {
        transition: none;
    }
}
