/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Neue Haas Unica Pro', 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* ===================================
   Typography & Font Imports
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@300;400;500&family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;1,400&display=swap');

@font-face {
    font-family: 'Forfelast Royalten';
    src: url('../fonts/ForfelastRoyalten-wowK3.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Unica Pro';
    src: url('../fonts/Neue Haas Unica Pro.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Lucia BT';
    src: url('../fonts/Lucia BT.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Font fallbacks for custom fonts */
.couple-names {
    font-family: 'Forfelast Royalten', 'Cormorant', serif;
    /* Using Forfelast Royalten as proxy for Clamofte */
    font-weight: 400;
    font-style: normal;
    font-size: 27px;
    line-height: 100%;
    letter-spacing: 0%;
    text-transform: uppercase;
    color: #000000;
}

.guest-name-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.dear-text {
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0.05em;
    color: #000000;
    margin: 0;
    /* Remove margin to align with name */
}

.guest-name {
    display: flex;
    align-items: baseline;
    margin: 0;
    justify-content: center;
    /* Ensure content is centered */
}

.guest-first-letter {
    font-family: 'Lucia BT', 'Pinyon Script', cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 40.53px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #000000;
    transform: translateY(5px);
    /* Adjust vertical alignment */
    display: inline-block;
    /* Ensure transform works */
}

.guest-rest-name {
    font-family: 'Forfelast Royalten', 'Cormorant', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 21.05px;
    line-height: 100%;
    letter-spacing: 0.05em;
    /* 5% */
    text-transform: uppercase;
    color: #000000;
    margin-left: 2px;
    display: inline-block;
}

.message-text {
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    /* 5% */
    text-align: center;
    color: #000000;
}

.cta-button {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0.8px;
    /* 5% of 16px */
    text-align: right;
}

/* ===================================
   Header Styles
   =================================== */
/* ===================================
   Header Styles
   =================================== */
.header {
    /* Hide header completely as requested (cleaning up white bar) */
    display: none;
}

/* Hamburger Menu - Floating Top Right */
.menu-toggle {
    position: fixed;
    top: 40px;
    /* Adjusted spacing */
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 9999;
}

@media (min-width: 768px) {
    .menu-toggle {
        right: 48px;
    }
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #C7BAA3;
    /* Gold color for visibility on dark background */
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    background-color: #C7BAA3;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background-color: #C7BAA3;
}

/* ===================================
   Navigation Menu
   =================================== */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 40px 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.nav-menu.active {
    right: 0;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.nav-menu.active li {
    opacity: 1;
    transform: translateX(0);
}

.nav-menu.active li:nth-child(1) {
    transition-delay: 0.1s;
}

.nav-menu.active li:nth-child(2) {
    transition-delay: 0.15s;
}

.nav-menu.active li:nth-child(3) {
    transition-delay: 0.2s;
}

.nav-menu.active li:nth-child(4) {
    transition-delay: 0.25s;
}

.nav-menu.active li:nth-child(5) {
    transition-delay: 0.3s;
}

.nav-menu a {
    font-size: 18px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.9px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #666;
}

/* ===================================
   Invitation Section (Mobile Default = Dark Theme)
   =================================== */
.hero {
    /* Hide separate hero section on mobile, we use footer image */
    display: none;
}

.invitation {
    background-color: #001925;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.invitation-content {
    max-width: 100%;
    padding: 140px 30px 40px;
    /* Top spacing for mobile */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
}

/* Header Content (Wedding Of, Names, Date) - Visible on Mobile now */
.desktop-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    order: 1;
    /* Flex order */
}

.desktop-wedding-of {
    display: block;
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0.05em;
    color: #FFFFFF;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.desktop-couple-names {
    font-family: 'Forfelast Royalten', 'Bodoni Moda', serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0%;
    background: linear-gradient(95.94deg, #E4D9C6 -57.64%, #615B4F 4%, #C3B69F 57.66%, #615B4F 108.91%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-transform: uppercase;
    padding-bottom: 5px;
}

.desktop-divider {
    width: 100%;
    max-width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C7BAA3, transparent);
    margin-bottom: 20px;
}

.desktop-date {
    font-family: 'Forfelast Royalten', 'Bodoni Moda', serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.05em;
    background: linear-gradient(95.94deg, #E4D9C6 -57.64%, #615B4F -20.54%, #C3B69F 57.66%, #615B4F 108.91%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    padding-bottom: 5px;
}

/* Message Text */
.message-text {
    order: 2;
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.05em;
    text-align: center;
    color: #E6E6E6;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    opacity: 1;
    transform: none;
    padding: 0 10px;
}

/* Guest Name */
.guest-name-container {
    order: 3;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in;
    justify-content: center;
    align-items: center;
}

.dear-text {
    display: none;
}

.guest-name {
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #FFFFFF;
    text-transform: uppercase;
    margin: 0;
    display: block;
    text-align: center;
}

.guest-first-letter,
.guest-rest-name {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    -webkit-text-fill-color: initial;
    display: inline;
    transform: none;
    margin: 0;
}

/* Button */
.cta-button {
    order: 4;
    display: inline-block;
    background: linear-gradient(95.94deg, #E4D9C6 -57.64%, #615B4F 4%, #C3B69F 57.66%, #615B4F 108.91%);
    color: #001925;
    font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 16px 40px;
    border-radius: 50px;
    border: none;
    text-transform: uppercase;
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
    box-shadow: 0px 2px 4px 0px #00000029;
    position: relative;
    z-index: 20;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(199, 186, 163, 0.3);
}

.cta-button:active {
    transform: translateY(0);
}

/* Footer Image (Mobile) */
.desktop-footer-image-container {
    display: block;
    /* Visible on mobile now */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    z-index: 0;
}

.desktop-footer-image {
    width: 100%;
    height: auto;
    display: block;
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%);
}

.desktop-footer-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, #001925 0%, transparent 100%);
    pointer-events: none;
}

/* Content z-index for overlay */
.invitation-content>*:not(.desktop-footer-image-container) {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animation trigger */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===================================
   Responsive Design - Tablet
   =================================== */
@media (min-width: 768px) {

    /* Adjustments for tablet sizing */
    .invitation-content {
        max-width: 100%;
        /* Ensure full width usage */
    }
}

/* ===================================
   Responsive Design - Desktop
   =================================== */
@media (min-width: 1024px) {
    body {
        display: flex;
        height: 100vh;
        overflow: hidden;
    }

    /* Hide header on desktop */
    .header {
        display: none;
    }

    /* Hero takes left 65% */
    .hero {
        display: block;
        /* Show hero on desktop */
        flex: 0 0 65%;
        margin-top: 0;
        height: 100vh;
        position: relative;
    }

    .hero-image-container {
        width: 100%;
        height: 100vh;
        max-height: none;
    }

    .hero-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        filter: grayscale(0%);
    }

    /* Add "THE WEDDING OF" overlay on left image */
    .hero::before {
        display: block;
        content: 'THE WEDDING OF';
        position: absolute;
        top: 60px;
        left: 60px;
        font-family: 'Neue Haas Unica Pro', 'Inter', sans-serif;
        font-size: 16px;
        font-weight: 400;
        letter-spacing: 0.05em;
        line-height: 100%;
        color: #FFFFFF;
        z-index: 10;
        text-transform: uppercase;
    }

    /* Add "ADELINE AND DANIEL" overlay on left image */
    .hero::after {
        display: block;
        content: 'ADELINE AND DANIEL';
        position: absolute;
        top: 100px;
        left: 60px;
        font-family: 'Forfelast Royalten', 'Bodoni Moda', serif;
        font-size: 36px;
        font-weight: 400;
        line-height: 48px;
        letter-spacing: 0;
        color: #FFFFFF;
        z-index: 10;
        text-transform: uppercase;
    }

    /* Invitation takes right 35% */
    .invitation {
        flex: 0 0 35%;
        min-width: 400px;
        height: 100vh;
        /* Background and padding inherited from global */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        overflow-y: auto;
    }

    .invitation-content {
        max-width: 100%;
        padding: 140px 30px 40px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
    }

    /* Reuse global styles for typography, gradients, buttons, etc. 
       No need to repeat them here unless overriding. */

    /* Menu stays in top right */
    .menu-toggle {
        position: fixed;
        top: 40px;
        right: 40px;
        z-index: 10000;
    }

    .menu-toggle span {
        background-color: #C7BAA3;
    }

    .nav-menu {
        background: rgba(0, 25, 37, 0.98);
        backdrop-filter: blur(20px);
    }

    .nav-menu a {
        color: #C7BAA3;
    }
}

/* ===================================
   Accessibility
   =================================== */
@media (prefers-reduced-motion: reduce) {

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

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 4px;
}