/* ═══════════════════════════════════════════════════
   MAILON — COMING SOON  (Redesign v3)
   ─────────────────────────────────────
   Palette:
   - Background (Old Rose): #BE897E
   - Text (Warm Champagne / Matte Gold): #D2B56D
   - Gold Highlight:  #E2CA88
   - Gold Shadow:     #BA9C56
   - Envelope cream:  #F5F0E8
   - Turkish section: #E9E3D9
   - Seal accent:     #BE897E
   ═══════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Jost', sans-serif;
    background-color: #BE897E;
    color: #D2B56D;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════
   ENVELOPE INTRO
   Realistic broken-white envelope with gold details,
   realistic wax seal with logo-17 flower,
   handwritten Coming Soon, and LOVE sign-off.
   Opens on seal click or after 7 seconds.
   ═══════════════════════════════════════════════════ */
.envelope-intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 45%, #EFE8DC 0%, #DFD5C5 70%, #D4C8B5 100%);
    transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-intro.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-container {
    position: relative;
    width: min(540px, 92vw);
    height: min(720px, 88vh);
    perspective: 1200px;
}

/* ─── Envelope body (broken white paper) ─── */
.envelope-body {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, #FCFAF7 0%, #F7F3EB 70%, #F1ECE0 100%);
    border-radius: 4px;
    box-shadow:
        0 30px 80px rgba(80, 50, 40, 0.2),
        0 10px 30px rgba(80, 50, 40, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 68px 46px 46px;
    overflow: hidden;
}

/* Envelope fold lines SVG */
.envelope-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ─── Top handwritten "Coming Soon" ─── */
.envelope-top-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-top: 10px;
}

.envelope-quote {
    font-family: 'Caveat', cursive;
    font-weight: 500;
    font-size: clamp(2.5rem, 6vw, 3.4rem);
    color: #8C473E;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.02em;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(140, 71, 62, 0.12);
}

/* ─── Natural organic wax seal with larger logo-17 ─── */
.wax-seal-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
}

.wax-seal {
    position: relative;
    width: 140px;
    height: 140px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal:hover {
    transform: scale(1.06);
}

.wax-seal:active {
    transform: scale(0.96);
}

.wax-seal-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

/* Seal gold emblem (logo-17) — scaled up */
.seal-image {
    position: relative;
    z-index: 3;
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.75))
            drop-shadow(0 -0.5px 0.5px rgba(255, 255, 255, 0.35));
    opacity: 0.98;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.wax-seal:hover .seal-image {
    transform: scale(1.04);
}

/* Subtle interactive hint under seal */
.seal-click-hint {
    margin-top: 10px;
    font-family: 'Jost', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8C473E;
    opacity: 0.75;
    animation: pulseHint 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.75; transform: translateY(0); }
    50% { opacity: 0.35; transform: translateY(2px); }
}

/* Seal breaking animation */
.envelope-intro.opening .wax-seal {
    animation: sealBreak 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.envelope-intro.opening .seal-click-hint {
    opacity: 0;
    transition: opacity 0.2s ease;
}

@keyframes sealBreak {
    0% { transform: scale(1); opacity: 1; }
    35% { transform: scale(1.15) rotate(6deg); opacity: 1; }
    100% { transform: scale(0.75) rotate(-10deg); opacity: 0; }
}

/* ─── Bottom section: LOVE, The Mailon ─── */
.envelope-bottom {
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 1;
    padding-bottom: 10px;
}

.envelope-sign-off {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sign-love {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.32em;
    color: #8C473E;
    text-transform: uppercase;
    opacity: 0.9;
}

.sign-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.8vw, 2.15rem);
    color: #72271F;
    letter-spacing: 0.08em;
}

/* ─── Envelope flap ─── */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    z-index: -1;
    transform-origin: top center;
    transform: rotateX(0deg);
    pointer-events: none;
    background: linear-gradient(180deg, #F4EFE6 0%, #EDE6D8 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0;
}

/* Opening animation */
.envelope-intro.opening .envelope-container {
    animation: envelopeSlideUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes envelopeSlideUp {
    0% { transform: translateY(0); opacity: 1; }
    60% { transform: translateY(-24px) scale(0.99); opacity: 1; }
    100% { transform: translateY(-50px) scale(0.97); opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   PLAID / EKOSE PATTERN (more prominent — 18%)
   ═══════════════════════════════════════════════════ */
.plaid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.18;
    background:
        /* Vertical lines */
        repeating-linear-gradient(90deg,
            transparent,
            transparent 48px,
            #D2B56D 48px,
            #D2B56D 50px,
            transparent 50px,
            transparent 98px,
            #BA9C56 98px,
            #BA9C56 99px,
            transparent 99px),
        /* Horizontal lines */
        repeating-linear-gradient(0deg,
            transparent,
            transparent 48px,
            #D2B56D 48px,
            #D2B56D 50px,
            transparent 50px,
            transparent 98px,
            #BA9C56 98px,
            #BA9C56 99px,
            transparent 99px);
}

/* ═══════════════════════════════════════════════════
   MAIN PAGE
   ═══════════════════════════════════════════════════ */
.main-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    position: relative;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-page.visible {
    opacity: 1;
}

/* ─── Content Wrapper ─── */
.content-wrapper {
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════
   DECORATIVE CORNERS (reduced opacity)
   ═══════════════════════════════════════════════════ */
.deco-flower {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease 0.8s;
}

.main-page.visible .deco-flower {
    opacity: 0.025;
}

.deco-flower img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.deco-flower--top-right {
    top: -40px;
    right: -40px;
    width: 260px;
    height: 260px;
    transform: rotate(15deg);
}

.deco-flower--bottom-left {
    bottom: -30px;
    left: -50px;
    width: 200px;
    height: 200px;
    transform: rotate(-30deg) scaleX(-1);
}

/* ═══════════════════════════════════════════════════
   TOP LOGO (small, matching design, above card)
   ═══════════════════════════════════════════════════ */
.top-logo {
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: 0.1s;
}

.main-page.visible .top-logo {
    opacity: 1;
    transform: translateY(0);
}

.top-logo-img {
    width: 175px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(88%) sepia(22%) saturate(700%) hue-rotate(5deg) brightness(100%);
    opacity: 0.95;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-logo-img:hover {
    transform: scale(1.03);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   STORY CARD
   ═══════════════════════════════════════════════════ */
.story-card {
    width: 100%;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    transition-delay: 0.3s;
}

.main-page.visible .story-card {
    opacity: 1;
    transform: translateY(0);
}

.story-card-inner {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 55px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.4s ease;
}

.story-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(210, 181, 109, 0.12);
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

/* Subtle dapple hover effect */
.story-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(ellipse 120px 100px at 20% 30%, rgba(226, 202, 136, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 100px 130px at 70% 55%, rgba(226, 202, 136, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 80px 80px at 45% 80%, rgba(226, 202, 136, 0.04) 0%, transparent 70%);
    transition: opacity 0.6s ease;
}

.story-card-inner:hover::after {
    opacity: 1;
}

.story-card-inner:hover {
    box-shadow: 0 16px 65px rgba(0, 0, 0, 0.2);
}

/* ─── English Story ─── */
.story-english {
    background-color: #BE897E;
    padding: 48px 40px 38px;
    position: relative;
}

/* First paragraph: LARGER, highly readable, radiant shiny gold */
.story-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.22rem, 2.7vw, 1.48rem);
    line-height: 1.85;
    color: #F8E7AC;
    text-shadow: 0 1px 2px rgba(70, 25, 20, 0.4), 0 0 16px rgba(248, 231, 172, 0.3);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

/* ─── "Until one morning" — SMALLER, proportional, reverse of before ─── */
.story-ending {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    padding-top: 10px;
}

.story-handwritten {
    font-family: 'Caveat', cursive;
    font-weight: 500;
    font-size: clamp(1.22rem, 2.6vw, 1.52rem);
    color: #EBD595;
    line-height: 1.35;
    text-transform: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.story-plough {
    width: 95px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(85%) sepia(25%) saturate(600%) hue-rotate(10deg) brightness(95%);
    opacity: 0.88;
}

/* ─── Divider ─── */
.story-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(210, 181, 109, 0.25), transparent);
}

/* ─── Turkish Translation (#E9E3D9 background) ─── */
.story-turkish {
    background-color: #E9E3D9;
    padding: 34px 40px;
}

.story-text-tr {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.9vw, 1.02rem);
    line-height: 1.85;
    color: #4A3A2F;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.story-text-tr strong {
    font-weight: 600;
    color: #2D211A;
}

/* ═══════════════════════════════════════════════════
   CONTACT SECTION (more visible buttons)
   ═══════════════════════════════════════════════════ */
.contact-section {
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: 0.6s;
}

.main-page.visible .contact-section {
    opacity: 1;
    transform: translateY(0);
}

.contact-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 22px;
}

.contact-divider .divider-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(210, 181, 109, 0.5));
}

.contact-divider .divider-line:last-child {
    background: linear-gradient(90deg, rgba(210, 181, 109, 0.5), transparent);
}

.divider-ornament {
    font-size: 11px;
    color: #E2CA88;
    letter-spacing: 2px;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #FFF9ED;
    font-family: 'Jost', sans-serif;
    font-weight: 450;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    padding: 12px 30px;
    border-radius: 100px;
    border: 1px solid rgba(240, 220, 160, 0.55);
    background: rgba(245, 237, 225, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    text-shadow: 0 1px 2px rgba(80, 40, 30, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-link:hover {
    color: #FFFFFF;
    border-color: rgba(255, 240, 190, 0.9);
    background: rgba(245, 237, 225, 0.35);
    transform: translateY(-2px);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.18),
        0 0 20px rgba(226, 202, 136, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: #FFF4D6;
    transition: stroke 0.3s ease, transform 0.3s ease;
}

.contact-link:hover .contact-icon {
    stroke: #FFFFFF;
    transform: scale(1.08);
}

.copyright {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 0.76rem;
    color: #EAD8A8;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .main-page {
        padding: 32px 18px;
    }

    .envelope-body {
        padding: 48px 28px 40px;
    }

    .story-english {
        padding: 36px 24px 32px;
    }

    .story-turkish {
        padding: 24px;
    }

    .deco-flower--top-right {
        width: 160px;
        height: 160px;
    }

    .deco-flower--bottom-left {
        width: 130px;
        height: 130px;
    }

    .wax-seal {
        width: 120px;
        height: 120px;
    }

    .seal-image {
        width: 78px;
        height: 78px;
    }

    .top-logo-img {
        width: 145px;
    }
}

@media (max-width: 480px) {
    .envelope-container {
        width: 92vw;
        height: 84vh;
    }

    .envelope-body {
        padding: 44px 22px 34px;
    }

    .envelope-quote {
        font-size: 2.3rem;
    }

    .wax-seal {
        width: 108px;
        height: 108px;
    }

    .seal-image {
        width: 70px;
        height: 70px;
    }

    .sign-name {
        font-size: 1.5rem;
    }

    .top-logo-img {
        width: 135px;
    }

    .story-english {
        padding: 34px 22px 26px;
    }

    .story-text {
        font-size: 1.15rem;
        line-height: 1.75;
        margin-bottom: 20px;
    }

    .story-ending {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-top: 10px;
    }

    .story-handwritten {
        text-align: center;
        font-size: 1.25rem;
    }

    .story-plough {
        width: 80px;
    }

    .story-turkish {
        padding: 24px 20px;
    }

    .deco-flower--top-right {
        width: 100px;
        height: 100px;
    }

    .deco-flower--bottom-left {
        width: 80px;
        height: 80px;
    }
}

/* ═══════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .envelope-intro {
        display: none;
    }

    .main-page {
        opacity: 1;
    }

    .main-page .top-logo,
    .main-page .story-card,
    .main-page .contact-section {
        opacity: 1;
        transform: none;
    }

    .main-page .deco-flower {
        opacity: 0.025;
    }
}