/* css/main.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: #f5f0ea;
    color: var(--deep-taupe);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.3px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

form, 
input, 
textarea, 
button,
.radio-option,
.checkbox-option,
label {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    font-family: var(--font-body);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -2;
    pointer-events: none;
    transition: opacity 0.6s ease, filter 0.6s ease;
    will-change: opacity, filter;
}

body.scrolled::before {
    opacity: 0.1;
    filter: blur(8px) brightness(0.7);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 240, 234, 0.7);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: -1;
    pointer-events: none;
    transition: -webkit-backdrop-filter 0.6s ease, backdrop-filter 0.6s ease, background 0.6s ease;
}

body.scrolled::after {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(245, 240, 234, 0.8);
}

.container {
    max-width: 1100px;
    width: 90%;
    margin: 2rem auto;
    background: rgba(245, 240, 234, 0.6);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    backdrop-filter: blur(15px) saturate(180%);
    border-radius: 48px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(224, 191, 184, 0.3);
}

.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    isolation: isolate;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-names {
    font-family: var(--script-main);
    font-size: clamp(4rem, 14vw, 9rem);
    line-height: 1.1;
    margin: 0 0 1rem;
    font-weight: 400;
    word-break: break-word;
    text-align: center;
    width: 100%;
    color: white !important;
    text-shadow: 
        0 0 20px rgba(255,255,255,0.8),
        0 0 40px rgba(255,255,255,0.5),
        2px 2px 4px rgba(0,0,0,0.2);
    animation: glowPulse 3s infinite alternate;
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 20px rgba(255,255,255,0.8), 0 0 40px rgba(255,255,255,0.5), 2px 2px 4px rgba(0,0,0,0.2); }
    100% { text-shadow: 0 0 30px rgba(255,255,255,1), 0 0 60px rgba(255,255,255,0.7), 2px 2px 4px rgba(0,0,0,0.2); }
}

.hero-sub {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.6rem;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--antique-gold);
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #b79b6b, #d4af37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section {
    margin: 3rem auto;
    max-width: 900px;
    width: 100%;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    background: rgba(245, 240, 234, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 2.5rem;
    border: 1px solid rgba(224, 191, 184, 0.4);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--script-main);
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 400;
    text-align: center;
    color: var(--deep-taupe);
    margin-bottom: 2rem;
    letter-spacing: 2px;
    position: relative;
    width: 100%;
}

.section-title::after {
    content: '✦ ✦ ✦';
    display: block;
    font-size: 1.3rem;
    color: var(--antique-gold);
    margin: 1rem auto 0;
    font-family: var(--font-serif);
    letter-spacing: 8px;
    opacity: 0.7;
}

.invitation-text {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    text-align: center;
    color: var(--warm-mushroom);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.9;
}

.invitation-text p {
    margin: 1.5rem auto;
}

.invitation-emphasis {
    font-family: var(--script-main);
    font-size: 1.5em;
    color: var(--antique-gold);
}

.invitation-highlight {
    font-family: var(--script-secondary);
    color: var(--deep-taupe);
    font-size: 1.2em;
}

.date-highlight {
    font-family: var(--script-main);
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--antique-gold);
    border: 1px solid var(--powder-rose);
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 60px;
    background: rgba(255,255,255,0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    margin: 2rem 0 0.5rem;
}

.dresscode-text {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    text-align: center;
    color: var(--warm-mushroom);
    max-width: 700px;
    margin: 0 auto;
    font-family: var(--font-body);
    line-height: 1.9;
}

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

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--powder-rose), var(--antique-gold));
    z-index: 2000;
    transition: width 0.1s ease;
    width: 0%;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--powder-rose);
    color: var(--deep-taupe);
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--powder-rose);
    color: white;
    transform: translateY(-5px);
}

.particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: fallParticle linear forwards;
    color: rgba(183, 155, 107, 0.25);
    font-size: 1rem;
}

@keyframes fallParticle {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.2; }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

.floating-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    animation: floatHeart linear forwards;
    color: rgba(224, 191, 184, 0.25);
    font-size: 1.1rem;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 0.3;
        transform: translateY(80vh) scale(0.5);
    }
    80% {
        opacity: 0.2;
        transform: translateY(20vh) scale(0.8);
    }
    100% {
        transform: translateY(-10vh) scale(0.3);
        opacity: 0;
    }
}

.form-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50px;
}

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

.form-group > label {
    font-family: var(--script-secondary);
    display: block;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--deep-taupe);
    margin-bottom: 0.8rem;
    text-align: center;
}

.form-group small {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--warm-mushroom);
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

input[type="text"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 1.2rem 1.8rem;
    font-size: 1.2rem;
    border: 2px solid var(--champagne);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

textarea {
    border-radius: 30px;
    resize: vertical;
    min-height: 100px;
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--antique-gold);
    box-shadow: 0 0 0 4px rgba(183, 155, 107, 0.15);
    background: white;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 250, 240, 0.5);
    padding: 1.5rem;
    border-radius: 40px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

@media (min-width: 600px) {
    .checkbox-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--champagne);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 1.2rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.radio-option:hover,
.checkbox-option:hover {
    background: var(--powder-rose);
    border-color: var(--powder-rose);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(183, 155, 107, 0.3);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--antique-gold);
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-option span,
.checkbox-option span {
    color: var(--deep-taupe);
    transition: color 0.2s ease;
    font-weight: 500;
}

.radio-option:hover span,
.checkbox-option:hover span {
    color: var(--deep-taupe);
}

.submit-btn {
    width: 100%;
    padding: 1.4rem 2rem;
    background: linear-gradient(135deg, var(--deep-taupe), var(--warm-mushroom));
    color: var(--white-soft);
    border: none;
    border-radius: 50px;
    font-size: 1.6rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--script-main);
    text-transform: none;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px -5px rgba(94, 75, 60, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '✨';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submit-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(5px);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--powder-rose), var(--antique-gold));
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -8px rgba(183, 155, 107, 0.6);
    padding-right: 3.5rem;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(50%);
}

.footer {
    background: rgba(94, 75, 60, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    color: var(--ivory-lace);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.footer address {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
    color: var(--champagne);
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .section {
        padding: 1.5rem;
        margin: 2rem auto;
    }
    
    .color-swatch {
        width: 70px;
        height: 70px;
    }
    
    .particle, .floating-heart {
        display: none;
    }
    
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer address {
        font-size: 0.85rem;
    }
    
    .hero-names {
        font-size: clamp(2.8rem, 10vw, 5rem);
    }
    
    .hero-sub {
        letter-spacing: 0.3rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 1rem;
    }
    
    .section {
        padding: 1.2rem;
        margin: 1.5rem auto;
    }
    
    .section-title {
        margin-bottom: 1.2rem;
    }
    
    .section-title::after {
        font-size: 1rem;
        margin: 0.8rem auto 0;
        letter-spacing: 5px;
    }
    
    .invitation-text p {
        margin: 1rem auto;
    }
    
    .date-highlight {
        padding: 0.8rem 1.5rem;
        font-size: clamp(1.6rem, 4vw, 2rem);
    }
    
    .form-group > label {
        font-size: 1.4rem;
    }
    
    .submit-btn {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
    }
    
    .submit-btn::after {
        right: 20px;
    }
}