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

html {
    scroll-behavior: smooth;
}

/* Dark Theme Color Variables */
:root {
    --dark-bg: #121212;
    --dark-surface: #1e1e1e;
    --dark-card: #252525;
    --dark-border: #333333;
    --dark-hover: #303030;
    
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #999999;
    
    --accent-50: #1e0c0c;
    --accent-100: #331414;
    --accent-200: #471c1c;
    --accent-300: #5a2424;
    --accent-400: #752e2e;
    --accent-500: #8f3838;
    --accent-600: #a84242;
    --accent-700: #c24d4d;
    --accent-800: #d86060;
    --accent-900: #e47878;
}

body {
    font-family: 'Crimson Text', 'Georgia', 'Cambria', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-bg);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-700);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    /* Dark-themed wedding image */
    background-image: url('https://cdn.wedissimo.com/2024/02/Wedding-Photographer-Nottingham-31.jpg');
    /* https://images.pexels.com/photos/2959192/pexels-photo-2959192.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1280&fit=crop */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 120vh;
    top: 0;
    transition: opacity 0.5s ease, filter 0.5s ease;
    will-change: opacity, filter;
    filter: brightness(0.4) contrast(1.2);
}

@media screen and (max-width: 768px) {
    .hero-background {
        height: 100vh;
        background-position: 31%;
    }
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom, 
        rgba(0,0,0,0.7) 0%, 
        rgba(0,0,0,0.5) 40%, 
        rgba(0,0,0,0.3) 70%,
        rgba(0,0,0,0) 100%
    );
    /* Add mask gradient for bottom fade */
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 80%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 80%,
        transparent 100%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.hero-text {
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-names {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ampersand {
    color: var(--accent-700);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
    .hero-names {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
    .hero-names {
        font-size: 5rem;
    }
}

/* Save the Date Section */
.save-date-section {
    position: relative;
    margin-top: -5rem;
    padding-top: 8rem;
    padding-bottom: 4rem;
    background: linear-gradient(
        to bottom, 
        rgba(18, 18, 18, 0) 0%, 
        rgba(18, 18, 18, 0.95) 15%, 
        var(--dark-bg) 100%
    );
    z-index: 20;
}

.save-date-card {
    background: rgba(37, 37, 37, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
    border: 1px solid var(--dark-border);
}

.heart-icon {
    color: var(--accent-600);
    margin: 0 auto 2rem;
    animation: float 3s ease-in-out infinite;
}

.save-date-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.wedding-date {
    font-size: 2.75rem;
    font-weight: 300;
    color: var(--accent-700);
    letter-spacing: 0.1em;
    font-family: 'Playfair Display', 'Georgia', serif;
}

@media (min-width: 768px) {
    .save-date-card {
        padding: 3rem;
    }
    .save-date-title {
        font-size: 3rem;
    }
    .wedding-date {
        font-size: 4.5rem;
    }
}

/* Section Styles */
section {
    padding: 3rem 0;
    background-color: var(--dark-bg);
}

@media (min-width: 768px) {
    section {
        padding: 4rem 0;
    }
}

.section-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
        margin-bottom: 3rem;
    }
}

/* Invitation Section */
.invitation-section {
    background: var(--dark-surface);
}

.invitation-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 768px) {
    .invitation-text {
        font-size: 1.25rem;
    }
}

/* Calendar Section */
.calendar-section {
    background: var(--dark-bg);
}

.calendar-container {
    max-width: 28rem;
    margin: 0 auto;
}

.calendar-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.875rem;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.calendar {
    background: var(--dark-card);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    padding: 1.25rem;
    border: 1px solid var(--dark-border);
}

@media (min-width: 768px) {
    .calendar {
        padding: 1.5rem;
    }
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.day-header {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 0.5rem 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-date {
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    cursor: pointer;
    position: relative;
}

.calendar-date:hover {
    background: var(--dark-hover);
}

.calendar-date.wedding-day {
    position: relative;
    color: white !important;
    font-weight: 600;
    z-index: 1;
}

.calendar-date.wedding-day .heart-small {
    position: absolute;
    top: -10%;
    right: 0%;
    transform: translate(-0%, -0%);
    width: 3.25rem;
    height: 3.25rem;
    color: var(--accent-700);
    fill: currentColor;
    opacity: 0.9;
    z-index: -1;
}

@media screen and (max-width: 480px) {
    .calendar-date.wedding-day .heart-small {
        width: 2.75rem;
        height: 2.75rem;
        top:0%;
    }  
}

.calendar-date.empty {
    background: transparent;
    cursor: default;
}

/* Photo Sections */
.photo-section {
    background: var(--dark-surface);
}

.photo-container {
    max-width: 64rem;
    margin: 0 auto;
}

.couple-photo {
    width: 100%;
    height: 18rem;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.5s;
    filter: brightness(0.8) contrast(1.1);
    border: 1px solid var(--dark-border);
}

.couple-photo:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 1);
    filter: brightness(0.9) contrast(1.1);
}

@media (min-width: 768px) {
    .couple-photo {
        height: 31.25rem;
    }
}

/* Details Section */
.details-section {
    background: var(--dark-bg);
}

.details-grid {
    display: grid;
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

.detail-card {
    background: var(--dark-card);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--dark-border);
}

.detail-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-500);
    transform: translateY(-5px);
}

.detail-icon {
    color: var(--accent-600);
    margin: 0 auto 1rem;
    width: 2rem;
    height: 2rem;
}

.detail-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.detail-venue {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.detail-address {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.detail-time {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    gap: 0.5rem;
}

/* Timeline Section */
.timeline-section {
    background: var(--dark-bg);
}

.timeline-grid {
    display: grid;
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .timeline-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.timeline-item {
    text-align: center;
}

.timeline-icon {
    background: var(--dark-card);
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    color: var(--accent-600);
    transition: all 0.3s ease;
    border: 1px solid var(--dark-border);
}

.timeline-icon:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: translateY(-5px);
    border-color: var(--accent-500);
}

.timeline-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-time {
    color: var(--accent-600);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Gallery Section */
.gallery-section {
    background: var(--dark-surface);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .gallery-grid {
        gap: 1.5rem;
    }
}

.gallery-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, transform 0.3s;
}

.gallery-image:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .gallery-image {
        height: 16rem;
    }
}

/* Attire Section */
.attire-section {
    background: var(--dark-bg);
}

.attire-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.attire-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

@media (min-width: 768px) {
    .attire-text {
        font-size: 1.25rem;
    }
}

/* RSVP Section */
.rsvp-section {
    background: var(--dark-bg);
    text-align: center;
}

.rsvp-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .rsvp-text {
        font-size: 1.25rem;
        margin-bottom: 3rem;
    }
}

.rsvp-button {
    background: var(--accent-600);
    color: white;
    font-weight: 500;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.rsvp-button:hover, 
.rsvp-button:focus {
    background: var(--accent-700);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .rsvp-button {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1rem;
    }
}

/* Footer */
.footer {
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: 3rem 0;
    margin-top: 2rem;
}

.footer-content {
    text-align: center;
}

.footer-heart {
    color: var(--accent-600);
    margin: 0 auto 1rem;
    animation: float 3s ease-in-out infinite;
}

.footer-with-love {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.footer-names {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--accent-600);
}

/* RSVP Modal */
.modal-open {
    overflow: hidden;
}

.rsvp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}

.rsvp-modal.show {
    opacity: 1;
    visibility: visible;
}

.rsvp-modal-content {
    background: var(--dark-card);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s;
    border: 1px solid var(--dark-border);
}

.rsvp-modal.show .rsvp-modal-content {
    transform: translateY(0);
}

.rsvp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--dark-border);
}

@media (min-width: 768px) {
    .rsvp-modal-header {
        padding: 1.5rem;
    }
}

.rsvp-modal-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

@media (min-width: 768px) {
    .rsvp-modal-title {
        font-size: 1.75rem;
    }
}

.rsvp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.rsvp-modal-close:hover {
    color: var(--text-primary);
}

.rsvp-modal-body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .rsvp-modal-body {
        padding: 1.5rem;
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    font-family: 'Crimson Text', 'Georgia', 'Cambria', 'Times New Roman', serif;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-600);
    box-shadow: 0 0 0 3px rgba(168, 66, 66, 0.2);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.radio-group input {
    margin-right: 0.5rem;
}

.rsvp-submit {
    background: var(--accent-600);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.rsvp-submit:hover {
    background: var(--accent-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.rsvp-thank-you {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    color: var(--accent-600);
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
    .success-icon {
        width: 4rem;
        height: 4rem;
    }
}

.rsvp-thank-you h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .rsvp-thank-you h3 {
        font-size: 1.75rem;
    }
}

.rsvp-thank-you p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.close-thank-you {
    background: var(--accent-600);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.close-thank-you:hover {
    background: var(--accent-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.animate-in {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* Keyframe Animations */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-2.5rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulseSoft {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounceSoft {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Performance optimizations for animations */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        transition: none;
    }
    
    .hero-text,
    .heart-icon,
    .calendar-date.wedding-day,
    .calendar-date.wedding-day .heart-small,
    .footer-heart {
        animation: none;
    }
    
    .rsvp-button:hover,
    .timeline-icon:hover,
    .gallery-image:hover,
    .detail-card:hover,
    .rsvp-submit:hover,
    .close-thank-you:hover {
        transform: none;
    }
}

/* Improved accessibility - focus styles */
button:focus,
a:focus {
    outline: 2px solid var(--accent-600);
    outline-offset: 2px;
}

/* Improved scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-600) var(--dark-surface);
}

/* Touch-friendly adjustments for mobile */
@media (max-width: 768px) {
    .calendar-date,
    .timeline-icon,
    .detail-card,
    .gallery-image {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    input, 
    select, 
    textarea, 
    button {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Add some spacing for tap targets */
    .timeline-icon,
    .detail-card {
        padding: 1rem;
    }
}