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

:root {
    /* Color Palette - Inspired by the engagement photo */
    --primary-green: #5a7a5c;
    --light-green: #8ba888;
    --sage-green: #b4c9b3;
    --cream: #f8f5f0;
    --warm-beige: #e8dfd3;
    --gold: #c9a961;
    --deep-green: #3d5a3e;
    --charcoal: #2c2c2c;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --text-dark: #333333;
    --text-light: #666666;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-secondary: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--deep-green) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('image.jpeg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(90, 122, 92, 0.4) 0%, rgba(61, 90, 62, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.couple-names {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.divider {
    width: 100px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 2rem;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    top: -3px;
}

.divider::before {
    left: -15px;
}

.divider::after {
    right: -15px;
}

.tagline {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.95;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator span {
    color: var(--white);
    font-size: 2rem;
    opacity: 0.8;
}

/* ============================================
   Story Section
   ============================================ */
.story-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--white) 0%, var(--cream) 100%);
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gold);
}

.story-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.story-image-wrapper {
    position: relative;
    margin: 3rem auto;
    max-width: 600px;
    display: inline-block;
}

.story-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.image-frame {
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    z-index: 1;
}

.story-text {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    line-height: 2;
    color: var(--text-light);
    margin-top: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Event Details Section
   ============================================ */
.event-details {
    padding: 100px 0;
    background: var(--white);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.detail-card {
    background: var(--cream);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(90, 122, 92, 0.15);
    border-color: var(--sage-green);
}

.detail-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.detail-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.detail-card p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ============================================
   RSVP Section
   ============================================ */
.rsvp-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--sage-green) 0%, var(--light-green) 100%);
    position: relative;
}

.rsvp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('Logo.jpeg') center/400px no-repeat;
    opacity: 0.03;
    pointer-events: none;
}

.rsvp-section .section-title {
    color: var(--white);
}

.rsvp-section .section-title::after {
    background: var(--white);
}

.rsvp-subtitle {
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 3rem;
    opacity: 0.95;
}

.rsvp-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

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

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

.attendance-label {
    margin-bottom: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(90, 122, 92, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.radio-option:hover {
    border-color: var(--light-green);
    background: var(--white);
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.radio-option span {
    font-weight: 500;
    color: var(--text-dark);
}

.radio-option:has(input:checked) {
    border-color: var(--primary-green);
    background: rgba(90, 122, 92, 0.05);
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.checkbox-option:hover {
    border-color: var(--light-green);
    background: var(--white);
}

.checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.checkbox-option span {
    font-weight: 400;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.checkbox-option:has(input:checked) {
    border-color: var(--primary-green);
    background: rgba(90, 122, 92, 0.05);
}

/* Conditional fields animation */
#attendingFields {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--deep-green) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 122, 92, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 60px 0 30px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: 50%;
    opacity: 0.95;
}

.footer-text {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-names {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--gold);
}

.footer-divider {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 2rem auto;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .couple-names {
        font-size: 3.5rem;
    }

    .tagline {
        font-size: 1.3rem;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .story-image-wrapper {
        max-width: 500px;
    }
}

/* Mobile landscape and portrait tablet */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero-section {
        min-height: 100vh;
        height: auto;
        padding: 40px 0;
    }

    .couple-names {
        font-size: 2.8rem;
        letter-spacing: 2px;
        margin-bottom: 1rem;
    }

    .tagline {
        font-size: 1.1rem;
        padding: 0 20px;
        line-height: 1.6;
    }

    .logo {
        width: 100px;
        height: 100px;
        padding: 10px;
    }

    .logo-container {
        margin-bottom: 1.5rem;
    }

    .divider {
        width: 80px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .story-section,
    .event-details,
    .rsvp-section {
        padding: 60px 0;
    }

    .story-text {
        font-size: 1.2rem;
        line-height: 1.8;
        margin-top: 2rem;
    }

    .story-image-wrapper {
        max-width: 100%;
        margin: 2rem auto;
    }

    .image-frame {
        top: -10px;
        left: -10px;
        right: 10px;
        bottom: 10px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .detail-card {
        padding: 2.5rem 2rem;
    }

    .detail-card h3 {
        font-size: 1.3rem;
    }

    .detail-card p {
        font-size: 1rem;
    }

    .rsvp-form {
        padding: 2rem 1.5rem;
        margin: 0 10px;
    }

    .rsvp-subtitle {
        font-size: 1.2rem;
        padding: 0 20px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: 100%;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .submit-btn {
        font-size: 1rem;
        padding: 14px;
    }

    .footer {
        padding: 50px 0 25px;
    }

    .footer-text {
        font-size: 1.2rem;
    }

    .footer-names {
        font-size: 1.8rem;
    }

    .scroll-indicator {
        bottom: 30px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 30px 0;
    }

    .couple-names {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .tagline {
        font-size: 0.95rem;
        padding: 0 15px;
    }

    .logo {
        width: 80px;
        height: 80px;
        padding: 8px;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    .divider {
        width: 60px;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .section-title::after {
        width: 60px;
    }

    .story-section,
    .event-details,
    .rsvp-section {
        padding: 50px 0;
    }

    .story-text {
        font-size: 1.1rem;
        line-height: 1.7;
        padding: 0 10px;
    }

    .story-image-wrapper {
        margin: 1.5rem auto;
    }

    .image-frame {
        top: -8px;
        left: -8px;
        right: 8px;
        bottom: 8px;
    }

    .details-grid {
        gap: 1rem;
    }

    .detail-card {
        padding: 2rem 1.5rem;
    }

    .detail-icon {
        font-size: 2.5rem;
    }

    .detail-card h3 {
        font-size: 1.2rem;
    }

    .detail-card p {
        font-size: 0.95rem;
    }

    .rsvp-form {
        padding: 1.5rem 1rem;
        margin: 0 5px;
        border-radius: 12px;
    }

    .rsvp-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

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

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px;
    }

    .radio-option {
        padding: 0.8rem;
    }

    .radio-option span {
        font-size: 0.95rem;
    }

    .submit-btn {
        font-size: 0.95rem;
        padding: 12px;
        letter-spacing: 0.5px;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-logo-img {
        width: 60px;
        height: 60px;
        padding: 8px;
    }

    .footer-text {
        font-size: 1.1rem;
    }

    .footer-names {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .footer-copyright {
        font-size: 0.85rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-indicator span {
        font-size: 1.5rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .couple-names {
        font-size: 1.7rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .rsvp-form {
        padding: 1.2rem 0.8rem;
    }

    .detail-card {
        padding: 1.5rem 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .detail-card:hover {
        transform: none;
    }

    .detail-card:active {
        transform: scale(0.98);
    }

    .submit-btn:hover {
        transform: none;
    }

    .submit-btn:active {
        transform: scale(0.98);
    }

    .radio-option:hover {
        background: var(--light-gray);
    }

    .radio-option:active {
        background: var(--white);
    }
}

/* Landscape orientation mobile adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 60px 0;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .couple-names {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .scroll-indicator {
        display: none;
    }
}
