/* Light a Candle — candles.html
   Builds on admissions.css (hero, form, buttons, cards). */

.cn-hero {
    background:
        radial-gradient(50% 90% at 50% 100%, rgba(255, 170, 70, .28) 0%, transparent 70%),
        linear-gradient(165deg, #121b31 0%, #1a2744 55%, #3b2333 100%);
    text-align: center;
}
.cn-hero .breadcrumb { justify-content: center; }
.cn-hero .adm-eyebrow { font-style: italic; text-transform: none; letter-spacing: .02em; font-size: 1rem; }
.cn-hero .adm-lead { margin-left: auto; margin-right: auto; max-width: 700px; }

.cn-stats {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    margin: 2rem 0 0;
    padding: 0;
}
.cn-stats li { display: flex; flex-direction: column; align-items: center; }
.cn-stats strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.6rem; line-height: 1; color: #f0d58a; }
.cn-stats span { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #d7deea; margin-top: .3rem; }

/* ---------- the votive stand ---------- */
.cn-stand {
    background:
        radial-gradient(70% 60% at 50% 0%, rgba(255, 176, 80, .16) 0%, transparent 70%),
        #0f1628;
    color: #fffdf7;
    padding: 4rem 0 4.5rem;
}
.cn-stand-head { text-align: center; margin-bottom: 2.5rem; }
.cn-stand-head h2 { color: #fffdf7; margin: 0 0 .4rem; }
.cn-stand-head p { color: #c9d1e0; margin: 0; }
.cn-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2.5rem 1.5rem;
    justify-items: center;
}
.cn-wall-empty { text-align: center; color: #c9d1e0; max-width: 520px; margin: 2.5rem auto 0; line-height: 1.6; }

.cn-votive { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 170px; }
.cn-glass {
    --glass: #a3242f;
    --glass-hi: #e0525c;
    position: relative;
    width: 74px;
    height: 104px;
    padding: 0;
    border: 0;
    border-radius: 10px 10px 14px 14px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .22) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .25) 88%),
        linear-gradient(180deg, var(--glass-hi), var(--glass));
    box-shadow:
        inset 0 -6px 12px rgba(0, 0, 0, .35),
        0 0 calc(40px * var(--left, 1)) rgba(255, 150, 60, calc(.55 * var(--left, 1))),
        0 14px 24px rgba(0, 0, 0, .45);
    cursor: pointer;
    overflow: visible;
    transition: transform .2s;
}
.cn-glass:hover { transform: translateY(-3px); }
.cn-glass:focus-visible { outline: 3px solid #f0d58a; outline-offset: 6px; }
.cn-memory .cn-glass { --glass: #8a6520; --glass-hi: #e3b94e; }
.cn-school .cn-glass { --glass: #e9dfc6; --glass-hi: #fffaf0; width: 84px; height: 118px; }

/* wax level inside the glass */
.cn-wax {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: calc(70% * var(--left, 1));
    border-radius: 4px 4px 8px 8px;
    background: linear-gradient(180deg, rgba(255, 250, 235, .85), rgba(255, 238, 210, .55));
}
/* flame sits on top of the wax */
.cn-flame {
    position: absolute;
    left: 50%;
    bottom: calc(8px + 70% * var(--left, 1) - 2px);
    width: 16px;
    height: 30px;
    margin-left: -8px;
    border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    background: radial-gradient(ellipse at 50% 80%, #fff 0 18%, #ffe28a 35%, #ff9d2e 65%, rgba(255, 90, 20, 0) 80%);
    filter: drop-shadow(0 0 10px rgba(255, 170, 60, .9));
    transform-origin: 50% 90%;
    animation: cn-flicker 2.8s ease-in-out infinite;
}
.cn-flame span {
    position: absolute;
    left: 50%;
    bottom: -3px;
    width: 2px;
    height: 6px;
    margin-left: -1px;
    background: #3a2a1a;
    border-radius: 1px;
}
.cn-votive:nth-child(3n) .cn-flame { animation-duration: 3.3s; animation-delay: -.7s; }
.cn-votive:nth-child(3n+1) .cn-flame { animation-duration: 2.4s; animation-delay: -1.4s; }
.cn-out .cn-glass { box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .35), 0 14px 24px rgba(0, 0, 0, .45); filter: saturate(.45) brightness(.75); }
.cn-out .cn-flame { display: none; }

@keyframes cn-flicker {
    0%, 100% { transform: scale(1, 1) rotate(-1deg); }
    20% { transform: scale(.96, 1.06) rotate(1.5deg); }
    45% { transform: scale(1.03, .95) rotate(-2deg); }
    70% { transform: scale(.98, 1.04) rotate(1deg); }
}

.cn-votive figcaption { margin-top: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.cn-votive figcaption strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; line-height: 1.15; color: #fffdf7; }
.cn-votive .cn-why { font-size: .85rem; color: #f0d58a; }
.cn-votive q { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1.02rem; color: #dfe5ef; line-height: 1.35; margin-top: .25rem; }
.cn-votive small { font-size: .76rem; color: #9fabc2; margin-top: .25rem; }

/* ---------- form + side ---------- */
.cn-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.cn-form h2 { margin-top: 0; color: var(--adm-navy); }
.cn-hint { margin: .35rem 0 0; font-size: .88rem; color: var(--adm-muted); }
.cn-count { text-align: right; margin: .3rem 0 0; font-size: .85rem; color: var(--adm-muted); }
.cn-reasons label > span i { margin-right: .3rem; color: var(--adm-wine); }
.cn-reasons input:checked + span i { color: inherit; }
.cn-form .adm-submit { margin-top: 1.25rem; font: inherit; font-weight: 700; cursor: pointer; }

.cn-page .adm-form label.cn-check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; line-height: 1.5; margin-top: 1.25rem; }
.cn-check input[type="checkbox"] { opacity: 1; position: static; width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; accent-color: var(--adm-navy); }
.cn-check input[type="checkbox"]:focus-visible { outline: 3px solid #d2a84f; outline-offset: 2px; }

.cn-prayer { margin: 1rem 0 1.25rem; padding: 1.1rem 1.3rem; background: #fffdf7; border-left: 4px solid #d2a84f; border-radius: 8px; }
.cn-prayer-title { margin: 0 0 .4rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--adm-wine); }
.cn-prayer blockquote { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.2rem; line-height: 1.5; color: var(--adm-ink); }
.cn-prayer blockquote p { margin: 0 0 .35rem; }

.cn-side { display: grid; gap: 1rem; }
.cn-safe { align-items: flex-start; border-color: #e7cf8f; background: #fffaeb; }
.cn-safe p + p { margin-top: .35rem; }
.cn-card h3, .cn-mine h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--adm-navy); }
.cn-card h3 i, .cn-mine h3 i { color: var(--adm-gold); margin-right: .35rem; }
.cn-card p { margin: 0; line-height: 1.6; color: var(--adm-muted); }
.cn-card a { color: var(--adm-wine); font-weight: 600; }

.cn-mine { background: #121b31; color: #fffdf7; border-radius: 16px; padding: 1.4rem 1.3rem 1.2rem; }
.cn-mine h3 { color: #fffdf7; }
.cn-mine > p { margin: 0 0 1.2rem; color: #c9d1e0; font-size: .93rem; line-height: 1.5; }
.cn-mine-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.5rem 1rem; }
.cn-mine-list li { display: flex; flex-direction: column; align-items: center; }
.cn-mine .cn-glass { width: 58px; height: 82px; }
.cn-mine .cn-votive figcaption strong { font-size: 1.15rem; }
.cn-mine-actions { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; justify-content: center; }
.cn-mini { font: inherit; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(240, 213, 138, .6); background: transparent; color: #f0d58a; cursor: pointer; }
.cn-mini-quiet { border-color: rgba(255, 253, 247, .25); color: #c9d1e0; }
.cn-mini:focus-visible { outline: 3px solid #f0d58a; outline-offset: 2px; }

/* ---------- prayer dialog ---------- */
.cn-dialog {
    margin: auto;
    border: 0;
    border-radius: 20px;
    padding: 2.4rem 2rem 2rem;
    max-width: min(34rem, calc(100vw - 2rem));
    background: #121b31;
    color: #fffdf7;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.cn-dialog::backdrop { background: rgba(8, 12, 22, .72); }
.cn-dialog-glow { position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 0%, rgba(255, 170, 70, .3), transparent 70%); pointer-events: none; }
.cn-dialog h2 { position: relative; color: #f0d58a; margin: 0 0 1rem; font-size: 1.7rem; }
.cn-dialog blockquote { position: relative; margin: 0 0 1.6rem; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; line-height: 1.55; }
.cn-dialog blockquote p { margin: 0 0 .5rem; }
.cn-dialog .adm-btn { position: relative; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 900px) {
    .cn-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .cn-wall { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cn-flame { animation: none; }
    .cn-glass { transition: none; }
}
