:root {
    color-scheme: light;
    font-family: 'GFS Didot', Georgia, 'Times New Roman', serif;
    scroll-behavior: smooth;
    --base-font-size: 18px;
    --text-color: #664523;
    --accent: #a07141;
    --muted: rgba(102, 69, 35, 0.85);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: #e6dfd5;
    color: var(--text-color);
    overflow-x: hidden;
}

body {
    font-size: var(--base-font-size);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    position: relative;
    min-height: 100vh;
}

main::before {
    content: "";
    position: fixed;
    left: -30vw;
    top: -8vh;
    width: 80vw;
    height: 80vw;
    z-index: 0;
    pointer-events: none;
    background-image: url('https://raw.githubusercontent.com/jimvla/wedding-invitation/production/main/_images/floral.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(165deg) translateY(calc(var(--scrollY, 0) * 0.06px));
    opacity: 0.33;
    transition: transform 0.1s linear;
}

section {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 2.5rem 0;
    overflow: hidden;
}

.content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    padding: 28px;
}

.reveal-target {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-target.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-target {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

.text-content {
    background: transparent;
    padding: 1.75rem 1.5rem;
    max-width: 920px;
    margin: 0 1rem;
    text-align: center;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
}

.text-content > * {
    margin-left: auto;
    margin-right: auto;
}

.text-content .muted {
    opacity: 0.95;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-variant: small-caps;
    letter-spacing: 0.12em;
}

.text-content h1,
.text-content h2,
.text-content h3 {
    color: var(--text-color);
    margin: 0 0 16px;
    letter-spacing: 0.02em;
}

.text-content h1 {
    font-size: clamp(2.4rem, 7vw, 5rem);
    margin-bottom: 0.25rem;
}

.text-content h2 {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.text-content h1::after {
    content: "";
    display: block;
    width: 52px;
    height: 2px;
    margin: 1rem auto 0;
    background: rgba(166, 109, 65, 0.35);
    border-radius: 1px;
}

.text-content h3 {
    font-size: 1.05rem;
    margin-top: 1rem;
}

.text-content p {
    margin: 0.6rem 0;
    line-height: 1.65;
    color: rgba(102, 69, 35, 0.95);
    max-width: 64ch;
    margin-left: auto;
    margin-right: auto;
}

.section-divider {
    border: none;
    height: 1px;
    background: rgba(166, 109, 65, 0.35);
    margin: 1.2rem auto;
    width: 60%;
    max-width: 400px;
}

.family-group {
    margin: 1rem auto;
    max-width: 36rem;
}

.family-group h3,
.family-group p {
    text-align: center;
}

.names-block {
    line-height: 1;
}

.names-block .name-line {
    display: block;
    font-size: clamp(2.8rem, 7vw, 4.2rem);
}

.names-block .amp {
    display: block;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    opacity: 0.95;
    margin: 0.7rem 0 0;
}

.text-content .date {
    display: block;
    margin-top: 1.6rem;
    font-size: 1.2rem;
    /* color: var(--muted); */
    letter-spacing: 0.03em;
}

.text-content .venue {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.2rem;
}

.text-content .rsvp {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.calendar-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.calendar-btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    transition: background 0.25s ease, color 0.25s ease;
}

.calendar-btn:hover,
.calendar-btn:focus-visible {
    background: var(--accent);
    color: #f5f1e9;
}

.contact-phones {
    display: flex;
    justify-content: center;
    gap: 3rem; /* Κενό ανάμεσα στα δύο τηλέφωνα */
    margin: 1.5rem 0;
}

.contact-person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-person a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.contact-person .muted {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-variant: normal; /* Απενεργοποιεί τα μικρά κεφαλαία */
    font-size: 1.3rem;
    letter-spacing: 0.02em; /* Επαναφέρει το φυσιολογικό κενό */
    color: var(--accent);
}

/* Για να μπαίνουν το ένα κάτω από το άλλο σε πολύ μικρές οθόνες */
@media (max-width: 420px) {
    .contact-phones {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.content.location-content {
    background: transparent;
    padding: 1.5rem 1rem;
}

.map-container {
    margin-top: 24px;
    background: transparent;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 16px;
}

iframe {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    display: block;
}

.map-container h3 {
    margin: 0 0 12px;
    color: var(--accent);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.05;
    text-align: center;
}

@media (max-width: 800px) {
    /* ΝΕΟΣ ΚΩΔΙΚΑΣ: Απενεργοποίηση του scroll snapping στα κινητά */
    body {
        scroll-snap-type: none;
    }
    
    section {
        min-height: auto;
        height: auto;
        padding: 4rem 0;
    }

    /* ΝΕΟΣ ΚΩΔΙΚΑΣ: Κρατάει την 1η οθόνη στο 100% του ύψους της συσκευής */
    section:first-of-type {
        min-height: 100dvh; 
        height: 100dvh;
    }

    .text-content {
        padding: 1.4rem 1.2rem;
        margin: 0 0.85rem;
    }
}

@media (max-width: 420px) {
    .text-content h1 {
        font-size: clamp(2rem, 9vw, 3.6rem);
    }

    .text-content {
        padding: 1.25rem;
    }
}

@media (max-width: 420px) {
    .text-content h1 {
        font-size: clamp(2rem, 9vw, 3.6rem);
    }

    .text-content {
        padding: 1.25rem;
    }
}

/* ---------- Countdown ---------- */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    margin-top: 2rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.2rem;
}

.countdown-num {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--accent);
    line-height: 1;
}

.countdown-label {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-variant: small-caps;
}

/* ---------- Page navigation dots ---------- */
.page-dots {
    position: fixed;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    z-index: 5;
}

.page-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: transparent;
    transition: background 0.3s ease, transform 0.3s ease;
}

.page-dots .dot.active {
    background: var(--accent);
    transform: scale(1.25);
}

.page-dots .dot:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 800px) {
    .page-dots {
        display: none;
    }
}

/* ---------- Optional hero photo backdrop ----------
   Uncomment the .hero-photo div in index.html and set its background-image to use this. */
.hero-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.16;
    z-index: 0;
}
