/* Fonts */
@font-face {
    font-family: 'Annabelle Cyr';
    src: url('../assests/fonts/Annabelle Cyr/Annabelle Cyr.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

@font-face {
    font-family: 'TT Lovelies Script';
    src: url('../assests/fonts/TT Lovelies Script Regular/TT Lovelies Script.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #222;
    /* Dark background outside mobile container */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.mobile-container {
    width: 100%;
    max-width: 480px;
    background-color: #faf5ef;
    /* Matches Hero background to prevent white flash */
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;

    /* Content reveal logic */
}

/* Typography */
h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6d4c41;
    /* Medium chocolate */
}

/* Hero Block */
.hero-block {
    background-color: #faf5ef;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 95vh;
    /* Slightly taller for more presence */
    justify-content: flex-start;
}

.hero-top-text {
    align-self: flex-end;
    /* Right align */
    text-align: right;
    margin-bottom: 2rem;
    max-width: 60%;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    color: #6d4c41;
    /* Medium chocolate */
}

.photo-gallery {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    /* Gap between photos, similar to polaroid frame */
    margin-bottom: 3rem;
    width: calc(100% + 3rem);
    /* Expand to full mobile-container width */
    margin-left: -1.5rem;
    /* Offset hero padding */
    margin-right: -1.5rem;
    /* Offset hero padding */
    position: relative;
    padding: 0;
}

.photo-item {
    flex: 1.6;
    /* Increased for more presence */
    aspect-ratio: 2 / 3;
    background: #fff;
    border-radius: 4px;
    /* Small rounding */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* All photos straight and aligned */
.photo-gallery .photo-item:first-child {
    z-index: 1;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.photo-gallery .photo-item:last-child {
    z-index: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Polaroid Style for Middle Photo - Straight now */
.polaroid {
    flex: 2.4;
    /* Increased size */
    /* 1.5x bigger than base */
    background: #f4f4f4;
    /* Slightly grey like real paper */
    padding: 10px 10px 40px 10px;
    /* Classic polaroid padding */
    transform: rotate(0deg);
    /* Not tilted anymore */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 1-2mm natural hover shadow */
    z-index: 3;
    /* Above the edge photos */
    display: flex;
    flex-direction: column;
    border-radius: 4px;
}

.polaroid-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.polaroid-inner .img-placeholder {
    flex-grow: 1;
    background-color: #c0b29e;
}

.polaroid-caption {
    position: absolute;
    bottom: -32px;
    width: 100%;
    text-align: center;
    font-family: 'Annabelle Cyr', cursive;
    /* New custom handwritten font */
    color: #a13131;
    /* Red color */
    font-size: 1.1rem;
    font-weight: 600;
    /* Increased thickness */
    transform: rotate(0deg);
    /* Straight text */
    white-space: nowrap;
    text-shadow: 0.2px 0 0 #a13131;
    /* Subtle hint of extra thickness */
}

/* Hero Texts */
.hero-text {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-text h2 {
    font-size: 2rem;
    color: #4d342c;
    /* Darker chocolate */
}

.hero-date {
    margin-top: auto;
    margin-bottom: 3rem;
    /* Lift the date slightly higher */
    font-family: 'Santa Catarina', serif;
    font-size: 2.2rem;
    /* Reduced size */
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.05em;
    line-height: 1.2;
    color: #4d342c;
    /* Darker chocolate */
    border-top: 1px solid #ccc;
    padding-top: 0.8rem;
    width: fit-content;
    /* Fit the content tightly */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Greeting Block */
.greeting-block {
    background-color: #ecdfc3;
    /* Matches SVG fill exactly */
    padding: 35px 1.5rem 25px 1.5rem;
    /* Removed bottom padding to glue to flipped divider */
    text-align: center;
}

.greeting-title {
    font-family: 'Santa Catarina', serif;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #4d342c;
    /* Darker chocolate */
}

.greeting-text {
    margin-bottom: 2.5rem;
    font-size: 1rem;
    color: #6d4c41;
    /* Medium chocolate */
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Calendar Card */
.calendar-card {
    background-color: #faf5ef;
    padding: 1rem 1.2rem;
    /* Reduced vertical padding */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    /* Increased for better visibility */
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: center;
    /* Centered */
    gap: 10px;
    /* Closer together */
    font-family: 'Santa Catarina', serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
    /* Reduced */
    color: #4d342c;
    /* Darker chocolate */
    border-bottom: 1px solid #e0d8cc;
    padding-bottom: 0.3rem;
    /* Reduced */
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 5px;
    /* Reduced vertical gap */
    text-align: center;
}

.day-name {
    font-size: 0.8rem;
    color: #8c6b53;
    margin-bottom: 0.2rem;
    /* Reduced */
}

.day {
    aspect-ratio: 1.4 / 1;
    /* Flattened the day cells to reduce height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #4d342c;
    /* Darker chocolate */
    position: relative;
}

.active-date {
    position: relative;
    font-weight: bold;
}

.heart-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    fill: none;
    stroke: #a13131;
    stroke-width: 2;
    width: 32px;
    /* Bigger than text to circle it */
    height: 32px;
    z-index: 1;
}

.active-date span {
    position: relative;
    z-index: 2;
    /* Text on top */
}

/* Timeline Block */
.timeline-block {
    background-color: #faf5ef;
    padding: 4rem 1.5rem;
    text-align: center;
}

.timeline-title {
    font-family: 'Santa Catarina', serif;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: #4d342c;
    /* Dark chocolate */
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-item .time {
    color: #a13131;
    font-family: 'TT Lovelies Script', cursive;
    font-size: 2.2rem;
    /* Script fonts often look smaller, increased size */
    font-weight: 400;
    margin-bottom: -0.2rem;
}

.timeline-item .event-desc {
    color: #6d4c41;
    /* Medium chocolate */
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Location Block */
.location-block {
    background-color: #faf5ef;
    /* Light background */
    padding: 3rem 1.5rem 5rem 1.5rem;
    text-align: center;
}

.location-title {
    font-family: 'Santa Catarina', serif;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #4d342c;
}

.location-card {
    background-color: #ecdfc3;
    /* Matches SVG fill exactly */
    /* Same as greeting block background */
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    /* Increased for better visibility */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.location-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #4d342c;
}

.location-address {
    font-size: 1rem;
    color: #6d4c41;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.map-link {
    display: inline-block;
    background-color: #ffffff;
    /* Pure white for maximum visibility */
    color: #4d342c;
    /* Text color matching theme */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    align-self: center;
    margin-top: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

/* Footer Image Block */
.footer-image-block {
    width: 100%;
    background-color: #ecdfc3;
    padding: 0 0 2.5rem 0;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.footer-letter-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.25));
}

/* Текст поверх нижней картинки */
.footer-text-overlay {
    position: absolute;
    bottom: 4.5rem;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    transform: translateY(-320px) translateX(15px) rotate(-5deg);
}

/* Анимация появления — рукописная, слева направо */
.footer-text-overlay.handwrite {
    animation: handwrite 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes handwrite {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0.3;
    }

    10% {
        opacity: 1;
    }

    to {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }

}

.footer-main-text {
    font-family: 'Santa Catarina', serif;
    font-size: clamp(2rem, 8vw, 2.6rem);
    color: #4d342c;
    margin: 0 0 0.3rem 0;
    line-height: 1.1;
}

.footer-sub-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    color: #8c6b53;
    margin: 0;
    letter-spacing: 0.05em;
}


/* Dress Code Block */
.dress-code-block {
    background-color: #faf5ef;
    /* Light background as requested */
    padding: 2rem 1.5rem 4rem 1.5rem;
    text-align: center;
}

.dress-code-title {
    font-family: 'Santa Catarina', serif;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #4d342c;
}

.dress-code-text {
    margin-bottom: 2rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    color: #6d4c41;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1rem;
}

.color-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
}

/* RSVP Block */
.rsvp-block {
    background-color: #faf5ef;
    padding: 3rem 1.5rem;
    text-align: center;
}

.rsvp-card {
    background-color: #ecdfc3;
    /* Matches SVG fill exactly */
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    /* Increased for better visibility */
    margin: 0 auto;
}

.rsvp-title {
    font-family: 'Santa Catarina', serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #4d342c;
}

.rsvp-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #4d342c;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(77, 52, 44, 0.2);
    background-color: #faf5ef;
    color: #4d342c;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    border-color: #4d342c;
}

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

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6d4c41;
}

.radio-label input {
    accent-color: #4d342c;
    width: 18px;
    height: 18px;
}

.rsvp-submit-btn {
    width: 100%;
    background-color: #ffffff;
    color: #4d342c;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.rsvp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

/* Hero Timer */
.hero-timer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    /* Fixed width to prevent jumping */
}

.timer-value {
    font-family: 'Santa Catarina', serif;
    font-size: 2.5rem;
    color: #4d342c;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    /* Stable digit widths */
}

.timer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8c6b53;
    margin-top: 0.2rem;
}

/* Section Divider */
.divider-wrapper {
    width: 100%;
    padding: 0;
    margin-top: -1px;
    /* Overlap with top block to hide gap */
    margin-bottom: -1px;
    /* Overlap with bottom block to hide gap */
    line-height: 0;
    background-color: #faf5ef;
    /* Match background of section ABOVE */
    position: relative;
    z-index: 5;
}

.section-divider {
    width: 100%;
    height: auto;
    display: block;
}

/* Adjust background for divider above footer to match beige if needed */
.rsvp-block+.divider-wrapper {
    background-color: #faf5ef;
}

.divider-wrapper.flipped {
    background-color: #faf5ef;
    /* Match background of section BELOW (Timeline) */
    margin-top: -1px;
    margin-bottom: -1px;
}

.divider-wrapper.flipped .section-divider {
    transform: rotate(180deg);
    /* Flip it to point up */
}

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════ */

.reveal {
    opacity: 0;
    transition:
        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.fade-up {
    transform: translateY(30px);
}

.reveal.fade-in {
    transform: none;
}

.reveal.scale-in {
    transform: scale(0.93);
}

.reveal.slide-left {
    transform: translateX(-40px);
}

.reveal.slide-right {
    transform: translateX(40px);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Staggered delays */
.reveal.delay-1 {
    transition-delay: 0.15s;
}

.reveal.delay-2 {
    transition-delay: 0.3s;
}

.reveal.delay-3 {
    transition-delay: 0.45s;
}

.reveal.delay-4 {
    transition-delay: 0.6s;
}

.reveal.delay-5 {
    transition-delay: 0.75s;
}

.reveal.delay-6 {
    transition-delay: 0.9s;
}


/* ═══════════════════════════════════════
   HERO ENTRANCE
   ═══════════════════════════════════════ */

.hero-animate {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.hero-animate.polaroid-anim {
    transform: translateY(24px) scale(0.94);
}

.hero-entered .hero-animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Каскадные задержки для Hero */
.hero-animate:nth-child(1) {
    transition-delay: 0.05s;
}

.hero-animate:nth-child(2) {
    transition-delay: 0.2s;
}

.hero-animate:nth-child(3) {
    transition-delay: 0.35s;
}

.hero-animate:nth-child(4) {
    transition-delay: 0.5s;
}

.hero-animate:nth-child(5) {
    transition-delay: 0.65s;
}