/* ==========================================================================
   Nea - a winter wedding: snow falls behind the whole page and swirls when the guest scrolls, an ice crystal turns
   slowly over the opening photo, and the texts sit on frosted glass
   Palette: --inv-primary (ice / candle light), --inv-accent (frost), --inv-bg (snow or night), --inv-text
   script.js draws the snow on a canvas and reads its colour from --ne-flake
   ========================================================================== */

.nea {
    --ne-ink-soft: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --ne-tint: color-mix(in srgb, var(--inv-accent) 14%, var(--inv-bg));
    --ne-line: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    --ne-glass: color-mix(in srgb, var(--inv-surface) 62%, transparent);
    --ne-frost: color-mix(in srgb, white 55%, transparent);
    --ne-shadow: 0 30px 70px -40px color-mix(in srgb, var(--inv-primary) 60%, transparent);
    --ne-flake: color-mix(in srgb, var(--inv-accent) 55%, white);
    --kit-radius: 10px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--ne-line);
    font-family: var(--inv-font-body);
    font-size: 1.03rem;
    line-height: 1.72;
    background:
        radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%) fixed,
        var(--inv-bg);
    overflow-x: clip;
}
.nea h1, .nea h2, .nea h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.12; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.nea) :is(h1, h2, h3) { margin: 0; }
:where(.nea) p { margin: 0 0 .9em; }
.nea a { color: var(--inv-primary); }
.ne-kicker { font-size: .72rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.ne-role { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ne-ink-soft); margin: 0 0 4px; }
.ne-names-line { font-family: var(--inv-font-heading); font-size: 1.42rem; margin: 0; }

/* ---------- Snow and ice ---------- */
.ne-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.ne-hero, .ne-main, .ne-footer { position: relative; z-index: 1; }
.ne-hero { z-index: 2; }
.ne-crystal { display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--inv-primary); }
.ne-crystal circle, .ne-crystal-facet { fill: currentColor; stroke: none; }
@keyframes ne-turn { to { transform: rotate(360deg); } }

/* Frosted glass: a translucent pane with rime gathered in its corners */
.ne-card, .ne-block {
    background:
        radial-gradient(120px 90px at 0 0, var(--ne-frost), transparent 70%),
        radial-gradient(120px 90px at 100% 100%, var(--ne-frost), transparent 70%),
        var(--ne-glass);
    border: 1px solid var(--ne-line);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 60%, transparent), var(--ne-shadow);
    -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
    border-radius: 16px;
}

/* ---------- Titles ---------- */
.ne-title { margin: 0 auto clamp(28px, 4.5vw, 48px); text-align: center; }
.ne-title-mark { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; color: var(--inv-primary); }
.ne-title-mark > span { width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--ne-line)); }
.ne-title-mark > span:last-child { transform: scaleX(-1); }
.ne-title-crystal { width: 26px; animation: ne-turn 40s linear infinite; }
.ne-title h2 { font-size: clamp(2.1rem, 6vw, 3.1rem); }

/* ---------- Navigation ---------- */
.ne-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.ne-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.ne-nav a { text-decoration: none; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); padding: 6px 0; border-bottom: 1px solid transparent; }
.ne-nav a:hover, .ne-nav a.is-current { border-bottom-color: currentColor; }
.ne-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.5rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); text-shadow: none; margin-right: auto; border: 0; line-height: 1; }
.ne-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--inv-bg) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--ne-line); }
.ne-nav.is-stuck a { color: var(--inv-text); text-shadow: none; }
.ne-nav.is-stuck a:hover, .ne-nav.is-stuck a.is-current { color: var(--inv-primary); }
.nea .kit-to-top { border-radius: 50%; background: var(--ne-glass); color: var(--inv-primary); border: 1px solid var(--ne-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 899px) {
    .ne-nav { justify-content: flex-end; padding: 12px; }
    .ne-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--ne-glass); color: var(--inv-primary); border: 1px solid var(--ne-line); font-size: 1.2rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .ne-nav .kit-nav-links { display: none; }
    .ne-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; gap: 12px; position: absolute; top: 66px; left: 12px; right: 12px;
        padding: 24px; border-radius: 18px; background: var(--inv-surface); box-shadow: var(--ne-shadow);
    }
    .ne-nav.is-open .kit-nav-links a { color: var(--inv-text); text-shadow: none; }
    .ne-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the photo across the screen, a frosted pane with the names ---------- */
.ne-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 100px 16px 70px; overflow: hidden; }
.ne-hero-photo { position: absolute; inset: 0; margin: 0; }
.ne-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.ne-hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 35, .35), transparent 30%, transparent 55%, var(--inv-bg)); }
.ne-hero-card {
    position: relative; width: min(560px, 100%); padding: clamp(40px, 7vw, 64px) clamp(24px, 6vw, 56px) clamp(32px, 6vw, 50px); text-align: center;
    background: radial-gradient(160px 120px at 0 0, var(--ne-frost), transparent 70%), radial-gradient(160px 120px at 100% 100%, var(--ne-frost), transparent 70%), color-mix(in srgb, var(--inv-surface) 58%, transparent);
    border: 1px solid color-mix(in srgb, white 45%, transparent); border-radius: 22px;
    -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 40px 90px -40px rgba(0, 0, 0, .45);
}
.ne-hero-crystal { width: 70px; margin: 0 auto 18px; animation: ne-turn 60s linear infinite; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--inv-primary) 40%, transparent)); }
.nea .ne-names { font-family: var(--inv-font-heading); font-style: italic; font-weight: 400; font-size: clamp(3rem, 10vw, 5.4rem); line-height: 1.02; display: grid; justify-items: center; overflow-wrap: anywhere; }
.ne-and { font-style: normal; font-size: .4em; color: var(--inv-primary); margin: .2em 0; }
.ne-hero-date { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 22px 0 2px; }
.ne-hero-place { font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ne-ink-soft); margin: 0; }
.nea .ne-subtitle { max-width: 36ch; margin: 16px auto 0; color: var(--ne-ink-soft); }
@keyframes ne-frost-in { from { opacity: 0; filter: blur(10px); transform: scale(.97); } to { opacity: 1; filter: none; transform: none; } }
.kit-js .ne-hero-card { animation: ne-frost-in 1.6s ease .2s both; }
/* On wide screens the pane stands to the right, leaving the photo's couple in view */
@media (min-width: 1000px) { .ne-hero { place-items: center end; padding-right: max(5vw, calc(50vw - 600px)); } }

/* ---------- Sections ---------- */
.ne-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.ne-section { padding-top: clamp(76px, 11vw, 124px); }
.ne-block { padding: clamp(34px, 6vw, 64px); text-align: center; max-width: 800px; margin: 0 auto; border-radius: 22px; }
.ne-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.22rem; color: var(--ne-ink-soft); max-width: 40ch; margin: 0 auto 26px; }
.nea .ne-welcome-title { font-family: var(--inv-font-heading); font-style: italic; font-size: clamp(2.5rem, 7.6vw, 3.6rem); color: var(--inv-primary); margin-bottom: 12px; }
.ne-block p { font-size: 1.08rem; }
.ne-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }

/* Couple: two portraits in tall frosted frames, the same height */
.ne-couple-grid { display: grid; gap: 44px; justify-items: center; }
.ne-person { text-align: center; max-width: 380px; }
.ne-portrait { margin: 0 auto 22px; width: min(300px, 70vw); aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; outline: 1px solid var(--ne-line); outline-offset: 10px; box-shadow: var(--ne-shadow); }
.ne-portrait img, .ne-initial { width: 100%; height: 100%; object-fit: cover; }
.ne-initial { display: grid; place-items: center; background: var(--ne-tint); font-family: var(--inv-font-heading); font-style: italic; font-size: 6rem; color: var(--inv-primary); }
.ne-person h3 { font-size: 1.7rem; margin: 10px 0 8px; }
.ne-person p { color: var(--ne-ink-soft); }
@media (min-width: 760px) { .ne-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Family */
.ne-family-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); text-align: center; }
.ne-family-item { padding: 24px 22px; }

/* Story */
.ne-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(44px, 7vw, 74px); }
.ne-chapter { display: grid; gap: 24px; align-items: center; }
.ne-chapter-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: var(--ne-shadow); }
.ne-chapter-photo img { width: 100%; height: 100%; object-fit: cover; }
.ne-chapter-text h3 { font-size: 1.95rem; font-style: italic; margin-bottom: 8px; }
.ne-chapter-text p:not(.ne-kicker) { color: var(--ne-ink-soft); }
@media (min-width: 900px) {
    .ne-chapter { grid-template-columns: 1fr 1fr; gap: 58px; }
    .ne-chapter:nth-child(even) .ne-chapter-photo { order: 2; }
}

/* Programme */
.ne-moments { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ne-moment { position: relative; padding: 30px 26px 24px; text-align: center; }
.ne-moment-crystal { width: 30px; margin: 0 auto 14px; opacity: .8; }
.ne-moment-time { font-family: var(--inv-font-heading); font-size: 2.5rem; line-height: 1; color: var(--inv-primary); margin-bottom: 10px; }
.ne-moment h3 { font-size: 1.5rem; margin-bottom: 4px; }
.ne-moment-place { font-weight: 500; margin: 12px 0 0; }
.ne-moment-address, .ne-moment-notes { color: var(--ne-ink-soft); margin: 0; }
.ne-moment-notes { font-style: italic; margin-top: 6px; }
.nea .kit-button { border-radius: 999px; border: 1px solid var(--ne-line); color: var(--inv-primary); background: transparent; font-size: .78rem; padding: 9px 16px; text-decoration: none; }
.nea .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: each number in an ice hexagon */
.ne-countdown { text-align: center; }
.ne-countdown .kit-countdown { gap: clamp(8px, 3vw, 22px); }
.ne-countdown .kit-countdown-unit { min-width: 0; }
.ne-countdown .kit-countdown-value {
    display: grid; place-items: center; width: clamp(72px, 19vw, 112px); aspect-ratio: 1 / 1.1;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: linear-gradient(160deg, color-mix(in srgb, var(--inv-accent) 35%, var(--inv-surface)), var(--ne-tint));
    font-family: var(--inv-font-heading); font-size: clamp(1.8rem, 6vw, 2.6rem); color: var(--inv-primary);
}
.ne-countdown .kit-countdown-label { margin-top: 10px; opacity: 1; color: var(--ne-ink-soft); }

/* Gallery: an even grid, every photo the same shape */
.ne-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); }
.ne-gallery-grid.kit-gallery a { border-radius: 12px; aspect-ratio: 3 / 4; box-shadow: var(--ne-shadow); }
@media (min-width: 760px) { .ne-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP */
.ne-reply { max-width: 700px; margin: 0 auto; padding: clamp(30px, 6vw, 54px); border-radius: 22px; }
.nea .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.15rem; }
.nea .inv-rsvp__deadline { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.nea .inv-rsvp__choice label { border-radius: 999px; }

/* Info, contact */
.ne-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ne-info-item { padding: 26px 24px 14px; text-align: center; }
.ne-info-item h3 { font-size: 1.4rem; font-style: italic; color: var(--inv-primary); margin-bottom: 8px; }
.ne-faq { max-width: 720px; margin: 40px auto 0; text-align: center; }
.ne-faq details { text-align: left; margin-bottom: 10px; }
.ne-faq summary { cursor: pointer; list-style: none; padding: 16px 50px 16px 22px; position: relative; font-family: var(--inv-font-heading); font-size: 1.14rem; border-radius: inherit; }
.ne-faq summary::-webkit-details-marker { display: none; }
.ne-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--inv-primary); font-size: 1.4rem; transition: transform .3s; }
.ne-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.ne-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.ne-faq details p { padding: 0 22px; color: var(--ne-ink-soft); }
.ne-faq details p:last-child { padding-bottom: 16px; }
.ne-contact { text-align: center; }
.ne-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.ne-contact-person a { text-decoration: none; }

/* Footer */
.ne-footer { text-align: center; padding: clamp(100px, 15vw, 160px) 16px 70px; }
.ne-footer-crystal { width: 90px; margin: 0 auto 26px; animation: ne-turn 80s linear infinite; opacity: .9; }
.ne-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.3rem; color: var(--ne-ink-soft); }
.ne-footer-names { font-family: var(--inv-font-heading); font-style: italic; font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1.05; color: var(--inv-primary); margin: 6px 0 10px; }
.ne-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .ne-title-crystal, .ne-hero-crystal, .ne-footer-crystal, .kit-js .ne-hero-card { animation: none; }
}
