/* ========================================
   WEDDING INVITATION - Рысқұл & Салтанат
   Tilda-inspired Design
   ======================================== */

/* Custom Fonts */
@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3537-3939-4432-b936-373838373235/KZPFMonumentaPro-Reg.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild6539-6331-4366-a638-393866393036/KZ_RomulC-_1_.woff') format('woff');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3364-6264-4265-a330-316133643333/Gilroy-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild6666-3139-4733-b539-396663353961/KZ_ceremonious-three.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3339-6438-4465-b465-656335396264/FontsFree-Net-saint-.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3437-6161-4464-a137-666337656466/KZPF_Champion_Script.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3664-3035-4938-b337-346331613539/MsClaudy-Regular_1.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild6237-3961-4661-a364-336135383133/KZGoodVibes-2.woff') format('woff');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'kaz';
    src: url('https://static.tildacdn.pro/tild3562-6633-4036-b962-366438393836/AsylbekM02Shelleykz_.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

/* CSS Variables */
:root {
    --primary-gold: #9a7b4f;
    --primary-gold-dark: #7a5828;
    --primary-gold-light: #c4a574;
    --bg-cream: #ffffff;
    --bg-light: #faf8f5;
    --text-dark: #2c2c2c;
    --text-medium: #5a5a5a;
    --text-light: #8a8a8a;
    --white: #ffffff;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    --font-decorative: 'kaz', 'Times New Roman', serif;
    --font-body: 'kaz', 'Arial', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    body {
        width: 390px;
        margin: auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    }
}

/* Container */
.wedding-container {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    background: var(--bg-cream);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

/* Animation Classes */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-down {
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   MUSIC CONTROL - Top Left Outline Style
   ======================================== */

.music-control {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.music-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--primary-gold-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.music-btn:hover {
    background: rgba(122, 88, 40, 0.1);
}

.music-btn.hidden {
    display: none;
}

/* ========================================
   VOLUME CONTROL
   ======================================== */

.volume-control {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px 10px;
    background: var(--white);
    border-radius: 25px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(196, 165, 116, 0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    touch-action: none;
}

.volume-control.visible {
    display: flex;
}

.volume-control.hidden-scroll {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.volume-control input[type="range"] {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 100px;
    appearance: none;
    background: linear-gradient(to top, var(--primary-gold) 0%, var(--primary-gold-light) 100%);
    border-radius: 4px;
    cursor: pointer;
    touch-action: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-gold-dark);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-icon {
    font-size: 18px;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    padding: 80px 20px 40px;
    background: var(--bg-cream);
    overflow: hidden;
}

/* Decorative Flowers */
.hero-flower {
    position: absolute;
    pointer-events: none;
    opacity: 0.85;
    z-index: 1;
}

.hero-flower-top-left {
    top: -24px;
    left: -73px;
    width: 180px;
    transform: rotate(60deg);
}

.hero-flower-bottom-right {
    bottom: -15px;
    right: -60px;
    width: 200px;
    transform: rotate(342deg);
}

.hero-content {
    text-align: center;
    z-index: 2;
    width: 100%;
}

.couple-names {
    margin: 20px 0 30px;
    position: relative;
}

.groom-name, .bride-name {
    font-family: var(--font-decorative);
    font-weight: 800;
    font-size: 70px;
    color: var(--primary-gold-dark);
    line-height: 1.2;
    letter-spacing: 1px;
}

.groom-name {
    transform: translateX(-50px);
}

.bride-name {
    transform: translateX(25px);
}

.decorative-ampersand {
    display: block;
    width: 200px;
    height: auto;
    opacity: 0.15;
    position: absolute;
    top: 50%;
    left: 62%;
    transform: translate(-50%, -50%) rotate(8deg);
}

/* Hands Photo */
.hands-photo-container {
    width: calc(100% + 40px);
    margin: 20px -20px 0;
    display: flex;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.hands-photo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--primary-gold-dark);
    border-radius: 12px;
    margin: 0 auto 10px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-gold-dark);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 11px;
    color: var(--primary-gold-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================
   SECTION FLOWERS (Reusable)
   ======================================== */

.section-flower {
    position: absolute;
    pointer-events: none;
    opacity: 0.7;
    z-index: 1;
}

.section-flower-top {
    bottom: -24px;
    left: -73px;
    width: 180px;
    transform: rotate(60deg);
}

.section-flower-bottom {
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
}

.section-flower-top-left {
    top: -20px;
    left: -40px;
    width: 140px;
    transform: rotate(20deg);
}

.section-flower-top-right {
    top: -20px;
    right: -40px;
    width: 140px;
    transform: rotate(287deg) scaleX(-1);
}

.section-flower-bottom-right {
    bottom: -30px;
    right: -50px;
    width: 160px;
    transform: rotate(-15deg);
}

.section-flower-right {
    top: 50%;
    right: -60px;
    width: 150px;
    transform: translateY(-50%) rotate(-10deg);
}

/* ========================================
   INVITATION SECTION
   ======================================== */

.invitation-section {
    padding: 80px 30px;
    background: var(--bg-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.invitation-content {
    position: relative;
    z-index: 2;
}

.invitation-greeting {
    font-family: var(--font-body);
    font-weight: 100;
    font-size: 26px;
    color: var(--primary-gold-dark);
    margin-bottom: 20px;
}

.invitation-intro {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 22px;
    color: var(--primary-gold-dark);
    margin-bottom: 15px;
}

.invitation-names {
    margin: 25px 0;
}

.invitation-name-groom,
.invitation-name-bride {
    display: block;
    font-family: var(--font-decorative);
    font-weight: 800;
    font-size: 56px;
    color: var(--primary-gold-dark);
    line-height: 1.3;
}

.invitation-connector {
    display: block;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 20px;
    transform: translateY(5px);
    color: var(--primary-gold-dark);
    margin: 5px 0;
}

.invitation-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.8;
    margin-top: 25px;
}

/* ========================================
   PARENTS SECTION
   ======================================== */

.parents-section {
    padding: 60px 30px;
    background: var(--bg-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.parents-title {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.parents-names {
    font-family: var(--font-decorative);
    font-weight: 800;
    font-size: 42px;
    color: var(--primary-gold-dark);
    line-height: 1.2;
    z-index: 100;
    position: relative;
}

/* ========================================
   DETAILS SECTION WITH CALENDAR
   ======================================== */

.details-section {
    padding: 80px 30px;
    background: var(--bg-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-title-script {
    font-family: var(--font-decorative);
    font-weight: 100;
    font-size: 26px;
    color: var(--primary-gold-dark);
    margin-bottom: 25px;
    position: relative;
    z-index: 10;
}

.event-datetime {
    margin-bottom: 40px;
}

.event-date-text,
.event-time-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Calendar */
.calendar-container {
    max-width: 280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.calendar-month {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 18px;
    color: var(--text-dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.calendar-grid {
    background: var(--bg-cream);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-header span {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    padding: 5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-days span {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: var(--text-dark);
    text-align: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.calendar-highlight {
    position: relative;
    color: #7a5828 !important;
}

.calendar-highlight::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 34px;
    background-image: url('../images/heart.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* ========================================
   LOCATION SECTION
   ======================================== */

.location-section {
    padding: 80px 30px;
    background: var(--bg-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.location-details {
    margin: 30px 0;
    position: relative;
    z-index: 2;
}

.location-city,
.location-address {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.6;
}

.location-venue {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 20px;
    color: var(--primary-gold-dark);
    margin-top: 10px;
}

.map-button {
    display: inline-block;
    padding: 14px 40px;
    background: var(--primary-gold-dark);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 30px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
}

.map-button:hover {
    background: var(--primary-gold);
    transform: translateY(-2px);
}

.veil-decoration {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   RSVP SECTION
   ======================================== */

.rsvp-section {
    padding: 80px 30px;
    background: var(--bg-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rsvp-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.6;
}

.rsvp-form {
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--primary-gold-dark);
    border-radius: 30px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input[type="text"]:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(122, 88, 40, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-label {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.5;
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: var(--text-dark);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-gold-dark);
    border-radius: 50%;
    position: relative;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background: var(--primary-gold-dark);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
}

.submit-btn {
    width: 100%;
    padding: 14px 30px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--white);
    background: var(--primary-gold-dark);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.submit-btn:hover {
    background: var(--primary-gold);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.rsvp-closing {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 20px;
    color: var(--text-dark);
    margin-top: 40px;
    line-height: 1.5;
}

/* ========================================
   COUNTDOWN SECTION
   ======================================== */

.countdown-section {
    padding: 60px 20px;
    text-align: center;
    background: var(--primary-gold-dark);
    position: relative;
}

.countdown-title {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    color: var(--white);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.time-number {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 36px;
    color: var(--white);
    line-height: 1;
}

.time-label {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    margin-top: 5px;
}

.time-separator {
    font-size: 28px;
    color: var(--white);
    font-weight: 300;
    margin-bottom: 15px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 390px) {
    .groom-name, .bride-name {
        font-size: 70px;
    }
    
    .invitation-name-groom,
    .invitation-name-bride {
        font-size: 40px;
    }
    
    .parents-names {
        font-size: 36px;
    }
    
    .countdown-timer {
        gap: 5px;
    }
    
    .time-unit {
        min-width: 50px;
    }
    
    .time-number {
        font-size: 28px;
    }
}

/* Hide elements initially for animation */
.hero-section .animate-fade-in {
    animation-delay: 0.3s;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold-dark);
}

/* Selection styling */
::selection {
    background: rgba(122, 88, 40, 0.3);
    color: var(--text-dark);
}
