:root {
    --cream: #F2E8D9;
    --cream-deep: #EADFCC;
    --ink: #3E332F;
    --line: #E8DCD3;

    /* the two national flowers */
    --thistle: #8D7CA0;
    --rose-red: #A23E44;
    --rose-red-deep: #832E33;
    --leaf: #93A084;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--cream);
    color: var(--ink);
    font-family: 'Jost', sans-serif;
    font-weight: 300;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    margin: 0;
}

/* ---------- simple divider ---------- */
.ornament {
    width: 46px;
    height: 1px;
    background-color: var(--line);
    margin: 0 auto 26px auto;
}

.ornament.large {
    width: 64px;
    margin-bottom: 22px;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

/* ---------- hero ---------- */
header {
    position: relative;
    height: 92vh;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(40, 32, 29, 0.4) 0%, rgba(40, 32, 29, 0.42) 50%, rgba(40, 32, 29, 0.58) 100%), url('image_7b410e.jpg') center/cover no-repeat;
    overflow: hidden;
}

header .ornament.large {
    animation: fadeDown 1.1s ease both;
}

.monogram {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.6rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
    color: var(--cream-deep);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
    animation: fadeDown 1.1s ease both;
}

header h1 {
    font-size: clamp(2rem, 8.5vw, 5rem);
    letter-spacing: 1px;
    line-height: 1.1;
    max-width: 100%;
    color: white;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
    animation: fadeUp 1.1s ease 0.15s both;
}

header .subtitle {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 3px;
    margin-top: 18px;
    color: var(--cream);
    animation: fadeUp 1.1s ease 0.3s both;
}

header .date {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.3rem;
    margin-top: 10px;
    color: var(--cream-deep);
    animation: fadeUp 1.1s ease 0.4s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- nav ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(242, 232, 217, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    text-align: center;
    padding: 18px 0;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    margin: 0 18px;
    font-family: 'Jost', sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

nav a:hover {
    border-color: var(--rose-red);
    color: var(--rose-red-deep);
}

/* ---------- sections ---------- */
section {
    max-width: 620px;
    margin: 0 auto;
    padding: 84px 32px;
    text-align: center;
}

section + section {
    border-top: 1px solid var(--line);
}

h2 {
    font-size: 2rem;
    letter-spacing: 0.5px;
    color: var(--ink);
    margin-bottom: 6px;
}

.section-lede {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--thistle);
    margin-bottom: 34px;
}

p {
    font-size: 1.05rem;
    line-height: 1.85;
    font-weight: 300;
}

/* ---------- timeline (il giorno) ---------- */
.timeline {
    position: relative;
    margin-top: 10px;
}

/* .timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--line);
    transform: translateX(-50%);
} */

.moment {
    position: relative;
    padding: 0 0 44px 0;
}

.moment:last-child {
    padding-bottom: 6px;
}

.moment .dot {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rose-red);
    margin: 0 auto 14px auto;
    box-shadow: 0 0 0 5px var(--cream);
}

.moment .time {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--rose-red-deep);
    display: block;
    margin-bottom: 6px;
}

.moment .place {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.moment p {
    font-size: 0.98rem;
    max-width: 380px;
    margin: 0 auto;
    color: #6b5f5a;
}

/* ---------- dettagli ---------- */
.detail-row {
    text-align: left;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.detail-row:last-of-type {
    border-bottom: none;
}

.detail-row .label {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--thistle);
    display: block;
    margin-bottom: 4px;
}

.detail-row p {
    margin: 0;
    text-align: left;
}

.btn {
    display: inline-block;
    background-color: var(--rose-red);
    color: white !important;
    padding: 14px 38px;
    text-decoration: none !important;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.3s;
    margin-top: 8px;
}

.btn:hover {
    background-color: var(--rose-red-deep);
}

/* ---------- lista nozze ---------- */
.iban-box {
    margin-top: 32px;
    padding: 32px 24px;
    background-color: var(--cream-deep);
    border-radius: 4px;
}

.iban-box .label {
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--thistle);
    margin-bottom: 10px;
}

.iban-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    letter-spacing: 1.5px;
    margin: 0;
}

.iban-box .causale {
    font-size: 0.9rem;
    color: #6b5f5a;
    margin: 10px 0 20px 0;
}

/* ---------- footer ---------- */
footer {
    text-align: center;
    padding: 20px 24px 70px 24px;
}

footer h2 {
    font-style: italic;
    font-size: 1.7rem;
    margin-bottom: 8px;
}

footer p {
    font-size: 0.95rem;
    color: #6b5f5a;
}

@media (max-width: 640px) {
    section {
        padding: 60px 22px;
    }

    nav a {
        margin: 8px 12px;
        display: inline-block;
    }

    .timeline::before {
        left: 10px;
    }

    .moment::before {
        left: 10px;
    }

    .moment .time,
    .moment .place {
        padding-left: 0px;
    }

    .moment p {
        padding-left: 30px;
        max-width: none;
    }
}

/* ---------- landing (index.html) ---------- */
#landing {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 56px 20px 48px 20px;
    background-color: var(--cream);
}

/* L'acquerello ha dimensione proporzionale alla larghezza (con un tetto) e resta
   centrato: nessun ritaglio variabile al ridimensionamento. Multiply lo fonde col
   crema e la maschera sfuma i bordi della carta per evitare stacchi. */
#landing::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(100vw, 1280px, 150svh);
    aspect-ratio: 3 / 2;
    transform: translate(-50%, -50%);
    z-index: -2;
    background: url('image_7b410e.jpg') center / 100% 100% no-repeat;
    mix-blend-mode: multiply;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    mask-composite: intersect;
}

/* velo crema in alto e in basso per la leggibilità */
#landing::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--cream) 0%, rgba(242, 232, 217, 0) 30%, rgba(242, 232, 217, 0) 62%, var(--cream) 100%);
}

.landing-date {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(2rem, 7vw, 3.25rem);
    letter-spacing: 4px;
    color: var(--rose-red-deep);
    margin: 0;
}

.flags {
    display: flex;
    gap: clamp(1.25rem, 5vw, 2.5rem);
    justify-content: center;
}

.flag-btn {
    display: grid;
    justify-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.flag-btn .disc {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--cream), 0 2px 12px rgba(62, 51, 47, 0.25);
    transition: box-shadow 0.3s;
}

.flag-btn svg { display: block; width: 100%; height: 100%; }

.flag-btn:hover .disc,
.flag-btn:focus-visible .disc {
    box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--thistle);
}

:focus-visible { outline: 2px solid var(--thistle); outline-offset: 4px; }

/* ---------- cambio lingua (footer) ---------- */
.change-lang {
    display: inline-block;
    margin-top: 22px;
    color: var(--ink);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
}

.change-lang:hover { border-color: var(--rose-red); }
