@font-face { font-family: "Imperial Script"; src: url("../fonts/candle/imperial-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Castoro Titling"; src: url("../fonts/candle/castorotitling-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Castoro"; src: url("../fonts/candle/castoro-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Castoro"; src: url("../fonts/candle/castoro-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* CANDLELIGHT (theme key "candle"): an enchanted night garden. A ceiling of white roses hangs down on long strands,
   floating candles (pure CSS) drift among them, fairy lights glow; the names glow like candlelight. Intro: one candle
   in the dark; tap and it lights, every candle around it lights one by one and the roses come down from above.
   Sections are night-glass cards hung with short rose strands. Roses are Mille Roses' sprites, tinted by --rose-fx.
   Type: Imperial Script (names) · Castoro Titling (titles) · Castoro (reading). */
:root {
  --bg: #0d1424; --night: #0d1424; --night-2: #1b2740; --card: rgba(18, 27, 48, .86); --paper: #17223b; --glow-c: #ffcf7a;
  --ink: #f5ecdc; --muted: #bfb5a2; --line: rgba(245, 236, 220, .15); --accent: #e8c27a; --accent-ink: #1d1406; --rose-fx: brightness(.92);
  --script: "Imperial Script", "Pinyon Script", cursive; --display: "Castoro Titling", Georgia, serif; --text: "Castoro", Georgia, serif;
  --radius: 12px; --maxw: 520px;
}
body { color: var(--ink); font-family: var(--text); background: var(--night) radial-gradient(120% 70% at 50% 0%, var(--night-2), var(--night) 70%) fixed; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background: radial-gradient(3px 3px at 12% 18%, #fff8, transparent), radial-gradient(2px 2px at 78% 12%, #fff6, transparent), radial-gradient(2px 2px at 40% 34%, #fff5, transparent),
    radial-gradient(40px 40px at 20% 60%, #ffcf7a22, transparent), radial-gradient(60px 60px at 85% 45%, #ffcf7a1c, transparent), radial-gradient(50px 50px at 60% 85%, #ffcf7a18, transparent); }
.mr-s { position: absolute; display: block; left: calc(var(--u) * var(--x, 0) + var(--xp, 0%)); top: calc(var(--u) * var(--y, 0) + var(--yp, 0%)); width: calc(var(--u) * var(--w, .2)); aspect-ratio: 1;
  background: center / contain no-repeat; transform: translate(-50%, -50%) rotate(calc(var(--r, 0) * 1deg)); pointer-events: none; }
.mr-s.r1 { background-image: url("../img/roses/rose-1.webp"); } .mr-s.r2 { background-image: url("../img/roses/rose-2.webp"); } .mr-s.r3 { background-image: url("../img/roses/rose-3.webp"); } .mr-s.r4 { background-image: url("../img/roses/rose-4.webp"); }
.mr-s.r5 { background-image: url("../img/roses/rose-5.webp"); } .mr-s.r6 { background-image: url("../img/roses/rose-6.webp"); } .mr-s.r7 { background-image: url("../img/roses/rose-7.webp"); } .mr-s.r8 { background-image: url("../img/roses/rose-8.webp"); }
.mr-s.l1 { background-image: url("../img/roses/leaves-1.webp"); } .mr-s.l2 { background-image: url("../img/roses/leaves-2.webp"); } .mr-s.g1 { background-image: url("../img/roses/gyp-1.webp"); } .mr-s.g2 { background-image: url("../img/roses/gyp-2.webp"); }
.mr-s:not(.is-f) { filter: var(--rose-fx); }
.mr-s.is-f { filter: brightness(.7); }

/* ---------- candles (pure CSS) ---------- */
.cn-c { position: absolute; width: 11px; height: var(--h, 40px); border-radius: 2px 2px 3px 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, #d9cdb8, #fffaf0 45%, #f1e8d6 60%, #b9ab92); box-shadow: 0 0 18px rgba(255, 207, 122, .35); animation: cn-bob var(--b, 4s) ease-in-out infinite alternate; }
.cn-c::before { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 5px; background: #3a2a10; transform: translateX(-50%); }
.cn-c i { position: absolute; left: 50%; bottom: 100%; width: 9px; height: 19px; margin-bottom: 3px; transform: translateX(-50%); border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 75%, #fff 0 18%, #ffe9a6 34%, #ffb347 62%, rgba(255, 140, 40, 0) 72%); transform-origin: 50% 100%; animation: cn-flick .16s ease-in-out infinite alternate;
  transition: opacity .5s ease calc(var(--i, 0) * 140ms + .3s), transform .5s ease calc(var(--i, 0) * 140ms + .3s); }
.cn-c i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 140, .42), rgba(255, 190, 90, .12) 40%, transparent 70%); }
@keyframes cn-flick { from { transform: translateX(-50%) scale(1, 1) skewX(-2deg); } to { transform: translateX(-50%) scale(.92, 1.08) skewX(2deg); } }
@keyframes cn-bob { from { translate: 0 0; } to { translate: 0 -10px; } }
.cn-c.is-unlit { box-shadow: none; } .cn-c.is-unlit i { opacity: 0; transform: translateX(-50%) scale(.3); }
.cn-c.is-pillar { width: 30px; border-radius: 4px 4px 2px 2px; top: auto; bottom: 0; animation: none; }
.cn-c.is-pillar i { width: 11px; height: 22px; }
.cn-float { position: absolute; inset: 0; pointer-events: none; }

/* ---------- rose ceiling and strands ---------- */
.cn-canopy { position: absolute; left: 0; right: 0; top: 0; height: 0; --u: max(100vw, 360px); pointer-events: none; z-index: 2; }
.cn-strand { position: absolute; inset: 0; transition: transform 1.6s cubic-bezier(.3, .8, .3, 1) calc(var(--k) * 90ms + .5s); }
.cn-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 45% at 50% 40%, rgba(255, 196, 110, .22), transparent 70%); }
.cn-lights { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cn-lights > span { position: absolute; inset: 0; }
.cn-lights i { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--top) + var(--y) * 1px); width: 4px; height: 4px; border-radius: 50%; background: #fff3cf; box-shadow: 0 0 6px 2px rgba(255, 220, 150, .7); animation: cn-tw var(--d) ease-in-out infinite alternate; }
@keyframes cn-tw { to { opacity: .35; } }

/* ---------- intro ---------- */
.cn-intro { --intro-ms: 3000; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--night) radial-gradient(120% 70% at 50% 0%, var(--night-2), var(--night) 70%);
  transition: opacity .7s ease 2.3s, visibility 0s linear 3s; }
.cn-intro .cn-glow { opacity: 0; transition: opacity 1.4s ease .3s; }
.cn-intro .cn-strand { transform: translateY(calc(var(--u) * -1.1)); }
.cn-intro .cn-canopy > .mr-s { opacity: 0; transition: opacity 1.2s ease .4s; }
.cn-start { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 90px 20px 10px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.cn-start .cn-c { position: absolute; left: 50%; top: 18px; --h: 62px; width: 15px; animation: none; }
.cn-for { position: absolute; top: -30px; left: 0; right: 0; font: italic 400 .95rem var(--text); color: var(--muted); } .cn-for b { font-style: normal; font-weight: 400; color: var(--ink); }
.cn-mono { font: 400 clamp(3.6rem, 18vw, 4.8rem)/1.3 var(--script); color: var(--accent); padding: 0 .2em; text-shadow: 0 0 18px rgba(255, 200, 120, .35); }
.cn-mono i { font-style: normal; font-size: .62em; }
.cn-tap { font: 400 .7rem var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); animation: cn-pulse 2.4s ease-in-out infinite; }
@keyframes cn-pulse { 50% { opacity: .4; } }
.is-opening .cn-c.is-unlit i { opacity: 1; transform: translateX(-50%) scale(1); }
.is-opening .cn-start .cn-c i { transition-delay: 0s; }
.is-opening .cn-intro .cn-glow { opacity: 1; }
.is-opening .cn-intro .cn-strand { transform: none; }
.is-opening .cn-intro .cn-canopy > .mr-s { opacity: 1; }
.is-opening .cn-tap, .is-opening .cn-for { opacity: 0; transition: opacity .3s; animation: none; }
.is-opening .cn-mono { opacity: 0; transition: opacity .8s ease 1.4s; }

/* ---------- cover ---------- */
.t-candle .cn-hero { position: relative; display: block; place-items: normal; min-height: 100svh; padding: 0 0 150px; text-align: center; overflow: hidden; }
.cn-hero .cn-float { bottom: 40%; }
.cn-copy { position: relative; z-index: 3; max-width: 30rem; margin: 0 auto; padding: clamp(250px, 66vw, 340px) 22px 0; }
.cn-hero.has-media .cn-copy { padding-top: clamp(150px, 40vw, 220px); }
.cn-hero.no-media .cn-copy { padding-top: clamp(330px, 92vw, 460px); }
.cn-photo { position: relative; width: min(64vw, 260px); margin: 0 auto 22px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px 12px 12px; background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px rgba(13, 20, 36, .6), 0 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 60px rgba(255, 196, 110, .35); }
.cn-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cn-photo .ph-slot { border-radius: inherit; }
.cn-hero .hero-media-tag { bottom: 14%; font-size: .56rem; white-space: normal; width: 74%; max-width: none; text-align: center; line-height: 1.3; }
.cn-hero .hero-guest { margin: 0 0 6px; font: italic 400 1.02rem var(--text); color: var(--muted); } .cn-hero .hero-guest b { font-style: normal; font-weight: 400; color: var(--ink); }
.cn-hero .hero-k { margin: 0; font: 400 .7rem/1.7 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.t-candle .hero-t { margin: 8px 0 4px; font: 400 clamp(3.4rem, 16vw, 4.8rem)/1.25 var(--script); letter-spacing: 0; color: var(--accent); padding: 0 .15em;
  text-shadow: 0 0 22px rgba(255, 196, 110, .45), 0 0 2px rgba(255, 230, 180, .6); }
.t-candle .hero-t span { display: block; font-size: calc(1em * var(--fit, 1)); }
.t-candle .hero-t i { display: block; margin: -.15em 0; font: 400 .4em/1.4 var(--display); color: var(--ink); text-shadow: none; }
.cn-hero .hero-line { margin: 8px auto 0; max-width: 18em; font: italic 400 1.04rem/1.5 var(--text); color: var(--muted); }
.cn-when { display: flex; flex-direction: column; gap: 4px; margin: 18px 0 0; }
.cn-when span:first-child { font: 400 .76rem/1.6 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.cn-when span:last-child { font: italic 400 1rem var(--text); color: var(--muted); }
.cn-hero .hero-cta, .t-candle .rs-btn { display: inline-block; margin-top: 22px; padding: 14px 40px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); font: 400 .76rem var(--display); letter-spacing: .22em; text-transform: uppercase;
  background: linear-gradient(170deg, #f7dc9e, var(--accent) 50%, #c79a4a); box-shadow: 0 0 26px rgba(255, 196, 110, .45); }
.cn-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 2; --u: max(100vw, 360px); pointer-events: none; }
.cn-floor .cn-c.is-pillar { bottom: 34px; }

/* ---------- sections: night-glass cards under short rose strands ---------- */
.t-candle .s:not(.s-hero) { position: relative; width: calc(100% - 28px); max-width: var(--maxw); margin: 0 auto 70px; padding: 84px 24px 52px; border-radius: 18px;
  background: radial-gradient(90% 40% at 50% 0%, rgba(255, 196, 110, .12), transparent 70%), var(--card); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.t-candle .s:not(.s-hero)::before { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: -30px; height: 130px; pointer-events: none; filter: var(--rose-fx);
  background: url("../img/roses/rose-2.webp") 8% 0 / 74px no-repeat, url("../img/roses/rose-7.webp") 10% 52px / 54px no-repeat, url("../img/roses/rose-5.webp") 28% 0 / 80px no-repeat,
    url("../img/roses/rose-8.webp") 50% 0 / 76px no-repeat, url("../img/roses/rose-1.webp") 50% 50px / 58px no-repeat, url("../img/roses/rose-6.webp") 51% 92px / 42px no-repeat,
    url("../img/roses/rose-3.webp") 72% 0 / 80px no-repeat, url("../img/roses/rose-4.webp") 92% 0 / 74px no-repeat, url("../img/roses/rose-7.webp") 90% 54px / 52px no-repeat; }
.t-candle .s:not(.s-hero):nth-of-type(even)::before {
  background: url("../img/roses/rose-6.webp") 4% 0 / 78px no-repeat, url("../img/roses/rose-3.webp") 22% 0 / 74px no-repeat, url("../img/roses/rose-8.webp") 22% 54px / 52px no-repeat,
    url("../img/roses/rose-1.webp") 40% 0 / 70px no-repeat, url("../img/roses/rose-2.webp") 62% 0 / 76px no-repeat, url("../img/roses/rose-5.webp") 80% 0 / 72px no-repeat,
    url("../img/roses/rose-4.webp") 79% 52px / 56px no-repeat, url("../img/roses/rose-7.webp") 80% 96px / 40px no-repeat, url("../img/roses/rose-8.webp") 97% 0 / 74px no-repeat; }
.t-candle .s-hero + .s { margin-top: 40px; }
.t-candle .sh-k { font: 400 2.5rem/1.3 var(--script); letter-spacing: 0; text-transform: none; color: var(--accent); text-shadow: 0 0 14px rgba(255, 196, 110, .3); }
.t-candle .sh-t { margin-top: 0; font: 400 clamp(1.1rem, 5vw, 1.35rem)/1.4 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.t-candle .sh::after { content: ""; display: block; width: 6px; height: 14px; margin: 14px auto 0; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 75%, #fff 0 18%, #ffe9a6 34%, #ffb347 70%); box-shadow: 0 0 14px 4px rgba(255, 196, 110, .45); }
.t-candle .cd-u b { font: 400 2.3rem var(--display); color: var(--ink); }
.t-candle .cd-u span { letter-spacing: .14em; }
.t-candle .tl-time { font-style: italic; color: var(--accent); }
.t-candle .tl-title { font-weight: 400; }
.t-candle .vn-c, .t-candle .gl-it, .t-candle .gl-c, .t-candle .dr-roles > div, .t-candle .rs-form { border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); background: var(--paper); }
.t-candle .vn-n { font: 400 1.1rem var(--display); }
.t-candle .btn-line { border-radius: 999px; font: 400 .7rem var(--display); letter-spacing: .16em; text-transform: uppercase; border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.t-candle .faq summary { font-weight: 400; }
.t-candle .sw-dot { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent); }

/* gallery: glowing arched windows */
.cn-wins { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.cn-win { margin: 0; text-align: center; }
.cn-wimg { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 10px 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--accent), 0 0 30px rgba(255, 196, 110, .25); }
.cn-wimg .ph-slot { border-radius: inherit; }
.cn-win figcaption { margin-top: 8px; font: 400 1.6rem/1.2 var(--script); color: var(--accent); }

/* closing */
.cn-close { text-align: center; }
.cn-crow { position: relative; height: 150px; margin: 0 -10px; }
.cn-cmono { margin: 0; font: 400 clamp(3.4rem, 17vw, 4.4rem)/1.3 var(--script); color: var(--accent); text-shadow: 0 0 20px rgba(255, 196, 110, .4); }
.cn-cmono i { font-style: normal; font-size: .62em; }
.t-candle .cl-line { margin: 0 auto; max-width: 20em; font: italic 400 clamp(1rem, 4.4vw, 1.15rem)/1.5 var(--text); }
.t-candle .cl-sign { margin: 6px 0 0; font: 400 clamp(2rem, 9vw, 2.6rem)/1.3 var(--script); color: var(--accent); }
.t-candle .cl-tag { font: 400 .74rem var(--display); letter-spacing: .14em; }
.t-candle .inv .s-closing.cn-close, body.is-demo .inv .s-closing.cn-close { padding-bottom: 54px; margin-bottom: 150px; }

@media (prefers-reduced-motion: reduce) { .cn-c, .cn-c i, .cn-lights i, .cn-tap { animation: none; } }
.cn-hero .hero-media-tag { font-size: .62rem; }
