/* ================================================================
   REV. DN. ARUN — SACRED ORDINATION
   Lean cinematic build · GPU-only animations · Roman Catholic palette
   ================================================================ */

:root {
    --gold: #D4B47A;
    --gold-lt: #F5E2B0;
    --gold-dk: #8A6A30;
    --burgundy: #5C1A1A;
    --ink: #0A0804;
    --ink-warm: #1A130A;
    --ink-deep: #3A2812;
    --ivory: #F2EBDA;
    --ivory-d: rgba(242, 235, 218, .78);
    --hairline: rgba(212, 180, 122, .16);
    --hairline-strong: rgba(212, 180, 122, .32);
    --serif: 'Cinzel', 'Times New Roman', serif;
    --body: 'Cormorant Garamond', 'Georgia', serif;
    --script: 'Great Vibes', 'Cormorant Garamond', cursive;
    --sans: 'Inter', -apple-system, sans-serif;
    --ease: cubic-bezier(.23, 1, .32, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

html.scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--body);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
}

/* ================================================================
   PRELOADER
   ================================================================ */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .8s ease, visibility .8s;
}

#preloader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-cross {
    position: relative;
    width: 36px;
    height: 54px;
}

.lc-v,
.lc-h {
    position: absolute;
    background: var(--gold);
    border-radius: 1px;
}

.lc-v {
    width: 5px;
    height: 0;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: lcV 1.2s ease forwards;
}

.lc-h {
    height: 5px;
    width: 0;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: lcH .9s ease forwards .55s;
}

@keyframes lcV {
    to {
        height: 100%;
    }
}

@keyframes lcH {
    to {
        width: 100%;
    }
}

/* ================================================================
   ENTRY GATE — envelope
   ================================================================ */
#gate {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(10, 8, 4, .55), rgba(10, 8, 4, .92) 80%),
        url('../img/IMG_5501.JPG.avif') 50% 35%/cover no-repeat,
        var(--ink);
    transition: opacity 1.6s var(--ease), visibility 1.6s;
}

#gate.gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gate-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 1.4s ease forwards 1s;
}

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

.env-invited {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .55);
    margin-bottom: 30px;
    animation: envFloat 4s ease-in-out infinite;
}

@keyframes envFloat {

    0%,
    100% {
        opacity: .45;
    }

    50% {
        opacity: .85;
    }
}

.envelope {
    position: relative;
    width: min(420px, 86vw);
    aspect-ratio: 1.55/1;
    perspective: 1400px;
    cursor: pointer;
    outline: none;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
}

.env-body {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.env-back,
.env-front,
.env-flap {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #f4ead3 0%, #e8dcbe 55%, #d9c9a3 100%);
    border-radius: 12px;
}

.env-back {
    box-shadow: inset 0 0 36px rgba(120, 90, 50, .18);
    border-radius: 12px;
}

.env-front {
    z-index: 3;
    background: linear-gradient(145deg, #efe3c7 0%, #e0d1ad 50%, #cfbc91 100%);
    box-shadow: inset 0 0 50px rgba(100, 70, 35, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.env-front::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(120, 85, 45, .25);
    border-radius: 8px;
    pointer-events: none;
}

.env-address {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #4a3820;
    padding: 0 20px;
}

.env-to {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: .6;
    margin-bottom: 10px;
}

.env-name {
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(34px, 7.2vw, 52px);
    color: #5a3d18;
    line-height: 1.05;
    letter-spacing: .5px;
    margin-bottom: 14px;
}

.env-line {
    width: 80px;
    height: 1px;
    margin: 0 auto 12px;
    background: rgba(90, 61, 24, .35);
}

.env-from {
    font-family: var(--body);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 1px;
    color: #6a4e28;
    opacity: .8;
}

.env-flap {
    z-index: 5;
    transform-origin: top center;
    clip-path: polygon(0 0, 100% 0, 50% 65%);
    background: linear-gradient(180deg, #e8dcbe 0%, #d4c196 55%, #bfa676 100%);
    box-shadow: inset 0 -14px 22px rgba(100, 70, 35, .25);
    transition: transform 1.3s cubic-bezier(.65, 0, .35, 1);
}

.envelope.opening .env-flap {
    transform: rotateX(180deg);
}

.wax-seal {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #8a2828 0%, #6a1f1f 55%, var(--burgundy) 100%);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, .45),
        inset -4px -5px 10px rgba(0, 0, 0, .4),
        inset 3px 3px 6px rgba(212, 160, 140, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sealPulse 2.6s ease-in-out infinite;
}

.wax-cross {
    font-size: 28px;
    color: #2a0808;
    transform: rotate(-6deg);
}

@keyframes sealPulse {

    0%,
    100% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, .45), 0 0 0 0 rgba(92, 26, 26, .45), inset -4px -5px 10px rgba(0, 0, 0, .4);
    }

    50% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, .45), 0 0 0 12px rgba(92, 26, 26, 0), inset -4px -5px 10px rgba(0, 0, 0, .4);
    }
}

.envelope.opening .wax-seal {
    animation: sealCrack .5s ease forwards;
}

@keyframes sealCrack {
    60% {
        transform: translate(-54%, -48%) scale(1.05) rotate(-12deg);
    }

    100% {
        transform: translate(-60%, -40%) scale(.85) rotate(-18deg);
        opacity: 0;
    }
}


.env-shadow {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -22px;
    height: 28px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%);
    filter: blur(8px);
}

.env-tap {
    margin-top: 42px;
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .4);
    animation: tapFade 2.2s ease-in-out infinite;
}

@keyframes tapFade {

    0%,
    100% {
        opacity: .4;
    }

    50% {
        opacity: .8;
    }
}

/* ================================================================
   ROTATING BACKGROUND — only 2 layers, JS swaps src
   ================================================================ */
#photoBg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: #050200;
    pointer-events: none;
}

.pbg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2.2s var(--ease);
    will-change: opacity, transform;
    transform: scale(1.04);
    animation: kenBurns 18s ease-in-out infinite alternate;
    filter: contrast(1.08) brightness(.78);
}

.pbg-layer.active {
    opacity: 100;
}

@keyframes kenBurns {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.14) translate3d(-1.2%, -1%, 0);
    }
}

#pbgTint {
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(ellipse at 50% 50%,
            rgba(10, 8, 4, 0.04) 0%,
            rgba(10, 8, 4, 0.18) 75%,
            rgba(10, 8, 4, 0.32) 100%);
}

/* ================================================================
   VIGNETTE
   ================================================================ */
#vignette {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0, 0, 0, .35) 100%);
}

/* ================================================================
   CINEMATIC PLAYER
   ================================================================ */
#cinematic {
    position: fixed;
    inset: 0;
    z-index: 6000;
    background: var(--ink);
    display: none;
    opacity: 1;
}

#cinematic.playing {
    display: block;
}

.cine-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 10;
    background: rgba(255, 255, 255, .05);
}

.cine-bar {
    height: 100%;
    width: 0;
    background: var(--gold);
    transition: width .25s linear;
}

.cine-skip {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 10;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .4);
    background: rgba(0, 0, 0, .4);
    border: 1px solid rgba(242, 235, 218, .15);
    padding: 8px 18px;
    cursor: pointer;
    transition: all .3s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cine-skip:hover {
    color: var(--gold-lt);
    border-color: rgba(212, 180, 122, .5);
}

.cine-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: opacity;
    transition: opacity 1.4s var(--ease);

}

.cine-lines {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    max-width: 760px;
}

.cl {
    opacity: 0;
    will-change: opacity, transform;
}

.cl-quiet {
    font-family: var(--body);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(20px, 3.8vw, 32px);
    color: var(--gold-lt);
    letter-spacing: .5px;
    line-height: 1.7;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

.cl-gold {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(26px, 5vw, 46px);
    color: #fff;
    letter-spacing: .6px;
    text-shadow: 0 0 24px rgba(212, 180, 122, .6), 0 2px 8px rgba(0, 0, 0, .8);
}

.cl-scripture {
    font-family: var(--body);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(20px, 3.6vw, 34px);
    color: var(--ivory);
    line-height: 1.8;
}

.cl-ref {
    font-family: var(--serif);
    font-size: clamp(11px, 1.8vw, 15px);
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .78;
    margin-top: 14px;
}

/* Scene 1: flame */
.cs1-flame {
    position: absolute;
    top: 42%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 236, 200, 1), rgba(255, 200, 120, .6) 40%, transparent 75%);
    transform: translate(-50%, -50%) scale(0);
    box-shadow:
        0 0 30px 14px rgba(255, 200, 120, .35),
        0 0 80px 40px rgba(212, 180, 122, .15);
    will-change: transform, opacity;
}

/* Scene 3: photo behind text */
.cine-photoscene {
    overflow: hidden;
}

.cps-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
    opacity: 0;
    transform: scale(1.06);
    will-change: opacity, transform;
    filter: contrast(1.08) brightness(.65) saturate(.9);
}

.cps-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 75% at 50% 50%, transparent 25%, rgba(10, 8, 4, .6) 80%, rgba(10, 8, 4, .95) 100%),
        linear-gradient(180deg, rgba(10, 8, 4, .65), rgba(10, 8, 4, .4) 40%, rgba(10, 8, 4, .85));
}

/* Scene 4: memory montage */
.mm-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #050200;
}

.mm-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
    opacity: 0;
    transform: scale(1.08);
    will-change: opacity, transform;
    filter: contrast(1.06) brightness(.72) saturate(.92);
    transition: opacity 1.4s ease;
}

.mm-img.active {
    opacity: 1;
    transition: opacity 1.4s ease, transform 6s linear;
    transform: scale(1.18);
}

.mm-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 50% 50%, transparent 30%, rgba(10, 8, 4, .55) 80%, rgba(10, 8, 4, .92) 100%),
        linear-gradient(180deg, rgba(10, 8, 4, .5), transparent 35%, transparent 65%, rgba(10, 8, 4, .85));
}

.mm-caption {
    position: absolute;
    bottom: 11%;
    left: 0;
    right: 0;
    z-index: 5;
    text-align: center;
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(18px, 3.2vw, 28px);
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .95);
    opacity: 0;
    will-change: opacity, transform;
}

/* Scene 5: Adsum */
.cs5-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 180, 122, .22), rgba(212, 180, 122, .04) 50%, transparent 75%);
    transform: translate(-50%, -50%) scale(0);
    will-change: transform, opacity;
}

.cl-adsum {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(60px, 15vw, 150px);
    letter-spacing: 1px;
    color: #fff;
    text-shadow:
        0 0 40px rgba(212, 180, 122, .55),
        0 0 120px rgba(212, 180, 122, .22);
}

.cl-sub {
    font-family: var(--body);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(18px, 3.2vw, 28px);
    color: var(--ivory-d);
    margin-top: 8px;
}

/* Scene 6: name reveal */
.cs6-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 180, 122, .18), transparent 65%);
    transform: translate(-50%, -50%) scale(0);
    will-change: transform, opacity;
}

.cs6-lines {
    gap: 18px;
}

.orn {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
}

.orn span:first-child,
.orn span:last-child {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

.orn .d {
    color: var(--gold);
    font-size: 9px;
}

.cl-prefix {
    font-family: var(--sans);
    font-size: clamp(11px, 1.8vw, 14px);
    font-weight: 500;
    letter-spacing: 3.4px;
    text-transform: uppercase;
    color: var(--gold);
}

.cl-name {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(38px, 9vw, 90px);
    line-height: 1.05;
    color: #fff;
    letter-spacing: .5px;
    text-shadow:
        0 0 40px rgba(212, 180, 122, .45),
        0 0 90px rgba(212, 180, 122, .18);
    margin: 6px 0;
}

.cl-ordtype {
    font-family: var(--serif);
    font-size: clamp(13px, 2.2vw, 19px);
    font-weight: 500;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--ivory-d);
}

.cl-feast {
    font-family: var(--body);
    font-size: clamp(13px, 2vw, 17px);
    font-style: italic;
    color: rgba(242, 235, 218, .55);
    margin-top: 6px;
}

.cl-date {
    font-family: var(--serif);
    font-size: clamp(11px, 1.7vw, 14px);
    letter-spacing: 2.8px;
    color: var(--gold);
    opacity: .85;
    margin-top: 18px;
}

/* ================================================================
   AUDIO TOGGLE
   ================================================================ */
.audio-btn {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 7500;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(10, 8, 4, .65);
    border: 1px solid rgba(212, 180, 122, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .3s;
    opacity: 0;
    pointer-events: none;
}

.audio-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.audio-btn:hover {
    border-color: var(--gold);
}

.audio-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.audio-bars span {
    width: 3px;
    background: var(--gold);
    border-radius: 1px;
    height: 3px;
    transition: height .3s;
}

.audio-btn.on .audio-bars span:nth-child(1) {
    animation: abar .65s ease-in-out infinite 0s;
}

.audio-btn.on .audio-bars span:nth-child(2) {
    animation: abar .65s ease-in-out infinite .1s;
}

.audio-btn.on .audio-bars span:nth-child(3) {
    animation: abar .65s ease-in-out infinite .2s;
}

.audio-btn.on .audio-bars span:nth-child(4) {
    animation: abar .65s ease-in-out infinite .3s;
}

@keyframes abar {

    0%,
    100% {
        height: 3px;
    }

    50% {
        height: 14px;
    }
}

/* ================================================================
   SCROLLABLE CONTENT
   ================================================================ */
#content {
    opacity: 1;
    transition: opacity .8s;
}

#content.content-hidden {
    display: none;
}

.sec {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 110px 24px;
    overflow: hidden;
}

.sec::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 75% 70% at 50% 50%, transparent 50%, rgba(0, 0, 0, .25) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .25) 10%, transparent 25%, transparent 65%, rgba(0, 0, 0, .4) 85%, rgba(0, 0, 0, .7) 100%);
}

.sec:first-child::after {
    background:
        radial-gradient(ellipse 75% 70% at 50% 50%, transparent 50%, rgba(0, 0, 0, .25) 100%),
        linear-gradient(to bottom, transparent 65%, rgba(0, 0, 0, .35) 85%, rgba(0, 0, 0, .65) 100%);
}

.sec>*:not(.sec-bg):not(.sec-bg-img):not(.sec-shade) {
    position: relative;
    z-index: 3;
}

.sec-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 50% 70%;
    background-repeat: no-repeat;
    z-index: 0;
    filter: contrast(1.08) brightness(.65) saturate(.85);
    transform: scale(1.05);
    animation: secDrift 24s ease-in-out infinite alternate;
    will-change: transform;
    pointer-events: none;
}

#secClose .sec-bg {
    background-position: 50% 5%;
}

#secRsvp .sec-bg {
    filter: contrast(1.06) brightness(.75) saturate(.9);
}

.sec-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
    z-index: 0;
    filter: contrast(1.08) brightness(.55) saturate(.85);
    transform: scale(1.05);
    animation: secDrift 24s ease-in-out infinite alternate;
    will-change: transform;
    pointer-events: none;
}

.sec-bg-warm {
    filter: contrast(1.06) brightness(.5) saturate(.7) sepia(.18);
}

@keyframes secDrift {
    from {
        transform: scale(1.05) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.13) translate3d(-1.2%, -1%, 0);
    }
}

.sec-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 80% at 50% 50%, transparent 45%, rgba(10, 8, 4, .45) 90%, rgba(10, 8, 4, .6) 100%);
}

.sec-shade-warm {
    background:
        radial-gradient(ellipse 65% 75% at 50% 50%, rgba(58, 40, 18, .16) 0%, rgba(10, 8, 4, .4) 80%, rgba(10, 8, 4, .6) 100%);
}

.sec-shade-deep {
    background:
        radial-gradient(ellipse 60% 70% at 50% 50%, rgba(10, 8, 4, .32) 0%, rgba(10, 8, 4, .55) 80%, rgba(10, 8, 4, .72) 100%);
}

.reveal-el {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--delay, 0s);
    will-change: opacity, transform;
}

.reveal-el.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Hero invite ---------- */
.hero-inner {
    position: relative;
    max-width: 580px;
    width: 92%;
    padding: clamp(40px, 6vw, 72px) clamp(28px, 5vw, 56px);
    text-align: center;
    background: rgba(10, 8, 4, .22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--hairline-strong);
}

.hero-inner::before,
.hero-inner::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--gold);
    opacity: .5;
}

.hero-inner::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.hero-inner::after {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
}

.hero-eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3.4px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .85;
    margin-bottom: 22px;
}

.hero-line {
    width: 60px;
    height: 1px;
    margin: 18px auto;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .6;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(32px, 6vw, 52px);
    letter-spacing: 1.2px;
    color: #fff;
    margin-bottom: 24px;
}

.hero-body {
    font-family: var(--body);
    font-size: clamp(17px, 2.6vw, 21px);
    font-weight: 300;
    line-height: 2;
    color: var(--ivory-d);
}

.hero-em {
    font-family: var(--body);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(24px, 4.4vw, 34px);
    letter-spacing: -.3px;
    color: #fff;
    display: block;
    margin: 8px 0;
}

.hero-body strong {
    font-weight: 500;
    color: var(--gold-lt);
    letter-spacing: 1px;
}

.hero-foot {
    font-family: var(--body);
    font-size: clamp(14px, 2vw, 17px);
    font-style: italic;
    color: rgba(242, 235, 218, .5);
    line-height: 1.8;
}

/* ---------- Filigree ---------- */
.filigree {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
    color: var(--gold);
    opacity: .55;
    position: relative;
    z-index: 3;
}

.filigree svg {
    width: min(340px, 70vw);
    height: auto;
}

.filigree path,
.filigree circle {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.8s var(--ease);
}

.filigree.visible path,
.filigree.visible circle {
    stroke-dashoffset: 0;
}

/* ---------- Details ---------- */
.sec-label {
    font-family: var(--serif);
    font-size: clamp(11px, 1.8vw, 14px);
    font-weight: 600;
    letter-spacing: 3.6px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .9;
    margin-bottom: 48px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.sec-label::before,
.sec-label::after {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 60%);
    opacity: .6;
}

.sec-label::after {
    background: linear-gradient(90deg, var(--gold) 40%, transparent);
}

.d-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 92%;
    max-width: 480px;
}

.d-card {
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(10, 8, 4, .22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hairline);
    transition: border-color .24s cubic-bezier(.2, 0, .2, 1), transform .24s cubic-bezier(.2, 0, .2, 1);
}

.d-card:hover {
    border-color: var(--hairline-strong);
    transform: translateY(-1px);
}

.d-icon {
    width: 26px;
    height: 26px;
    color: var(--gold);
    opacity: .75;
}

.d-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold-lt);
    opacity: .78;
}

.d-value {
    font-family: var(--serif);
    font-size: clamp(20px, 3.6vw, 26px);
    font-weight: 600;
    color: #fff;
    letter-spacing: .4px;
}

.d-note {
    font-family: var(--body);
    font-size: clamp(13px, 1.9vw, 15px);
    font-weight: 300;
    font-style: italic;
    color: rgba(242, 235, 218, .55);
}

/* Prelate card — matches d-card but outside the grid */
.d-card-prelate {
    margin-top: 32px;
    width: 92%;
    max-width: 480px;
}

.prelate-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow:
        0 0 20px rgba(212, 180, 122, .2),
        0 8px 24px rgba(0, 0, 0, .35);
    margin-bottom: 14px;
}

.prelate-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: contrast(1.04) saturate(.95) brightness(.92);
}

.cd-wrap {
    margin-top: 42px;
    padding: 0;
    width: 92%;
    max-width: 520px;
    text-align: center;
    background: rgba(10, 8, 4, .22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hairline);
    overflow: hidden;
    border-radius: 6px;
}

.prelate-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: contrast(1.04) saturate(.95) brightness(.92);
}

.cd-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .85;
    margin-bottom: 18px;
}

.cd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 54px;
}

.cd-num {
    font-family: var(--serif);
    font-size: clamp(28px, 5.5vw, 42px);
    font-weight: 700;
    color: var(--gold-lt);
    line-height: 1;
    letter-spacing: .5px;
}

.cd-txt {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .55);
}

.cd-sep {
    font-family: var(--serif);
    font-size: clamp(20px, 3.5vw, 30px);
    color: var(--gold);
    opacity: .4;
    margin-top: -14px;
}

/* ---------- Father's dedication ---------- */
.ded-card {
    position: relative;
    max-width: 600px;
    width: 92%;
    padding: clamp(44px, 7vw, 72px) clamp(30px, 5vw, 56px);
    text-align: center;
    background: rgba(14, 10, 6, .55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--hairline-strong);
}

.ded-card::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(212, 180, 122, .18);
    pointer-events: none;
}

.ded-orn {
    display: block;
    font-size: 30px;
    color: var(--gold);
    opacity: .7;
    margin-bottom: 18px;
}

.ded-from {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3.2px;
    text-transform: uppercase;
    color: var(--gold-lt);
    opacity: .85;
    margin-bottom: 14px;
}

.ded-line {
    width: 60px;
    height: 1px;
    margin: 0 auto 30px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .6;
}

.ded-body {
    font-family: var(--body);
    font-size: clamp(17px, 2.6vw, 21px);
    font-weight: 300;
    line-height: 2;
    color: var(--ivory-d);
    margin-bottom: 22px;
}

.ded-body em {
    font-family: var(--body);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(22px, 4vw, 30px);
    color: #fff;
    letter-spacing: -.3px;
}

.ded-em {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold-lt);
    font-style: normal;
}

.ded-portrait {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.ded-portrait img {
    width: 160px;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    border: 7px solid;
    border-image: linear-gradient(135deg, #5c4520, #d4b47a 50%, #5c4520) 1;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, .7),
        0 0 0 1px rgba(212, 180, 122, .4);
    filter: contrast(1.04) saturate(.95) brightness(.97);
}

.ded-body-2 {
    margin-top: 8px;
}

.ded-sign {
    font-family: var(--body);
    font-style: italic;
    font-size: clamp(14px, 2vw, 17px);
    color: rgba(242, 235, 218, .55);
    margin-bottom: 6px;
    margin-top: 8px;
}

.ded-sign-name {
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(32px, 5.6vw, 44px);
    letter-spacing: .5px;
    color: var(--gold-lt);
}

/* ---------- Closing — split layout ---------- */
.sec-close-split {
    display: grid;
    grid-template-columns: 2fr 3fr;
    padding: 0 !important;
    align-items: stretch;
    background: #0a0804;
}

.sec-close-split>.sec-shade {
    display: none;
}

.close-img-half {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
}

.close-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 5%;
    display: block;
    filter: brightness(.88) contrast(1.05) saturate(.9);
}

.close-content-half {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--ink);
}

@media (max-width:768px) {
    .sec-close-split {
        grid-template-columns: 1fr;
    }

    .sec-close-split>.sec-shade {
        background: rgba(10, 8, 4, .25);
    }

    .close-img-half {
        min-height: 50vh;
    }

    .close-content-half {
        padding: 50px 24px;
    }
}

@media (max-width:480px) {
    .close-img-half {
        min-height: 40vh;
    }

    .close-content-half {
        padding: 40px 16px;
    }
}

/* ---------- Closing ---------- */
.close-cross {
    font-size: 38px;
    color: var(--gold);
    opacity: .6;
    filter: drop-shadow(0 0 20px rgba(212, 180, 122, .5));
    margin-bottom: 28px;
}

.close-prayer {
    font-family: var(--body);
    font-size: clamp(19px, 3vw, 28px);
    font-weight: 300;
    font-style: italic;
    text-align: center;
    line-height: 1.8;
    color: var(--ivory-d);
    margin-bottom: 24px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .85);
}

.close-div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.close-div span:nth-child(1),
.close-div span:nth-child(3) {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.close-div span:nth-child(2) {
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
    opacity: .7;
}

.close-name {
    font-family: var(--body);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(38px, 7.4vw, 60px);
    letter-spacing: -.5px;
    color: #fff;
    margin-bottom: 14px;
}

.close-latin {
    font-family: var(--body);
    font-size: clamp(15px, 2.2vw, 20px);
    font-weight: 300;
    color: var(--gold-lt);
    opacity: .85;
    margin-bottom: 4px;
}

.close-trans {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .35);
    margin-bottom: 42px;
}

.close-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 42px;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: rgba(10, 8, 4, .55);
    border: 1px solid var(--hairline-strong);
    color: var(--gold-lt);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all .24s cubic-bezier(.2, 0, .2, 1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.act-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 180, 122, .08);
    transform: translateY(-1px);
}

.act-btn svg {
    width: 16px;
    height: 16px;
}

.close-deo {
    font-family: var(--serif);
    font-size: clamp(13px, 2vw, 16px);
    letter-spacing: 2.8px;
    color: var(--gold);
    opacity: .55;
}

.close-footer {
    margin-top: 40px;
    padding-top: 0;
    text-align: center;
    width: 100%;
}

/* ================================================================
   CANDLE MODAL
   ================================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #111;
    color: #fff;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

.candle-container {
    margin: 25px 0;
}

.candle {
    width: 40px;
    height: 100px;
    background: #f5f5f5;
    margin: auto;
    border-radius: 5px;
    position: relative;
}

.wick {
    width: 4px;
    height: 10px;
    background: black;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    width: 16px;
    height: 24px;
    background: orange;
    border-radius: 50%;
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.4), transparent);
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: 0.3s;
}

.candle.lit .flame {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.candle.lit .glow {
    opacity: 1;
}

.light-btn {
    background: linear-gradient(135deg, gold, orange);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    transition: 0.2s;
}

.light-btn:hover {
    transform: scale(1.05);
}

.prayer-msg {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
}

.prayer-msg.show {
    opacity: 1;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width:768px) {
    .sec {
        padding: 90px 20px;
    }

    .close-actions {
        flex-direction: column;
        align-items: center;
    }

    .act-btn {
        width: 80%;
        justify-content: center;
    }

    .cd {
        gap: 5px;
    }

    .cd-unit {
        min-width: 46px;
    }

    .cine-skip {
        bottom: 18px;
        right: 18px;
        padding: 7px 14px;
    }
}

/* ================================================================
   GOLD DUST PARTICLES (canvas)
   ================================================================ */
#dust {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
    mix-blend-mode: screen;
}

body.scrollable-on #dust {
    opacity: .85;
}

/* ================================================================
   DIVINE LIGHT RAYS
   ================================================================ */
#rays {
    position: fixed;
    top: -10vh;
    left: 50%;
    transform: translateX(-50%);
    width: 160vw;
    height: 120vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
    mix-blend-mode: screen;
}

body.scrollable-on #rays {
    opacity: .55;
}

#rays span {
    position: absolute;
    left: 50%;
    top: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(180deg, rgba(245, 226, 176, .22), rgba(245, 226, 176, .08) 40%, transparent 75%);
    transform-origin: top center;
    filter: blur(14px);
    animation: rayShimmer 8s ease-in-out infinite alternate;
}

#rays span:nth-child(1) {
    transform: translateX(-50%) rotate(-22deg);
    animation-delay: 0s;
}

#rays span:nth-child(2) {
    transform: translateX(-50%) rotate(-9deg);
    animation-delay: 1.4s;
}

#rays span:nth-child(3) {
    transform: translateX(-50%) rotate(0deg);
    animation-delay: 2.6s;
    width: 80px;
}

#rays span:nth-child(4) {
    transform: translateX(-50%) rotate(11deg);
    animation-delay: 3.8s;
}

#rays span:nth-child(5) {
    transform: translateX(-50%) rotate(24deg);
    animation-delay: 5.1s;
}

@keyframes rayShimmer {
    0% {
        opacity: .35;
    }

    100% {
        opacity: .85;
    }
}

/* ================================================================
   BIBLE VERSE SECTION
   ================================================================ */
.sec-verse {
    min-height: 80vh;
}

.verse-inner {
    position: relative;
    max-width: 720px;
    width: 92%;
    text-align: center;
    padding: 48px 28px;
}

.verse-mark {
    display: block;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(80px, 18vw, 160px);
    line-height: .6;
    color: var(--gold);
    opacity: .35;
    margin-bottom: 18px;
    text-shadow: 0 0 40px rgba(212, 180, 122, .4);
}

.verse-body {
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(22px, 4.2vw, 38px);
    line-height: 1.7;
    color: var(--ivory);
    letter-spacing: .5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .85);
    margin-bottom: 30px;
}

.verse-ref {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(12px, 1.9vw, 15px);
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .88;
}

/* ================================================================
   TIMELINE
   ================================================================ */
.sec-timeline {
    padding-bottom: 140px;
}

/* legacy sublabel (kept for any other section that may still use it) */
.sec-sublabel {
    font-family: var(--body);
    font-style: italic;
    font-size: clamp(15px, 2.2vw, 18px);
    color: var(--ivory-d);
    margin-top: -30px;
    margin-bottom: 48px;
    text-align: center;
}

/* Italic prelude under the section label */
.tl-prelude {
    font-family: var(--body);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(17px, 2.5vw, 21px);
    letter-spacing: -.2px;
    color: var(--ivory-d);
    margin-top: -30px;
    margin-bottom: 48px;
    text-align: center;
}

.tl-prelude em {
    font-style: italic;
    color: #fff;
    font-weight: 500;
}

/* Vertical rhythm of the journey */
.tl-wrap {
    list-style: none;
    width: 92%;
    max-width: 580px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Each milestone: medallion + card side-by-side */
.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    position: relative;
}

/* Roman-numeral medallion */
.tl-medallion {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, rgba(20, 14, 8, .95), rgba(7, 5, 3, 1));
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px rgba(10, 8, 4, .95),
        0 0 18px rgba(212, 180, 122, .35),
        inset 0 1px 0 rgba(245, 226, 176, .18);
    position: relative;
}

.tl-medallion::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(212, 180, 122, .22);
    pointer-events: none;
}

.tl-num {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .5px;
    color: var(--gold-lt);
}

/* Final medallion — gold leaf */
.tl-medallion-gold {
    background: radial-gradient(circle at 35% 30%, #fff5cc 0%, #f5e2b0 25%, #d4b47a 60%, #8a6a30 100%);
    border-color: var(--gold-lt);
    box-shadow:
        0 0 0 4px rgba(10, 8, 4, .95),
        0 0 32px rgba(245, 226, 176, .65),
        inset 0 1px 0 rgba(255, 247, 210, .5);
    animation: tlPulse 2.6s ease-in-out infinite;
}

.tl-medallion-gold::before {
    border-color: rgba(58, 40, 18, .4);
}

.tl-medallion-gold .tl-num {
    color: var(--ink-warm);
    text-shadow: 0 1px 0 rgba(255, 247, 210, .5);
}

@keyframes tlPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(10, 8, 4, .95), 0 0 22px rgba(245, 226, 176, .55), inset 0 1px 0 rgba(255, 247, 210, .5);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(10, 8, 4, .95), 0 0 44px rgba(245, 226, 176, .95), inset 0 1px 0 rgba(255, 247, 210, .5);
    }
}

/* Card */
.tl-card {
    flex: 1;
    min-width: 0;
    background: rgba(10, 8, 4, .32);
    border: 1px solid var(--hairline);
    padding: 20px 24px;
}

.tl-card-gold {
    border-color: var(--hairline-strong);
    background: rgba(20, 14, 8, .5);
    padding: 24px 26px;
    box-shadow: inset 0 0 36px rgba(212, 180, 122, .08);
    position: relative;
}

.tl-year {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(12px, 1.85vw, 14px);
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold-lt);
    opacity: .92;
    margin-bottom: 10px;
}

.tl-cross {
    color: var(--gold);
    font-size: .85em;
    opacity: .9;
    font-style: normal;
}

.tl-txt {
    font-family: var(--body);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(16px, 2.4vw, 19px);
    line-height: 1.65;
    color: var(--ivory-d);
    letter-spacing: -.1px;
}

.tl-txt em {
    font-style: italic;
    color: var(--gold-lt);
    font-weight: 500;
}

.tl-card-gold .tl-txt {
    font-style: normal;
    font-weight: 500;
    color: #fff;
    font-size: clamp(17px, 2.5vw, 20px);
    letter-spacing: .2px;
}

.tl-card-gold .tl-txt strong {
    font-weight: 600;
    color: #fff;
}

.tl-coda {
    margin-top: 14px;
    font-family: var(--body);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(13px, 1.9vw, 15px);
    letter-spacing: .3px;
    color: var(--gold-lt);
    opacity: .85;
}

/* Chain divider between items */
.tl-chain {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 14px 0 14px 0;
    padding-left: 12px;
    /* nudge to roughly align with medallion column */
}

.tl-chain::before,
.tl-chain::after {
    content: "";
    flex: 0 0 auto;
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hairline-strong) 60%);
    opacity: .7;
}

.tl-chain::after {
    background: linear-gradient(90deg, var(--hairline-strong) 40%, transparent);
}

.tl-chain span {
    font-size: 9px;
    color: var(--gold);
    opacity: .55;
    line-height: 1;
}

.tl-chain-gold span {
    font-size: 13px;
    opacity: .95;
    text-shadow: 0 0 12px rgba(212, 180, 122, .6);
}

.tl-chain-gold::before,
.tl-chain-gold::after {
    background: linear-gradient(90deg, transparent, var(--gold) 70%);
    opacity: .9;
}

.tl-chain-gold::after {
    background: linear-gradient(90deg, var(--gold) 30%, transparent);
}

@media (max-width:520px) {
    .tl-item {
        gap: 16px;
    }

    .tl-medallion {
        width: 40px;
        height: 40px;
    }

    .tl-num {
        font-size: 14px;
    }

    .tl-card {
        padding: 16px 18px;
    }

    .tl-card-gold {
        padding: 20px 20px;
    }

    .tl-chain {
        margin: 10px 0;
        padding-left: 8px;
    }

    .tl-chain::before,
    .tl-chain::after {
        width: 22px;
    }
}

/* ================================================================
   GRATITUDE (uses existing .ded-card from above)
   ================================================================ */
.sec-gratitude .sec-label {
    margin-bottom: 42px;
}

/* ================================================================
   RSVP FORM
   ================================================================ */
/* ================================================================
   CANDLE SECTION — standalone prayer experience
   ================================================================ */
.candle-sec-sub {
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(16px, 2.4vw, 20px);
    color: var(--ivory-d);
    text-align: center;
    margin-top: -10px;
    margin-bottom: 28px;
    line-height: 1.8;
}

/* Container box — matches RSVP form */
.candle-box {
    position: relative;
    width: 92%;
    max-width: 560px;
    padding: clamp(36px, 6vw, 52px) clamp(26px, 5vw, 44px);
    background:
        linear-gradient(180deg, rgba(20, 14, 8, .42) 0%, rgba(14, 10, 6, .55) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.candle-box::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--hairline);
    pointer-events: none;
    border-radius: 4px;
}

/* --- Candle stage --- */
.candle-stage {
    position: relative;
    width: 200px;
    height: 360px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 12px 0 20px;
}

/* Ambient light — hidden until lit */
.cs-ambient {
    position: absolute;
    top: -40px;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 180, 80, .12) 0%, rgba(255, 140, 40, .04) 40%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease .2s;
}

.cs-halo {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 160px;
    height: 160px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 210, 120, .2) 0%, transparent 55%);
    animation: csHaloPulse 4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease .3s;
}

@keyframes csHaloPulse {

    0%,
    100% {
        opacity: .4;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.25);
    }
}

.candle-stage.lit .cs-ambient,
.candle-stage.lit .cs-halo {
    opacity: 1;
}

.cs-embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Candle wrap — always visible */
.cs-candle-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ====== SMOKE ====== */
.cs-smoke {
    position: absolute;
    top: -30px;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 10;
}

.cs-smoke-wisp {
    position: absolute;
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, rgba(200, 200, 210, .25), transparent);
    border-radius: 50%;
    filter: blur(3px);
    opacity: 0;
    transform: translate(-50%, 0);
}

.candle-stage.lit .cs-smoke-wisp {
    animation: csSmokeRise 4s ease-out infinite;
}

.cs-smoke-wisp.s2 {
    animation-delay: 1.3s !important;
    left: 4px;
}

.cs-smoke-wisp.s3 {
    animation-delay: 2.6s !important;
    left: -4px;
}

@keyframes csSmokeRise {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scaleX(1);
    }

    10% {
        opacity: .4;
    }

    60% {
        opacity: .15;
        transform: translate(calc(-50% + 8px), -60px) scaleX(2.5);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + 14px), -100px) scaleX(4);
    }
}

/* ====== FLAME — 4-layer pure CSS ====== */
.cs-flame-wrap {
    position: relative;
    width: 44px;
    height: 90px;
    z-index: 4;
    opacity: 0;
    transform: scaleY(.3) scaleX(.5);
    transition: opacity .6s ease, transform .8s cubic-bezier(.23, 1, .32, 1);
    filter: drop-shadow(0 0 14px rgba(255, 180, 60, .7)) drop-shadow(0 0 40px rgba(255, 130, 30, .35)) drop-shadow(0 0 80px rgba(255, 100, 20, .15));
}

.candle-stage.lit .cs-flame-wrap {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
}

/* Outer glow — dark red/orange edge */
.cs-flame-outer {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 38px;
    height: 78px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 50% 80% at 50% 85%,
            rgba(255, 180, 60, .9) 0%, rgba(230, 120, 20, .6) 30%,
            rgba(180, 60, 10, .3) 60%, transparent 100%);
    border-radius: 50% 50% 48% 48% / 76% 76% 24% 24%;
    animation: csFlameFlicker1 1.5s ease-in-out infinite alternate;
}

/* Mid flame — bright orange */
.cs-flame-mid {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 66px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 50% 75% at 50% 82%,
            rgba(255, 240, 180, 1) 0%, rgba(255, 200, 80, .9) 25%,
            rgba(255, 150, 30, .6) 55%, transparent 100%);
    border-radius: 50% 50% 46% 46% / 78% 78% 22% 22%;
    animation: csFlameFlicker2 2.1s ease-in-out infinite alternate;
}

/* Inner flame — yellow-white */
.cs-flame-inner {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 18px;
    height: 52px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 50% 70% at 50% 80%,
            rgba(255, 255, 255, 1) 0%, rgba(255, 255, 230, .9) 20%,
            rgba(255, 240, 160, .6) 50%, transparent 100%);
    border-radius: 50% 50% 44% 44% / 80% 80% 20% 20%;
    animation: csFlameFlicker3 1.8s ease-in-out infinite alternate;
}

/* Blue core at base */
.cs-flame-core {
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 12px;
    height: 14px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 60%,
            rgba(100, 160, 255, .8) 0%, rgba(60, 100, 200, .4) 50%, transparent 100%);
    border-radius: 50%;
    animation: csCoreFlicker 1.2s ease-in-out infinite alternate;
}

@keyframes csFlameFlicker1 {
    0% {
        height: 78px;
        width: 38px;
        opacity: 1;
    }

    25% {
        height: 74px;
        width: 36px;
    }

    50% {
        height: 80px;
        width: 40px;
        opacity: .95;
    }

    75% {
        height: 72px;
        width: 35px;
    }

    100% {
        height: 76px;
        width: 37px;
        opacity: 1;
    }
}

@keyframes csFlameFlicker2 {
    0% {
        height: 66px;
        width: 28px;
        transform: translateX(-50%) rotate(0deg);
    }

    33% {
        height: 62px;
        width: 26px;
        transform: translateX(-48%) rotate(1.5deg);
    }

    66% {
        height: 68px;
        width: 30px;
        transform: translateX(-52%) rotate(-1deg);
    }

    100% {
        height: 64px;
        width: 27px;
        transform: translateX(-50%) rotate(.5deg);
    }
}

@keyframes csFlameFlicker3 {
    0% {
        height: 52px;
        width: 18px;
    }

    50% {
        height: 48px;
        width: 16px;
    }

    100% {
        height: 54px;
        width: 19px;
    }
}

@keyframes csCoreFlicker {
    0% {
        opacity: .7;
        width: 12px;
    }

    50% {
        opacity: 1;
        width: 14px;
    }

    100% {
        opacity: .6;
        width: 11px;
    }
}

/* ====== WICK ====== */
.cs-wick {
    width: 2.5px;
    height: 18px;
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, #0d0600 0%, #2a1808 40%, #1a0c02 100%);
    border-radius: 1px;
    margin-top: -8px;
    /* Slight curl */
    transform: rotate(-2deg);
}

.cs-wick-ember {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #ff8800 40%, #cc3300 70%, transparent 100%);
    box-shadow: 0 0 4px 2px rgba(255, 120, 0, .7), 0 0 12px 4px rgba(255, 80, 0, .3);
    opacity: 0;
    transition: opacity .8s ease;
}

.candle-stage.lit .cs-wick-ember {
    opacity: 1;
    animation: csEmberPulse 1.5s ease-in-out infinite alternate;
}

@keyframes csEmberPulse {
    0% {
        box-shadow: 0 0 4px 2px rgba(255, 120, 0, .7), 0 0 12px 4px rgba(255, 80, 0, .3);
    }

    100% {
        box-shadow: 0 0 6px 3px rgba(255, 120, 0, .9), 0 0 16px 6px rgba(255, 80, 0, .5);
    }
}

/* ====== MELTED WAX POOL ====== */
.cs-melt-pool {
    position: relative;
    width: 54px;
    height: 8px;
    z-index: 2;
    background: radial-gradient(ellipse 100% 100% at 50% 50%,
            rgba(255, 248, 230, .6) 0%, rgba(245, 235, 210, .4) 50%, rgba(235, 220, 190, .2) 100%);
    border-radius: 50%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(255, 250, 230, .15);
    opacity: 0;
    transition: opacity .8s ease .4s;
}

.candle-stage.lit .cs-melt-pool {
    opacity: 1;
}

.cs-melt-shine {
    position: absolute;
    top: 1px;
    left: 30%;
    width: 40%;
    height: 3px;
    background: rgba(255, 255, 255, .3);
    border-radius: 50%;
    animation: csMeltShimmer 3s ease-in-out infinite;
}

@keyframes csMeltShimmer {

    0%,
    100% {
        opacity: .3;
        left: 30%;
    }

    50% {
        opacity: .6;
        left: 35%;
    }
}

/* ====== WAX BODY ====== */
.cs-wax {
    position: relative;
    width: 38px;
    height: 160px;
    z-index: 2;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, .04) 0%, transparent 15%, transparent 85%, rgba(0, 0, 0, .04) 100%),
        linear-gradient(180deg,
            #fdf8ee 0%, #faf3e2 5%, #f6eed6 15%,
            #f2e8cc 30%, #eee0c0 50%,
            #eadab6 70%, #e6d4ae 85%, #e2ceA6 100%);
    border-radius: 2px 2px 1px 1px;
    box-shadow:
        inset -8px 0 20px rgba(0, 0, 0, .05),
        inset 8px 0 20px rgba(255, 255, 255, .08),
        inset 0 6px 12px rgba(0, 0, 0, .03),
        -4px 0 16px rgba(0, 0, 0, .12),
        4px 0 14px rgba(0, 0, 0, .08),
        0 14px 36px rgba(0, 0, 0, .3);
}

/* Subtle texture noise */
.cs-wax-texture {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, .008) 2px, rgba(0, 0, 0, .008) 4px);
    mix-blend-mode: multiply;
    border-radius: inherit;
}

/* Left light reflection */
.cs-wax-shine {
    position: absolute;
    top: 10px;
    left: 4px;
    width: 12px;
    height: 88%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .15) 25%,
            rgba(255, 255, 255, .06) 60%, transparent 100%);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 1s ease .5s;
}

.candle-stage.lit .cs-wax-shine {
    opacity: 1;
}

/* Right shadow */
.cs-wax-shadow {
    position: absolute;
    top: 10px;
    right: 3px;
    width: 10px;
    height: 88%;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, .04) 0%, rgba(0, 0, 0, .08) 50%, rgba(0, 0, 0, .03) 100%);
    border-radius: 2px;
}

/* Wax drips */
.cs-wax-drip {
    position: absolute;
    bottom: -6px;
    border-radius: 0 0 50% 50%;
    background: linear-gradient(180deg, #efe4c8, #e2d4ae);
}

.cs-wax-drip.d1 {
    left: 8px;
    width: 7px;
    height: 12px;
}

.cs-wax-drip.d2 {
    right: 10px;
    width: 5px;
    height: 18px;
}

.cs-wax-drip.d3 {
    left: 22px;
    width: 4px;
    height: 8px;
}

/* ====== ORNATE BRASS HOLDER ====== */
.cs-holder {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4));
}

.cs-holder-lip {
    width: 60px;
    height: 4px;
    background: linear-gradient(180deg, #dfc068 0%, #c4a24a 100%);
    border-radius: 2px 2px 0 0;
    box-shadow: inset 0 1px 2px rgba(255, 230, 160, .4);
}

.cs-holder-cup {
    width: 68px;
    height: 14px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg,
            #c4a24a 0%, #b8923a 30%, #a07828 60%, #8a6420 100%);
    box-shadow:
        inset 0 -4px 8px rgba(0, 0, 0, .2),
        inset 0 2px 3px rgba(255, 220, 150, .15);
}

.cs-holder-ring {
    width: 18px;
    height: 4px;
    background: linear-gradient(180deg, #dfc068, #b8923a);
    border-radius: 2px;
}

.cs-holder-stem {
    width: 12px;
    height: 14px;
    background: linear-gradient(90deg, #7a5a18 0%, #b8923a 40%, #c4a24a 50%, #b8923a 60%, #7a5a18 100%);
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, .15);
}

.cs-holder-base {
    width: 86px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(180deg,
            #c4a24a 0%, #a07828 40%, #8a6420 70%, #6a4c14 100%);
    box-shadow:
        inset 0 1px 3px rgba(255, 220, 150, .2),
        0 3px 8px rgba(0, 0, 0, .35),
        0 8px 20px rgba(0, 0, 0, .25);
}

/* ====== FLOOR GLOW ====== */
.cs-floor-glow {
    position: absolute;
    bottom: -14px;
    left: 50%;
    width: 160px;
    height: 32px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 200, 100, .12), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease .5s;
}

.candle-stage.lit .cs-floor-glow {
    opacity: 1;
    animation: csFloorPulse 4s ease-in-out infinite;
}

@keyframes csFloorPulse {

    0%,
    100% {
        opacity: .5;
    }

    50% {
        opacity: 1;
    }
}

/* ====== EMBER PARTICLES ====== */
.cs-ember {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #ffdd80, #ff9d2a);
    opacity: 0;
    pointer-events: none;
    animation: csEmberRise 2.5s ease-out forwards;
}

@keyframes csEmberRise {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--ex), var(--ey)) scale(.3);
    }
}

/* --- Action area --- */
.candle-sec-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 92%;
    max-width: 380px;
    margin-bottom: 28px;
}

.candle-sec-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 8, 4, .35);
    border: 1px solid var(--hairline);
    color: var(--ivory);
    font-family: var(--body);
    font-size: 16px;
    font-style: italic;
    letter-spacing: .3px;
    outline: none;
    transition: border-color .3s;
}

.candle-sec-input::placeholder {
    color: rgba(242, 235, 218, .35);
}

.candle-sec-input:focus {
    border-color: var(--gold);
}

.candle-sec-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    cursor: pointer;
    background: rgba(10, 8, 4, .5);
    border: 1px solid var(--hairline-strong);
    color: var(--gold-lt);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    transition: all .3s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.candle-sec-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 180, 122, .1);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(212, 180, 122, .15);
}

.csb-icon {
    font-size: 14px;
}

/* --- Stats --- */
.candle-sec-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.css-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.css-num {
    font-family: var(--serif);
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    color: var(--gold-lt);
    line-height: 1;
}

.css-num.bump {
    animation: csBump .4s ease;
}

@keyframes csBump {
    50% {
        transform: scale(1.2);
    }
}

.css-lbl {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .45);
}

.css-sep {
    width: 1px;
    height: 28px;
    background: var(--hairline);
}

/* Prayer message */
.candle-sec-msg {
    font-family: var(--body);
    font-style: italic;
    font-size: clamp(14px, 2vw, 17px);
    color: rgba(242, 235, 218, .5);
    text-align: center;
    max-width: 360px;
    opacity: 0;
    transition: opacity .6s ease;
    margin-bottom: 16px;
}

.candle-sec-msg.show {
    opacity: 1;
}

/* Mini candle wall */
.candle-sec-wall {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 260px;
}

.csw-flame {
    width: 6px;
    height: 10px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, #ffe08a, #ff9d2a);
    animation: cswFlicker .8s ease-in-out infinite alternate, cswFadeIn .5s ease forwards;
    opacity: 0;
}

@keyframes cswFlicker {
    0% {
        transform: scaleY(1) scaleX(1);
    }

    100% {
        transform: scaleY(.85) scaleX(.9);
    }
}

@keyframes cswFadeIn {
    to {
        opacity: .7;
    }
}

/* ----- RSVP — vellum letter ----- */
.rsvp-invite {
    font-family: var(--body);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(18px, 2.6vw, 22px);
    letter-spacing: -.2px;
    color: var(--ivory-d);
    margin-top: -30px;
    margin-bottom: 42px;
    text-align: center;
}

.rsvp-invite em {
    font-style: italic;
    color: #fff;
    font-weight: 500;
}

.rsvp-form {
    position: relative;
    width: 92%;
    max-width: 560px;
    padding: clamp(36px, 6vw, 52px) clamp(26px, 5vw, 44px);
    background:
        linear-gradient(180deg, rgba(20, 14, 8, .42) 0%, rgba(14, 10, 6, .55) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.rsvp-form::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--hairline);
    pointer-events: none;
    border-radius: 4px;
}

/* Gold filigree corners (matches candle altar pattern) */
.rsvp-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1px solid var(--gold);
    opacity: .7;
    pointer-events: none;
    z-index: 1;
}

.rsvp-corner::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(212, 180, 122, .6);
}

.rsvp-tl {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.rsvp-tl::before {
    top: -2px;
    left: -2px;
}

.rsvp-tr {
    top: -1px;
    right: -1px;
    border-left: 0;
    border-bottom: 0;
}

.rsvp-tr::before {
    top: -2px;
    right: -2px;
}

.rsvp-bl {
    bottom: -1px;
    left: -1px;
    border-right: 0;
    border-top: 0;
}

.rsvp-bl::before {
    bottom: -2px;
    left: -2px;
}

.rsvp-br {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
}

.rsvp-br::before {
    bottom: -2px;
    right: -2px;
}

.rsvp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width:520px) {
    .rsvp-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

.rsvp-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    position: relative;
}

.rsvp-lbl {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .85;
}

.rsvp-lbl::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hairline) 0%, transparent 70%);
}

.rsvp-lbl-faint {
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: .7;
}

.rsvp-field input,
.rsvp-field textarea {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--ivory);
    padding: 9px 2px 11px;
    font-family: var(--body);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: .2px;
    transition: border-color .24s cubic-bezier(.2, 0, .2, 1);
    width: 100%;
}

.rsvp-field input::placeholder,
.rsvp-field textarea::placeholder {
    color: rgba(242, 235, 218, .32);
    font-style: italic;
}

.rsvp-field input:focus,
.rsvp-field textarea:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.rsvp-field textarea {
    resize: vertical;
    min-height: 78px;
    font-family: var(--body);
    font-style: italic;
    line-height: 1.6;
    border: 1px solid var(--hairline);
    padding: 14px 16px;
    background: rgba(10, 8, 4, .3);
}

.rsvp-field textarea:focus {
    border-color: var(--gold);
    background: rgba(20, 14, 6, .45);
}

/* Segmented toggle */
.rsvp-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--hairline-strong);
    background: rgba(10, 8, 4, .5);
    overflow: hidden;
}

.rsvp-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 50%;
    background: linear-gradient(180deg, rgba(212, 180, 122, .18) 0%, rgba(58, 40, 18, .55) 100%);
    border-right: 1px solid var(--hairline);
    transform: translateX(0);
    transition: transform .28s cubic-bezier(.2, 0, .2, 1);
    z-index: 0;
}

.rsvp-toggle:has(input[value="prayer"]:checked)::before {
    transform: translateX(100%);
    border-right: 0;
    border-left: 1px solid var(--hairline);
}

.rsvp-toggle-opt {
    position: relative;
    z-index: 1;
    padding: 13px 14px;
    cursor: pointer;
    text-align: center;
    transition: background .24s;
}

.rsvp-toggle-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rsvp-toggle-opt>span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .55);
    transition: color .24s cubic-bezier(.2, 0, .2, 1);
}

.rsvp-toggle-opt:has(input:checked)>span {
    color: var(--gold-lt);
}

.rsvp-tog-mark {
    font-style: normal;
    font-size: 11px;
    color: var(--gold);
    opacity: .85;
}

.rsvp-toggle-opt:not(:has(input:checked)) .rsvp-tog-mark {
    opacity: .45;
}

.rsvp-submit {
    margin-top: 14px;
    padding: 17px 26px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(212, 180, 122, .16), rgba(58, 40, 18, .4));
    border: 1px solid var(--hairline-strong);
    color: var(--gold-lt);
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    transition: all .24s cubic-bezier(.2, 0, .2, 1);
    position: relative;
}

.rsvp-submit::before,
.rsvp-submit::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 1px;
    width: 38px;
    background: linear-gradient(90deg, transparent, var(--gold) 70%);
    opacity: 0;
    transition: opacity .3s, width .3s;
}

.rsvp-submit::before {
    left: 8px;
}

.rsvp-submit::after {
    right: 8px;
    background: linear-gradient(90deg, var(--gold) 30%, transparent);
}

.rsvp-submit:hover {
    background: linear-gradient(180deg, rgba(212, 180, 122, .28), rgba(58, 40, 18, .55));
    border-color: var(--gold);
    color: #fff;
    transform: translateY(-1px);
}

.rsvp-submit:hover::before,
.rsvp-submit:hover::after {
    opacity: .6;
}

.rsvp-sub-orn {
    font-size: 13px;
    color: var(--gold);
    opacity: .9;
    transition: transform .3s;
}

.rsvp-submit:hover .rsvp-sub-orn {
    transform: scale(1.08);
}

.rsvp-sub-txt {
    display: inline-block;
}

.rsvp-submit.sent {
    background: linear-gradient(180deg, rgba(212, 180, 122, .22), rgba(58, 40, 18, .5));
    border-color: var(--gold);
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.rsvp-submit.sent::before,
.rsvp-submit.sent::after {
    opacity: .85;
}

.rsvp-note {
    font-family: var(--body);
    font-size: 13px;
    color: rgba(242, 235, 218, .5);
    text-align: center;
    margin-top: 6px;
    line-height: 1.6;
}

.rsvp-note em {
    font-style: italic;
}

.rsvp-note.sealed {
    color: var(--gold-lt);
    font-size: 15px;
    letter-spacing: .2px;
}

.rsvp-note.sealed em {
    color: #fff;
}

/* ================================================================
   FOOTER PRAYER
   ================================================================ */
.sec-footer {
    position: relative;
    z-index: 4;
    padding: 80px 24px 60px;
    text-align: center;
    background: transparent;
}

.ft-cross {
    font-size: 32px;
    color: var(--gold);
    opacity: .55;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 18px rgba(212, 180, 122, .5));
}

.ft-prayer {
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(16px, 2.4vw, 21px);
    line-height: 2;
    color: var(--ivory-d);
    max-width: 560px;
    margin: 0 auto 30px;
}

.ft-div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 26px;
}

.ft-div span:nth-child(1),
.ft-div span:nth-child(3) {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ft-div .d {
    color: var(--gold);
    font-size: 9px;
}

.ft-meta {
    font-family: var(--serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .7;
    margin-bottom: 8px;
}

.ft-meta-faint {
    opacity: .35;
    font-size: 10px;
    letter-spacing: 3px;
}

.ft-meta-faint em {
    font-style: italic;
    color: var(--gold-lt);
}

/* ================================================================
   CANDLE MODAL — sacred redesign
   ================================================================ */
.modal {
    display: flex;
    padding: 20px;
}

.candle-modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 36px 28px 28px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(20, 14, 6, .84), rgba(10, 8, 4, .94)),
        url('../img/44661_29042026.JPG.jpeg') 50% 35%/cover no-repeat,
        #0a0804;
    border: 1px solid rgba(212, 180, 122, .32);
    box-shadow:
        0 50px 100px rgba(0, 0, 0, .85),
        inset 0 1px 0 rgba(245, 226, 176, .1);
}

.candle-modal-content::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(212, 180, 122, .16);
    pointer-events: none;
}

.candle-close {
    position: absolute;
    top: 8px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--gold);
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    transition: color .3s, transform .3s;
    z-index: 5;
}

.candle-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.candle-modal-content .orn {
    justify-content: center;
    opacity: .85;
    margin-bottom: 14px;
}

.candle-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(22px, 4vw, 28px);
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 10px;
}

.candle-sub {
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(14px, 2.2vw, 16px);
    color: var(--ivory-d);
    line-height: 1.6;
    margin-bottom: 26px;
}

/* ----- Candle Altar — cinematic centerpiece ----- */
.candle-altar {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 24px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 70% at 50% 78%, rgba(255, 160, 60, .18), transparent 65%),
        radial-gradient(ellipse 80% 100% at 50% 100%, rgba(92, 26, 26, .35), transparent 60%),
        linear-gradient(180deg, #07050a 0%, #0a0804 55%, #14100a 100%);
    border: 1px solid rgba(212, 180, 122, .22);
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, .85),
        inset 0 1px 0 rgba(245, 226, 176, .08);
}

.candle-altar::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(212, 180, 122, .12);
    pointer-events: none;
}

/* Gold filigree corners */
.ca-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--gold);
    opacity: .65;
    pointer-events: none;
}

.ca-corner::before,
.ca-corner::after {
    content: "";
    position: absolute;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(212, 180, 122, .6);
}

.ca-corner::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.ca-tl {
    top: 10px;
    left: 10px;
    border-right: 0;
    border-bottom: 0;
}

.ca-tl::before {
    top: -3px;
    left: -3px;
}

.ca-tr {
    top: 10px;
    right: 10px;
    border-left: 0;
    border-bottom: 0;
}

.ca-tr::before {
    top: -3px;
    right: -3px;
}

.ca-bl {
    bottom: 10px;
    left: 10px;
    border-right: 0;
    border-top: 0;
}

.ca-bl::before {
    bottom: -3px;
    left: -3px;
}

.ca-br {
    bottom: 10px;
    right: 10px;
    border-left: 0;
    border-top: 0;
}

.ca-br::before {
    bottom: -3px;
    right: -3px;
}

/* Subtle starfield in the void above the candle */
.ca-stardust {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    mix-blend-mode: screen;
    background-image:
        radial-gradient(1px 1px at 18% 22%, #fff6d6 50%, transparent 100%),
        radial-gradient(1px 1px at 72% 16%, #f5e2b0 50%, transparent 100%),
        radial-gradient(1px 1px at 38% 32%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 86% 38%, #f5e2b0 50%, transparent 100%),
        radial-gradient(1px 1px at 12% 48%, #fff6d6 50%, transparent 100%),
        radial-gradient(1px 1px at 56% 12%, #fff 50%, transparent 100%);
    animation: starTwinkle 6s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% {
        opacity: .25;
    }

    100% {
        opacity: .7;
    }
}

/* Halo behind candle (lit only) */
.ca-halo {
    position: absolute;
    left: 50%;
    bottom: 35%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, 50%) scale(0);
    background:
        radial-gradient(circle, rgba(255, 200, 120, .55) 0%, rgba(255, 160, 60, .22) 25%, rgba(212, 180, 122, .08) 55%, transparent 75%);
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s ease;
    pointer-events: none;
    mix-blend-mode: screen;
}

.candle-altar.lit .ca-halo {
    opacity: 1;
    transform: translate(-50%, 50%) scale(1);
    animation: haloBreath 4.6s ease-in-out infinite alternate 1.2s;
}

@keyframes haloBreath {
    0% {
        transform: translate(-50%, 50%) scale(.96);
        opacity: .85;
    }

    100% {
        transform: translate(-50%, 50%) scale(1.08);
        opacity: 1;
    }
}

/* God-rays from the flame */
.ca-rays {
    position: absolute;
    left: 50%;
    bottom: 38%;
    width: 0;
    height: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
    mix-blend-mode: screen;
}

.ca-rays span {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 160px;
    background: linear-gradient(180deg, rgba(255, 220, 140, .35), rgba(255, 180, 80, .1) 50%, transparent);
    transform-origin: top center;
    filter: blur(4px);
}

.ca-rays span:nth-child(1) {
    transform: translateX(-50%) rotate(-55deg);
}

.ca-rays span:nth-child(2) {
    transform: translateX(-50%) rotate(-28deg);
}

.ca-rays span:nth-child(3) {
    transform: translateX(-50%) rotate(-8deg);
    height: 200px;
}

.ca-rays span:nth-child(4) {
    transform: translateX(-50%) rotate(8deg);
    height: 200px;
}

.ca-rays span:nth-child(5) {
    transform: translateX(-50%) rotate(28deg);
}

.ca-rays span:nth-child(6) {
    transform: translateX(-50%) rotate(55deg);
}

.candle-altar.lit .ca-rays {
    opacity: .6;
    animation: raysSpin 22s linear infinite;
}

@keyframes raysSpin {
    from {
        transform: rotate(-1.5deg);
    }

    50% {
        transform: rotate(1.5deg);
    }

    to {
        transform: rotate(-1.5deg);
    }
}

/* Embers layer */
.ca-embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ember {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff7c2 0%, #ffaa3c 60%, rgba(255, 170, 60, 0) 100%);
    box-shadow: 0 0 6px rgba(255, 180, 80, .9);
    animation: emberRise 2.6s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes emberRise {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--ex, 0), var(--ey, -180px)) scale(.2);
        opacity: 0;
    }
}

/* The candle itself */
.ca-candle {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* Floor glow under holder */
.ca-floor-glow {
    position: absolute;
    left: 50%;
    bottom: -20px;
    width: 220px;
    height: 30px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 180, 80, .4), transparent 70%);
    filter: blur(8px);
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.candle-altar.lit .ca-floor-glow {
    opacity: .95;
}

/* Flame */
.ca-flame {
    position: relative;
    width: 54px;
    height: 96px;
    margin-bottom: -10px;
    transform: scale(0);
    opacity: 0;
    transform-origin: 50% 100%;
    transition: transform .9s cubic-bezier(.34, 1.56, .64, 1), opacity .9s;
    filter: drop-shadow(0 0 18px rgba(255, 170, 60, .7)) drop-shadow(0 0 40px rgba(212, 180, 122, .35));
}

.candle-altar.lit .ca-flame {
    transform: scale(1);
    opacity: 1;
}

.ca-flame-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Independent layered flame animation for depth */
.fl-outer {
    transform-origin: 30px 100%;
    animation: flOuter 1.2s ease-in-out infinite alternate;
}

.fl-mid {
    transform-origin: 30px 100%;
    animation: flMid .9s ease-in-out infinite alternate;
}

.fl-core {
    transform-origin: 30px 100%;
    animation: flCore .7s ease-in-out infinite alternate;
}

.fl-base {
    transform-origin: 30px 100%;
    animation: flBase .55s ease-in-out infinite alternate;
}

@keyframes flOuter {
    0% {
        transform: scale(.97, 1.02) skewX(-2.5deg);
    }

    50% {
        transform: scale(1.04, .98) skewX(2deg);
    }

    100% {
        transform: scale(1, 1.04) skewX(-1deg);
    }
}

@keyframes flMid {
    0% {
        transform: scale(.95, 1.04) skewX(3deg);
    }

    100% {
        transform: scale(1.05, .96) skewX(-3deg);
    }
}

@keyframes flCore {
    0% {
        transform: scale(1, .92);
        opacity: .95;
    }

    100% {
        transform: scale(1.05, 1.06);
        opacity: 1;
    }
}

@keyframes flBase {
    0% {
        opacity: .6;
        transform: scale(.85, 1);
    }

    100% {
        opacity: .95;
        transform: scale(1.1, .9);
    }
}

/* Wick */
.ca-wick {
    width: 2.5px;
    height: 14px;
    background: linear-gradient(180deg, #1a0e04 0%, #3a2812 60%, #5a3a18 100%);
    border-radius: 1px;
    margin-bottom: -2px;
    box-shadow: 0 0 4px rgba(0, 0, 0, .6);
    z-index: 3;
}

/* Wax body — ivory taper */
.ca-wax {
    position: relative;
    width: 30px;
    height: 140px;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, .18) 0%,
            transparent 18%,
            rgba(255, 255, 255, .25) 38%,
            rgba(255, 250, 235, 1) 52%,
            rgba(255, 255, 255, .22) 66%,
            transparent 82%,
            rgba(0, 0, 0, .22) 100%),
        linear-gradient(180deg, #fffaee 0%, #f4e9c8 45%, #e3d4a4 80%, #b9a672 100%);
    border-radius: 6px 6px 2px 2px;
    box-shadow:
        inset 0 4px 6px rgba(255, 255, 255, .55),
        inset 0 -8px 14px rgba(120, 80, 30, .32),
        0 8px 20px rgba(255, 160, 60, .15);
}

.ca-wax::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    width: 18px;
    height: 6px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 0%, #1a1208 0%, #3a2812 60%, transparent 100%);
    border-radius: 50%;
    opacity: .55;
}

.ca-wax-shine {
    position: absolute;
    top: 6%;
    left: 30%;
    width: 3px;
    height: 75%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .05));
    border-radius: 2px;
    filter: blur(.5px);
    opacity: .85;
}

.ca-wax-drip {
    position: absolute;
    top: -2px;
    width: 5px;
    background: linear-gradient(180deg, #fffaee, #e8d8a8);
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    box-shadow: inset -1px 0 2px rgba(120, 80, 30, .35);
    opacity: .92;
}

.ca-wax-drip-l {
    left: 1px;
    height: 22px;
    transform: rotate(-3deg);
}

.ca-wax-drip-r {
    right: 2px;
    height: 14px;
    transform: rotate(2deg);
    top: 0;
}

/* Brass holder */
.ca-holder {
    position: relative;
    margin-top: -2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .7));
}

.ca-holder-cup {
    width: 34px;
    height: 8px;
    background: linear-gradient(180deg, #f0d690 0%, #c9a76b 30%, #8a6a30 70%, #4a3618 100%);
    border-radius: 2px 2px 8px 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 235, 180, .7),
        inset 0 -2px 4px rgba(0, 0, 0, .45);
}

.ca-holder-stem {
    width: 6px;
    height: 14px;
    background: linear-gradient(180deg, #d4ae6e, #8a6a30 70%, #5a4220);
    box-shadow: inset -1px 0 2px rgba(0, 0, 0, .4), inset 1px 0 1px rgba(255, 235, 180, .4);
}

.ca-holder-knob {
    width: 14px;
    height: 8px;
    background: linear-gradient(180deg, #e8c684 0%, #b58a4a 50%, #6b4f24 100%);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 235, 180, .7), 0 1px 2px rgba(0, 0, 0, .5);
    margin-top: -2px;
}

.ca-holder-base {
    width: 46px;
    height: 7px;
    background: linear-gradient(180deg, #e8c684 0%, #c9a76b 25%, #8a6a30 65%, #3a2812 100%);
    border-radius: 3px 3px 50% 50% / 3px 3px 100% 100%;
    box-shadow:
        inset 0 1px 0 rgba(255, 235, 180, .6),
        inset 0 -2px 4px rgba(0, 0, 0, .6),
        0 4px 10px rgba(0, 0, 0, .55);
}

@media (max-width:420px) {
    .candle-altar {
        height: 260px;
    }

    .ca-wax {
        height: 118px;
    }

    .ca-flame {
        width: 46px;
        height: 80px;
    }
}

.candle-input {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 14px;
    background: rgba(10, 8, 4, .55);
    border: 1px solid rgba(212, 180, 122, .18);
    color: var(--ivory);
    font-family: var(--body);
    font-size: 15px;
    font-style: italic;
    text-align: center;
    transition: border-color .3s;
}

.candle-input:focus {
    outline: none;
    border-color: var(--gold);
}

.candle-input::placeholder {
    color: rgba(242, 235, 218, .35);
}

.candle-btn {
    width: 100%;
    padding: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(212, 180, 122, .16), rgba(58, 40, 18, .42));
    border: 1px solid var(--hairline-strong);
    color: var(--gold-lt);
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    transition: all .24s cubic-bezier(.2, 0, .2, 1);
    margin-bottom: 22px;
}

.candle-btn:hover {
    background: linear-gradient(180deg, rgba(212, 180, 122, .28), rgba(58, 40, 18, .55));
    border-color: var(--gold);
    color: #fff;
}

.candle-btn[disabled] {
    cursor: default;
    opacity: .55;
    background: rgba(10, 8, 4, .4);
}

.cb-icon {
    font-size: 14px;
}

.candle-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 18px 14px;
    background: rgba(10, 8, 4, .45);
    border: 1px solid rgba(212, 180, 122, .14);
    margin-bottom: 18px;
}

.cs-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cs-num {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(22px, 4.5vw, 30px);
    color: var(--gold-lt);
    letter-spacing: .4px;
    transition: transform .24s cubic-bezier(.2, 0, .2, 1);
}

.cs-num.bump {
    transform: scale(1.18);
}

.cs-lbl {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(242, 235, 218, .6);
}

.cs-sep {
    width: 1px;
    height: 38px;
    background: linear-gradient(180deg, transparent, rgba(212, 180, 122, .4), transparent);
}

.candle-msg {
    font-family: var(--body);
    font-style: italic;
    font-weight: 300;
    font-size: 14px;
    color: var(--ivory-d);
    opacity: 0;
    transition: opacity .6s ease;
    min-height: 1.6em;
}

.candle-msg.show {
    opacity: 1;
}

.candle-wall {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    min-height: 14px;
}

.cw-flame {
    width: 6px;
    height: 10px;
    background: radial-gradient(ellipse at 50% 70%,
            #fff7d6 0%, #ffc870 35%, #ff8a2a 70%, transparent 100%);
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    opacity: 0;
    transform: scale(0);
    animation: cwIn .5s ease forwards, cwFlicker 1.6s ease-in-out infinite alternate .5s;
    filter: drop-shadow(0 0 4px rgba(255, 180, 80, .7));
}

@keyframes cwIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cwFlicker {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(.92) translateY(-1px);
    }
}

/* ================================================================
   LANGUAGE TOGGLE — envelope theme
   ================================================================ */
.lang-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 8500;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid rgba(212, 180, 122, 0.35);
    cursor: pointer;
    transition: opacity 0.3s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.lang-flag {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 30px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: rgba(242, 235, 218, 0.35);
    border-radius: 50px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
    user-select: none;
}

/* Active EN state */
.lang-flag.lang-en {
    color: #4a3820;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lang-flag.lang-it {
    color: rgba(242, 235, 218, 0.35);
    text-shadow: none;
}

/* Active IT state */
.lang-toggle.lang-it .lang-flag.lang-en {
    color: rgba(242, 235, 218, 0.35);
    text-shadow: none;
}

.lang-toggle.lang-it .lang-flag.lang-it {
    color: #4a3820;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Cream texture slider — only behind active label */
.lang-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 38px;
    height: 30px;
    border-radius: 50px;
    background: linear-gradient(145deg, #f4ead3 0%, #e8dcbe 55%, #d9c9a3 100%);
    border: 1px solid rgba(120, 85, 45, 0.25);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(100, 70, 35, 0.1);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.lang-toggle.lang-it .lang-slider {
    transform: translateX(38px);
}

/* Hidden state — fades out after envelope, fades in on closing section */
.lang-toggle.lang-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* ================================================================
   MOBILE OPTIMIZATIONS — iOS & Android
   ================================================================ */

/* iOS safe area + viewport height fixes */
@supports (height: 100dvh) {
    .sec {
        min-height: 100dvh;
    }

    #gate {
        height: 100dvh;
    }
}

/* Tablet */
@media (max-width:768px) {
    .candle-stage {
        width: 160px;
        height: 300px;
    }

    .cs-wax {
        width: 42px;
        height: 130px;
    }

    .cs-flame-wrap {
        width: 36px;
        height: 74px;
    }

    .cs-holder-cup {
        width: 56px;
        height: 12px;
    }

    .cs-holder-base {
        width: 70px;
        height: 8px;
    }

    .cs-holder-lip {
        width: 50px;
    }

    .candle-box,
    .rsvp-form {
        width: 94%;
    }

    .lang-toggle {
        top: 14px;
        right: 14px;
    }
}

/* Phone */
@media (max-width:480px) {
    .sec {
        padding: 80px 16px;
    }

    .env-card {
        padding: 32px 20px;
    }

    .hero-inner {
        padding: 0 8px;
    }

    .candle-stage {
        width: 140px;
        height: 260px;
    }

    .cs-wax {
        width: 36px;
        height: 110px;
    }

    .cs-flame-wrap {
        width: 30px;
        height: 62px;
    }

    .cs-wick {
        height: 14px;
    }

    .cs-holder-cup {
        width: 48px;
        height: 10px;
    }

    .cs-holder-base {
        width: 60px;
        height: 7px;
    }

    .cs-holder-lip {
        width: 42px;
        height: 3px;
    }

    .cs-holder-stem {
        width: 10px;
        height: 10px;
    }

    .candle-sec-sub {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .candle-sec-action {
        gap: 12px;
    }

    .candle-sec-input {
        font-size: 15px;
        padding: 12px 14px;
    }

    .candle-sec-btn {
        padding: 12px 28px;
        font-size: 10px;
    }

    .candle-sec-stats {
        gap: 14px;
    }

    .css-lbl {
        font-size: 8px;
        letter-spacing: 1.4px;
    }

    .rsvp-form {
        padding: 28px 18px;
    }

    .close-actions {
        gap: 10px;
    }

    .act-btn {
        width: 88%;
        font-size: 10px;
        padding: 13px 16px;
    }

    .cd-unit {
        min-width: 42px;
        padding: 10px 6px;
    }

    .sec-footer {
        padding: 48px 16px 32px;
    }
}

/* Extra small phones */
@media (max-width:360px) {
    .sec {
        padding: 70px 12px;
    }

    .candle-box,
    .rsvp-form {
        padding: 24px 14px;
    }

    .candle-stage {
        width: 120px;
        height: 230px;
    }

    .cs-wax {
        width: 32px;
        height: 95px;
    }

    .cs-flame-wrap {
        width: 26px;
        height: 54px;
    }
}

/* Touch device optimizations */
@media (hover:none) and (pointer:coarse) {

    .candle-sec-btn,
    .act-btn,
    .rsvp-submit,
    .lang-toggle {
        min-height: 44px;
    }

    .candle-sec-input,
    .rsvp-field input,
    .rsvp-field textarea {
        font-size: 16px;
    }

    .candle-sec-btn:hover,
    .act-btn:hover {
        transform: none;
    }
}

/* iOS notch / dynamic island safe areas */
@supports (padding-top: env(safe-area-inset-top)) {
    .lang-toggle {
        top: calc(env(safe-area-inset-top) + 10px);
        right: calc(env(safe-area-inset-right) + 14px);
    }

    .sec-footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    #gate {
        padding-top: env(safe-area-inset-top);
    }
}

/* Landscape phone */
@media (max-height:500px) and (orientation:landscape) {
    .sec {
        min-height: auto;
        padding: 40px 24px;
    }

    .candle-stage {
        width: 120px;
        height: 200px;
    }

    .cs-wax {
        width: 28px;
        height: 80px;
    }

    .cs-flame-wrap {
        width: 22px;
        height: 46px;
    }

    .candle-box,
    .rsvp-form {
        max-width: 480px;
    }
}

/* ================================================================
   PERFORMANCE — disable heavy effects on weak devices
   ================================================================ */
@media (prefers-reduced-motion:reduce) {

    .pbg-layer,
    .sec-bg-img,
    .mm-img.active,
    .cps-img {
        animation: none !important;
    }

    .reveal-el {
        transition: opacity .4s;
        transform: none;
    }

    .reveal-el.visible {
        transform: none;
    }

    #dust,
    #rays {
        display: none;
    }

    .cw-flame,
    .ca-stardust,
    .ca-rays,
    .fl-outer,
    .fl-mid,
    .fl-core,
    .fl-base {
        animation: none !important;
    }

    .candle-altar.lit .ca-halo {
        animation: none;
    }

    .ember {
        animation-duration: 1.2s;
    }

    .cs-flame-outer,
    .cs-flame-mid,
    .cs-flame-inner,
    .cs-flame-core {
        animation: none !important;
    }

    .cs-smoke-wisp {
        animation: none !important;
    }
}

/* ================================================================
   MAP SECTION
   ================================================================ */
.sec-map {
    text-align: center;
}

.map-box {
    position: relative;
    width: 92%;
    max-width: 560px;
    margin: 0 auto 32px auto;
    padding: clamp(36px, 6vw, 52px) clamp(26px, 5vw, 44px);
    background: linear-gradient(180deg, rgba(20, 14, 8, .42) 0%, rgba(14, 10, 6, .55) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.map-box::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--hairline);
    border-radius: 4px;
    pointer-events: none;
}

.map-venue {
    font-family: var(--serif);
    font-size: clamp(22px, 4vw, 28px);
    color: var(--gold-lt);
    letter-spacing: 1px;
}

.map-address {
    font-family: var(--body);
    font-size: clamp(16px, 2.5vw, 18px);
    color: var(--ivory-d);
    font-style: italic;
    margin-bottom: 8px;
}

.map-line {
    width: 40px;
    height: 1px;
    background: var(--hairline-strong);
    margin: 8px 0 24px;
}

.map-container {
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid var(--hairline-strong);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.map-action {
    text-align: center;
    margin-top: 16px;
    position: relative;
    z-index: 2;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 32px;
    background: rgba(20, 14, 8, .6);
    border: 1px solid var(--hairline-strong);
    color: var(--gold);
    font-family: var(--sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: all .4s var(--ease);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 180, 122, .15);
    color: var(--gold-lt);
}

.map-btn-orn {
    font-size: 14px;
    color: var(--gold-dk);
    transition: color .4s var(--ease);
}

.map-btn:hover .map-btn-orn {
    color: var(--gold);
}

@media (max-width: 600px) {
    .map-container {
        aspect-ratio: 4/3;
    }
}

/* ================================================================
   SCROLL INDICATOR
   ================================================================ */
.scroll-indicator-wrap {
    margin-top: clamp(32px, 6vw, 48px);
    display: flex;
    justify-content: center;
    z-index: 10;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-txt {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.7;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    color: var(--gold-lt);
    animation: scrollBounce 2s infinite ease-in-out;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

/* ================================================================
   PERFORMANCE OVERRIDES (MOBILE)
   ================================================================ */
@media (max-width: 768px) {
    * {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Slightly increase container darkness on mobile to compensate for removed blur */
    .hero-inner, .d-card, .cd-wrap, .candle-box, .map-box, .rsvp-form, .ded-card {
        background: rgba(10, 8, 4, 0.75) !important;
    }
    
    .env-card {
        background: rgba(20, 14, 8, 0.85) !important;
    }
}