/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Unicase:wght@300;400;500;600;700&display=swap');

/* Design tokens (colors, fonts) */
:root {
    --main-color: #3e4b16;
    --main-color-light: #626c33;
    --font-title: 400 italic 1rem "Great Vibes", cursive;
    --font-main: 300 normal 1rem "Cormorant Unicase";
}

/* Base / reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
    background-color: #f5f0ec;
}

body {
    position: relative;
    min-height: 100%;
    margin: 0;
    font: var(--font-main);
    line-height: 1;
    color: #000000;
    background: url("img/background.png") center/cover repeat fixed;
}

/* Utility helpers */
.green-text-color {
    color: var(--main-color);
}

.green-text-color svg {
    color: var(--main-color);
    stroke: var(--main-color);
}

.green-text-color-light {
    color: var(--main-color-light);
}

/* Layout primitives */
.box {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

main {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .box, main {
        width: 600px;
    }
}

/* Generic "box" typography and spacing */
.box .box-title {
    position: relative;
    font: var(--font-title);
    font-size: 4rem;
    color: var(--main-color);
    text-align: center;
    line-height: 2.5rem;
    margin-bottom: 0.75rem;
    padding-top: 2rem;
    z-index: 5;
}

.box .box-content {
    position: relative;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--main-color);
    z-index: 5;
    overflow: hidden;
}

.box-content img {
    width: 60%;
    height: auto;
}

.box-music {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.box-music > div:first-child {
    text-align: right;
    display: flex;
    width: 45%;
    font-size: 0.7rem;
    padding: 0.5rem;
}

.box-music > div:last-child {
    text-align: right;
    display: flex;
    width: 25%;
    cursor: pointer;
}

/* Hero section */
.hero-logo {
    background-color: #f5f0ec;
    width: 100%;
    height: 100%;
}

.hero-logo .logo {
    background-image: url("img/gallery/img-1.png");
    background-size: 106% auto;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 22rem;
}

.location-logo {
    background-image: url("img/gallery/img-2.png");
    background-size: 112% auto;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 22rem;
}

.hero-title {
    width: 100%;
    height: 18rem;
    background-image: url("img/hero-bg.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 36rem;
    padding-top: 1rem;
}

.hero-and {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("img/hero-and.png");
    background-repeat: no-repeat;
    background-size: 23rem auto;
    background-position: 214.4% 125%;
    opacity: 0.35;
    z-index: 1;
}

.hero-names {
    position: relative;
    padding-top: 1.5rem;
    font: var(--font-title);
    font-size: 3.5rem;
    padding-left: 7rem;
    z-index: 2;
}

.name-1 {
    text-align: right;
    margin-right: 40%;
}

.name-2 {
    text-align: left;
    margin-left: 40%;
}

.wending-date {
    font-size: 1.6rem;
    text-align: right;
    margin-right: 2.5rem;
}

/* Intro / hello section */
.hello-message-box {
    padding-top: 2rem;
}

.hello-message-box .box-content {
    padding-right: 35%;
}

/* Calendar section */
.calendar-box {
    margin-top: 3rem;
}

.calendar-img {
    width: 100%;
    height: 20rem;
    background-image: url("img/calendar.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.calendar-select {
    position: absolute;
    width: 3rem;
    height: 3rem;
    transform-origin: center;
    animation: pulse 1.4s ease-in-out infinite;
}

/* Animations: calendar pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

/* Schedule section */
.schedule-subblock {
    background-image: url("img/background.png");
    border-radius: 1.5rem;
    margin-left: 2rem;
    margin-right: 2rem;
    border: 1px solid var(--main-color);
    margin-bottom: 2rem;
    padding: 1rem;
}

.schedule-time {
    font: var(--font-title);
    font-size: 2.5rem;
    color: var(--main-color);
    text-align: center;
    line-height: 1.5rem;
}

.schedule-subtitle {
    font: var(--font-main);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--main-color);
    text-align: center;
    margin: 0.5rem 0;
}

.schedule-description {
    font: var(--font-main);
    font-size: 1rem;
    color: var(--main-color-light);
    text-align: center;
    line-height: 1rem;
}

.schedule-box .location-info {
    width: 50%;
}

.map-show {
    width: 100%;
    background-color: #ffffff00;
    border-radius: 1.5rem;
    display: block;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    cursor: pointer;
    font: var(--font-main);
    font-size: 2rem;
    line-height: 3rem;
    font-weight: 100;
}

/* Decorative effects (floating branches/leaves) */
.x-effect {
    position: absolute;
    left: var(--left, 0);
    top: var(--top, 0);
    z-index: var(--layer, 1);
    pointer-events: none;
}

.effect-branch-wobble {
    position: absolute;
    width: 27rem;
    height: 27rem;
    background-repeat: no-repeat;
    background-size: 100% auto;

    transform: rotate(var(--base-rotate));

    transform-origin: center center;
    animation: branch-wobble 3s ease-in-out infinite alternate;
}

.effect-1 {
    background-image: url("img/effects/effect-1.png");
    left: 11rem;
    top: -11rem;
    --base-rotate: 0deg;
    z-index: 10;
}

.effect-2 {
    background-image: url("img/effects/effect-2.png");
    --base-rotate: 35deg;
}

.effect-3 {
    background-image: url("img/effects/effect-3.png");
    --base-rotate: -50deg;
    z-index: 3;
}

.effect-4 {
    background-image: url("img/effects/effect-4.png");
    left: -15.1rem;
    top: -8.9rem;
    --base-rotate: 0deg;
    z-index: 3;
}

.effect-5 {
    background-image: url("img/effects/effect-5.png");
    left: 11.5rem;
    top: 0.8rem;
    --base-rotate: 0deg;
    z-index: 3;
    opacity: 0.3;
}

.effect-6 {
    background-image: url("img/effects/effect-6.png");
    left: -10.7rem;
    top: -2.5rem;
    --base-rotate: 0deg;
    z-index: 3;
}

.effect-7 {
    background-image: url("img/effects/effect-6.png");
    left: 12rem;
    top: 20.5rem;
    --base-rotate: 0deg;
    z-index: 3;
}

.effect-8 {
    background-image: url("img/effects/effect-8.png");
    left: -13rem;
    top: -10rem;
    --base-rotate: 0deg;
    z-index: 3;
    scale: 0.6;
}

.effect-9 {
    background-image: url("img/effects/effect-9.png");
    left: 7rem;
    top: 17rem;
    --base-rotate: 0deg;
    scale: 0.8;
}

.effect-10 {
    background-image: url("img/effects/effect-10.png");
    --base-rotate: 0deg;
    opacity: 0.3;
}

.effect-11 {
    background-image: url("img/effects/effect-11.png");
    --base-rotate: 0deg;
    opacity: 0.3;
}

.effect-12 {
    background-image: url("img/effects/effect-2.png");
    --base-rotate: -25deg;
    scale: 0.8;
}

.effect-13 {
    background-image: url("img/effects/effect-2.png");
    --base-rotate: 45deg;
    scale: 0.8;
}

.effect-14 {
    background-image: url("img/effects/effect-1.png");
    --base-rotate: 0deg;
    scale: 1.2;
}

.effect-15 {
    background-image: url("img/effects/effect-15.png");
    --base-rotate: 0deg;
}

.effect-16 {
    background-image: url("img/effects/effect-3.png");
    --base-rotate: -50deg;
}

.effect-17 {
    background-image: url("img/effects/effect-3.png");
    --base-rotate: 60deg;
}

/* Animations: subtle branch wobble */
@keyframes branch-wobble {
    from {
        transform: rotate(calc(var(--base-rotate) - 2deg));
    }
    to {
        transform: rotate(calc(var(--base-rotate) + 2deg));
    }
}

/* Rules / dress code section */
.rules-block {
    background-image: url("img/background.png");
    border-radius: 1.5rem;
    border: 1px solid var(--main-color);
    margin-bottom: 2rem;
    padding: 1rem;
}

.rule-line {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

.rule-name {
    font: var(--font-title);
    font-size: 3rem;
    color: var(--main-color);
    text-align: center;
    line-height: 2.5rem;
}

.rule-img {
    width: 6rem;
    height: 6rem;
    opacity: 0.3;
}

.rule-description {
    font: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: var(--main-color);
    text-align: center;
    line-height: 1rem;
    margin-bottom: 1rem;
}

.dress-code-description {
    text-align: center;
}

.dress-code-color-line {
    display: flex;
    justify-content: center;
}

.dress-code-color-line + .dress-code-color-line {
    margin-top: -1.6rem;
}

.dress-code-color-line > div {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0.3rem;
    border-width: 0px;
    border-radius: 100%;
    background-color: #8f7c45;
    background-position: center center;
    border-color: transparent;
    border-style: solid;
    background-size: cover;
}

.track-box {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

.track {
    width: 8rem;
    height: 1.8rem;
    border: 1px solid var( --main-color-light);
    border-radius: 0.9rem;
    position: relative;
    overflow: hidden;
}

.ball {
    width: 1.8rem;
    height: 1.8rem;
    background-color: var(--main-color-light);
    border-radius: 0.9rem;
    position: absolute;
    top: 0;
    right: 0;
    animation: moveBall 2s ease infinite;
}

/* Animations: small loader "ball" */
@keyframes moveBall {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    20% {
        transform: translateX(0);
        opacity: 1;
    }
    80% {
        transform: translateX(-6.1rem);
        opacity: 1;
    }
    100% {
        transform: translateX(-6.1rem);
        opacity: 0;
    }
}

.dress-code-gallery {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.dress-code-gallery img {
    width: 17rem;
    height: 25rem;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* Countdown timer */
.wending-timer {
    display: flex;
    justify-content: space-around;
}

.wending-timer > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--main-color);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.wending-timer .value {
    font-size: 1.5rem;
}

.wending-timer .title {
    font-size: 0.5rem;
}

/* RSVP / form section */
.form-box .box-content {
    margin-left: 25%;
}

.form-answer label {
    display: block;
    border: 2px solid var(--main-color-light);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    margin-bottom: 10px;
    padding: 10px 14px;
}

.form-answer input[type="radio"] {
    display: none;
}

.form-answer input[type="radio"]:checked + span {
    background: var(--main-color-light);
    color: #fff;
    border-color: transparent;
    display: block;
    margin: -8px -12px;
    padding: 10px 14px;
    border-radius: 6px;
}

/* Contacts */
.contact-box .box-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
}

/* Gallery tweaks */
.gallery-box img {
    transform: scale(1.6) rotate(-5deg);
}

/* Links */
.custom-link,
.custom-link:visited,
.custom-link:hover,
.custom-link:active {
    color: var(--main-color);
}

.simple-link {
    font-size: 0.8rem;
    color: var(--main-color);
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.simple-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Map (actions and collapsible embed) */
.map-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1rem;
}

.map-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 0.4rem;
}

.map-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s ease-in-out, margin-top 0.5s ease;
    overflow: hidden;
    margin-top: 0;
    width: 100%;
}

.map-wrapper.is-open {
    grid-template-rows: 1fr;
    margin-top: 20px;
}

.map-inner {
    min-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease-in-out 0.1s, transform 0.4s ease-in-out 0.1s;
}

.map-wrapper.is-open .map-inner {
    opacity: 1;
    transform: translateY(0);
}

.map-iframe {
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.map-section .box-content {
    padding-top: 0;
}

/* Scroll reveal (IntersectionObserver) */
section.box {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.box.is-revealing {
    will-change: opacity, transform;
}

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

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    section.box {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
