/* ==========================================================================
   MOLVIZADAH SONS — 404 / NOT FOUND PAGE (ms-nf- prefix)
   Isolated from every other page's CSS prefix in this theme.
   Colors: bg #F8F5EF | gold #CE9847 | text #111111 | secondary #5F5F5F
   Fonts:  404 Number — Cormorant Garamond | Heading / Body / Button — Inter
   ========================================================================== */

.ms-nf-section {
    --nf-bg:        #F8F5EF;
    --nf-gold:      #CE9847;
    --nf-text:      #111111;
    --nf-secondary: #5F5F5F;
  
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;

    /* Default cream background — overridden by inline style when image is set */
    background-color: var(--nf-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
}
.ms-nf-section * { box-sizing: border-box; }

/* ---------------------------------------------------------------------
   DARK OVERLAY — only rendered when a background image is set
--------------------------------------------------------------------- */
.ms-nf-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* ---------------------------------------------------------------------
   MAIN CONTENT
--------------------------------------------------------------------- */
.ms-nf-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    width: calc(100% - 80px);
    margin: 0 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    animation: ms-nf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ms-nf-fade-up {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 404 large number */
.ms-nf-number {
    display: block;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(120px, 18vw, 200px);
    line-height: 0.85;
    letter-spacing: 0.04em;
    color: var(--nf-gold);
    margin-bottom: 20px;
}

/* When there is a bg image, make the number white for contrast */
.ms-nf-section[style*="background-image"] .ms-nf-number {
    color: #FFFFFF;
}

/* Thin grey divider line — matches Thank You page */
.ms-nf-divider {
    width: 80px;
    height: 1px;
    background-color: #D1D5DB;
    margin: 0 auto 24px auto;
    opacity: 0;
    animation: ms-nf-fade-in 0.8s ease 0.3s forwards;
}

/* Semi-white divider over bg image */
.ms-nf-section[style*="background-image"] .ms-nf-divider {
    background-color: rgba(255, 255, 255, 0.55);
}

@keyframes ms-nf-fade-in {
    to { opacity: 1; }
}

/* PAGE NOT FOUND heading — Cormorant Garamond, black, same as Thank You page */
.ms-nf-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(32px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1C1C1C;
    margin: 0 0 20px 0;
}

/* White heading over bg image */
.ms-nf-section[style*="background-image"] .ms-nf-heading {
    color: #FFFFFF;
}

/* Description */
.ms-nf-desc {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    color: var(--nf-secondary);
    margin: 0 0 36px 0;
}

/* White-ish description over bg image */
.ms-nf-section[style*="background-image"] .ms-nf-desc {
    color: rgba(255, 255, 255, 0.85);
}

.ms-nf-desc-gold {
    color: var(--nf-gold);
    font-weight: 600;
}

/* Gold pill button — matches other pages */
.ms-nf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 32px;
    background: #CE9847;
    border: 1px solid #CE9847;
    border-radius: 9999px;
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(206, 152, 71, 0.25);
    transition: all 0.3s ease;
}

.ms-nf-btn-arrow {
    transition: transform 0.3s ease;
    stroke: currentColor;
}

.ms-nf-btn:hover {
    background: #B5853E;
    border-color: #B5853E;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(206, 152, 71, 0.35);
}

.ms-nf-btn:hover .ms-nf-btn-arrow {
    transform: translateX(-4px);
}

.ms-nf-btn:focus-visible {
    outline: 2px solid #CE9847;
    outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ms-nf-content { padding: 32px; }
    .ms-nf-number { font-size: 140px; margin-bottom: 20px; }
    .ms-nf-btn { padding: 0 28px; }
}

@media (max-width: 640px) {
    .ms-nf-content { padding: 20px; width: calc(100% - 40px); }
    .ms-nf-number { font-size: 110px; margin-bottom: 16px; }
    .ms-nf-divider { width: 48px; margin-bottom: 24px; }
    .ms-nf-heading { margin-bottom: 18px; }
    .ms-nf-desc { font-size: 15px; margin-bottom: 28px; }
    .ms-nf-btn { width: 100%; height: 52px; font-size: 13px; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .ms-nf-content,
    .ms-nf-divider {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
