/* ==========================================================================
   Disco - a birthday night under the mirror ball. A ball of tiny mirrors turns above the hero photo and its coloured
   reflections sweep over it (canvas.dc-ball, script.js), and faintly over the whole page (canvas.dc-spots); a touch
   spins it faster. The age lights up in neon (Monoton), the name is lit letter by letter (Pacifico), the portrait sits
   in a turning ring of mirrors, the theme on a dance floor whose squares light up in turn.
   Palette (dark): --inv-primary (names, near white), --inv-accent (the neon), --inv-bg, --inv-text.
   script.js turns the accent's hue both ways for the coloured reflections.
   ========================================================================== */

.disco {
    --dc-neon-font: 'Monoton', var(--inv-font-heading), cursive;
    --dc-glow: color-mix(in srgb, var(--inv-accent) 60%, transparent);
    --dc-line: color-mix(in srgb, var(--inv-primary) 20%, transparent);
    --dc-muted: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --dc-surface: color-mix(in srgb, var(--inv-accent) 8%, var(--inv-bg));
    --dc-c1: var(--inv-accent);
    --dc-c2: color-mix(in srgb, var(--inv-accent) 35%, var(--inv-primary));
    --dc-c3: color-mix(in srgb, var(--inv-accent) 55%, var(--inv-bg));
    --kit-radius: 6px;
    --kit-field-bg: color-mix(in srgb, var(--inv-text) 6%, transparent);
    --kit-field-border: var(--dc-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.disco h1, .disco h2, .disco h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.2; }
:where(.disco) :is(h1, h2, h3) { margin: 0; }
.disco strong { font-weight: 600; }
.disco a { color: var(--inv-primary); }
.dc-kicker { font-size: .74rem; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; color: var(--dc-muted); margin: 0 0 10px; }
.dc-spots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; mix-blend-mode: screen; }
.disco > header, .disco > main, .disco > footer { position: relative; z-index: 1; }

/* ---------- Neon lettering ---------- */
.dc-neon {
    font-family: var(--dc-neon-font); font-weight: 400; color: var(--inv-primary);
    text-shadow: 0 0 4px var(--inv-primary), 0 0 14px var(--inv-accent), 0 0 34px var(--dc-glow), 0 0 70px var(--dc-glow);
}
.dc-word { display: inline-block; white-space: nowrap; }
.dc-letter { display: inline-block; white-space: pre; opacity: .08; }
.dc-hero .dc-letter, .is-visible .dc-letter { animation: dc-on .9s calc(var(--i) * .1s + var(--dc-delay, 0s)) steps(1, end) forwards; }
/* a neon tube switching on: a flicker, then steady */
@keyframes dc-on {
    0% { opacity: .08; }
    20% { opacity: 1; text-shadow: 0 0 18px var(--dc-glow); }
    35% { opacity: .2; }
    55% { opacity: 1; }
    70% { opacity: .45; }
    100% { opacity: 1; }
}
/* a strip of tiny mirrors under each title, catching the light in turn */
.dc-mirrors { display: block; width: 168px; max-width: 60vw; height: 8px; margin: 12px auto 0;
    background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-primary) 70%, transparent) 0 6px, transparent 6px 8px),
                linear-gradient(90deg, transparent, var(--inv-accent), transparent);
    background-blend-mode: multiply;
    -webkit-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    opacity: .35; }
.is-visible .dc-mirrors { animation: dc-glint 3.2s 1s ease-in-out infinite; }
@keyframes dc-glint { 0%, 100% { opacity: .35; filter: none; } 50% { opacity: 1; filter: drop-shadow(0 0 6px var(--dc-glow)); } }

/* ---------- The ball ---------- */
.dc-ball { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.dc-ball--hero { z-index: -1; }
.dc-ball--footer { z-index: -1; }

/* ---------- Navigation ---------- */
.dc-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 18px clamp(16px, 4vw, 44px); display: flex; align-items: center; justify-content: center; }
.dc-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; }
.dc-nav a { text-decoration: none; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dc-muted); padding: 4px 0; }
.dc-nav a:hover, .dc-nav a.is-current { color: var(--inv-primary); text-shadow: 0 0 10px var(--dc-glow); }
.dc-nav .kit-nav-brand { font-family: var(--dc-neon-font); font-size: 1.8rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); text-shadow: 0 0 12px var(--dc-glow); margin-right: auto; }
.dc-nav.is-stuck { padding: 8px clamp(16px, 4vw, 44px); justify-content: flex-end; background: color-mix(in srgb, var(--inv-bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--dc-line); }
.disco .kit-to-top { background: var(--inv-accent); color: var(--inv-bg); }
@media (max-width: 899px) {
    .dc-nav { justify-content: flex-end; padding: 10px 14px; }
    .dc-nav .kit-nav-toggle { margin-left: auto; font-size: 1.5rem; color: var(--inv-primary); }
    .dc-nav .kit-nav-links { display: none; }
    .dc-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 14px; position: absolute; top: 58px; left: 12px; right: 12px; padding: 24px; background: var(--inv-bg); border: 1px solid var(--dc-line); }
}

/* ---------- Hero ---------- */
.dc-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: clamp(150px, 24vh, 230px) 20px 80px; text-align: center; overflow: clip; isolation: isolate; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dc-hero-photo { position: absolute; inset: 0; margin: 0; z-index: -3; }
.dc-hero-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.85) contrast(1.05); }
.dc-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, color-mix(in srgb, var(--inv-bg) 70%, transparent), transparent 35%, transparent 60%, var(--inv-bg)), radial-gradient(ellipse at 50% 60%, transparent 30%, color-mix(in srgb, var(--inv-bg) 75%, transparent) 95%); }
.dc-hero-content { position: relative; z-index: 1; max-width: 900px; }
.dc-hero-content::before { content: ""; position: absolute; inset: -10% -16%; z-index: -1; background: radial-gradient(ellipse 50% 50% at 50% 50%, color-mix(in srgb, var(--inv-bg) 60%, transparent), transparent 100%); pointer-events: none; }
.dc-age { margin: 0; font-size: clamp(6.5rem, 24vw, 13rem); line-height: .9; }
.dc-age .dc-neon { display: inline-block; animation: dc-age-on 2.2s .3s steps(1, end) both, dc-buzz 7s 3s infinite; }
@keyframes dc-age-on { 0% { opacity: .06; } 12% { opacity: 1; } 18% { opacity: .1; } 30% { opacity: 1; } 34% { opacity: .3; } 48%, 100% { opacity: 1; } }
@keyframes dc-buzz { 0%, 91%, 100% { opacity: 1; } 92% { opacity: .55; } 93% { opacity: 1; } 95% { opacity: .7; } }
.dc-name { font-size: clamp(3.4rem, 11vw, 6.6rem); color: var(--inv-primary); line-height: 1.15; margin-top: -.05em; text-shadow: 0 0 22px var(--dc-glow), 0 2px 0 color-mix(in srgb, var(--inv-bg) 50%, transparent); }
.dc-hero .dc-letter { --dc-delay: 1.4s; }
.dc-subtitle { max-width: 540px; margin: 18px auto 0; color: color-mix(in srgb, var(--inv-text) 88%, var(--inv-bg)); text-shadow: 0 1px 12px var(--inv-bg); opacity: 0; animation: dc-fade 1.2s 2.8s forwards; }
.dc-hero-date { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin: 22px 0 0; font-size: .78rem; letter-spacing: .26em; text-transform: uppercase; opacity: 0; animation: dc-fade 1.2s 3.2s forwards; }
.dc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--inv-accent); box-shadow: 0 0 10px var(--inv-accent); }
@media (max-width: 640px) { .dc-hero-date { flex-direction: column; gap: 4px; } .dc-dot { display: none; } }
@keyframes dc-fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.dc-section { max-width: 1040px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.dc-welcome, .dc-countdown, .dc-contact { text-align: center; }
.dc-title { margin-bottom: 36px; text-align: center; }
.dc-title h2 { font-size: clamp(2.6rem, 7vw, 4rem); color: var(--inv-primary); text-shadow: 0 0 20px color-mix(in srgb, var(--inv-accent) 40%, transparent); }
.dc-prose { max-width: 620px; margin: 0 auto; font-size: 1.08rem; text-align: center; }
.dc-prose p { margin: 0 0 1.1em; }
.dc-quote-author { font-style: italic; color: var(--dc-muted); }

/* Celebrant: the portrait in a ring of tiny mirrors that turns */
.dc-celebrant-grid { display: grid; gap: 40px; align-items: center; justify-items: center; }
@media (min-width: 760px) { .dc-celebrant-grid { grid-template-columns: auto 1fr; gap: 64px; justify-items: start; } }
.dc-cameo { position: relative; margin: 0; width: min(320px, 74vw); aspect-ratio: 1; }
.dc-cameo-ring { position: absolute; inset: 0; border-radius: 50%;
    background: repeating-conic-gradient(from var(--dc-turn, 0deg), color-mix(in srgb, var(--inv-primary) 85%, transparent) 0 4deg, color-mix(in srgb, var(--inv-primary) 25%, transparent) 4deg 5deg, color-mix(in srgb, var(--inv-accent) 70%, var(--inv-bg)) 5deg 9deg, transparent 9deg 10deg);
    -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 16px), #000 calc(100% - 15px)); mask: radial-gradient(closest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
    filter: drop-shadow(0 0 14px var(--dc-glow)); animation: dc-turn 24s linear infinite; }
@property --dc-turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes dc-turn { to { --dc-turn: 360deg; } }
.dc-cameo-photo { position: absolute; inset: 22px; border-radius: 50%; overflow: hidden; background: var(--dc-surface); }
.dc-cameo-photo .kit-photo { position: absolute; inset: 0; }
.dc-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.dc-celebrant-text { max-width: 520px; text-align: center; }
@media (min-width: 760px) { .dc-celebrant-text { text-align: left; } }
.dc-celebrant-name { font-family: var(--inv-font-heading); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.2; color: var(--inv-primary); margin: 0 0 4px; }
.dc-celebrant-age { margin: 0 0 16px; font-size: .8rem; letter-spacing: .26em; text-transform: uppercase; color: var(--dc-muted); }
.dc-celebrant-age .dc-neon { font-size: 2.6rem; letter-spacing: 0; vertical-align: middle; margin-right: 6px; }
.dc-celebrant-text p:not(.dc-celebrant-name):not(.dc-celebrant-age) { margin: 0 0 .8em; }

/* Theme: on a lit dance floor */
.dc-floor-section { position: relative; isolation: isolate; overflow: hidden; padding: clamp(80px, 12vw, 140px) 22px; display: grid; place-items: center; }
.dc-floor { position: absolute; inset: -10% -6%; z-index: -1; display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; gap: 6px; transform: perspective(900px) rotateX(48deg) scale(1.25); transform-origin: 50% 100%; opacity: .75; }
@media (max-width: 640px) { .dc-floor { grid-template-columns: repeat(6, 1fr); } }
.dc-floor span { border-radius: 3px; background: color-mix(in srgb, var(--inv-primary) 6%, var(--inv-bg)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 8%, transparent); }
.dc-floor span:nth-child(3n+1) { --dc-tile: var(--dc-c1); }
.dc-floor span:nth-child(3n+2) { --dc-tile: var(--dc-c2); }
.dc-floor span:nth-child(3n) { --dc-tile: var(--dc-c3); }
.is-visible .dc-floor span { animation: dc-tile 5.5s calc(var(--d) * -.5s) steps(1, end) infinite; }
@keyframes dc-tile {
    0%, 92%, 100% { background: color-mix(in srgb, var(--inv-primary) 6%, var(--inv-bg)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 8%, transparent); }
    70% { background: color-mix(in srgb, var(--dc-tile) 75%, var(--inv-bg)); box-shadow: 0 0 22px color-mix(in srgb, var(--dc-tile) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--inv-primary) 40%, transparent); }
}
.dc-floor-section::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--inv-bg), transparent 28%, transparent 72%, var(--inv-bg)); pointer-events: none; }
.dc-theme-card { position: relative; max-width: 600px; padding: clamp(28px, 5vw, 48px); text-align: center; background: color-mix(in srgb, var(--inv-bg) 82%, transparent); border: 1px solid var(--dc-line); border-radius: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 60px color-mix(in srgb, var(--inv-accent) 18%, transparent); }
.dc-theme-card h2 { font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--inv-primary); text-shadow: 0 0 20px var(--dc-glow); margin-bottom: 12px; }
.dc-theme-card p:not(.dc-kicker) { margin: 0 0 .8em; }

/* Events: club tickets with a notched edge */
.dc-event-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.dc-event { position: relative; padding: 34px 26px 30px; text-align: center; background: var(--dc-surface); border: 1px solid var(--dc-line); border-radius: 10px;
    -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 11px, #000 12px) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 11px, #000 12px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle 12px at 0 50%, transparent 11px, #000 12px) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 11px, #000 12px) right / 51% 100% no-repeat; }
.dc-event::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--inv-accent), transparent); box-shadow: 0 0 14px var(--inv-accent); }
.dc-event-time { font-family: var(--dc-neon-font); font-size: 2.8rem; line-height: 1.1; margin: 0 0 6px; color: var(--inv-primary); text-shadow: 0 0 14px var(--dc-glow); }
.dc-event h3 { font-family: var(--inv-font-body); font-weight: 600; font-size: .9rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 8px; }
.dc-event-place { margin: 12px 0 0; }
.dc-event-address, .dc-event-notes { margin: 2px 0 0; color: var(--dc-muted); font-size: .94rem; }
.disco .kit-event-actions { justify-content: center; margin-top: 16px; }
.disco .kit-button { border-radius: 999px; border: 1px solid var(--dc-line); background: transparent; color: var(--inv-primary); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.disco .kit-button:hover { border-color: var(--inv-accent); box-shadow: 0 0 14px var(--dc-glow); }
.kit-js .dc-event { opacity: 0; translate: 0 22px; }
.kit-js .dc-event.is-visible { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }

/* Countdown: neon digits */
.dc-countdown .kit-countdown { gap: clamp(10px, 4vw, 40px); margin-top: 10px; }
.dc-countdown .kit-countdown-unit { min-width: 0; background: none; padding: 0; }
.dc-countdown .kit-countdown-value { font-family: var(--dc-neon-font); font-size: clamp(2.4rem, 9vw, 4.4rem); line-height: 1.1; color: var(--inv-primary); text-shadow: 0 0 4px var(--inv-primary), 0 0 16px var(--inv-accent), 0 0 34px var(--dc-glow); }
.dc-countdown .kit-countdown-label { font-size: .6rem; letter-spacing: .22em; color: var(--dc-muted); opacity: 1; }

/* Gallery */
.dc-gallery-grid.kit-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .dc-gallery-grid.kit-gallery { grid-template-columns: repeat(3, 1fr); } }
.dc-gallery-grid.kit-gallery a { aspect-ratio: 4 / 5; border-radius: 8px; box-shadow: 0 0 0 1px var(--dc-line); }
.dc-gallery-grid.kit-gallery img { filter: saturate(1.05) brightness(.9); transition: filter .5s ease, scale 1s ease; }
.dc-gallery-grid.kit-gallery a:hover img { filter: saturate(1.15); scale: 1.04; }
.kit-js .dc-gallery .dc-gallery-grid a { opacity: 0; translate: 0 18px; }
.kit-js .dc-gallery.is-visible .dc-gallery-grid a { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1s ease; }
.kit-js .dc-gallery.is-visible .dc-gallery-grid a:nth-child(3n+2) { transition-delay: .12s; }
.kit-js .dc-gallery.is-visible .dc-gallery-grid a:nth-child(3n) { transition-delay: .24s; }

/* RSVP */
.dc-rsvp-card { position: relative; max-width: 660px; margin: 0 auto; padding: clamp(26px, 5vw, 50px); border: 1px solid var(--dc-line); border-radius: 12px; background: color-mix(in srgb, var(--inv-bg) 72%, var(--dc-surface)); text-align: center; box-shadow: 0 0 50px color-mix(in srgb, var(--inv-accent) 12%, transparent); }
.disco .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .disco .inv-rsvp__field select, .disco .inv-rsvp__field textarea { color: var(--inv-text); background: color-mix(in srgb, var(--inv-text) 6%, transparent); border-color: var(--dc-line); }
.disco .inv-rsvp__field select option { background: var(--inv-bg); }
.disco .inv-rsvp__submit { border-radius: 999px; background: var(--inv-accent); color: var(--inv-bg); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; box-shadow: 0 0 24px var(--dc-glow); }
.disco input[type=radio], .disco input[type=checkbox] { accent-color: var(--inv-accent); }

/* Info */
.dc-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dc-info-item { padding: 26px; text-align: center; border: 1px solid var(--dc-line); border-radius: 10px; background: color-mix(in srgb, var(--dc-surface) 60%, transparent); }
.dc-info-item h3 { font-size: 1.9rem; color: var(--inv-primary); margin-bottom: 8px; }
.dc-info-item p { margin: 0 0 .5em; color: var(--dc-muted); }
.dc-faq { max-width: 700px; margin: 50px auto 0; text-align: center; }
.dc-faq details { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--dc-line); }
.dc-faq summary { cursor: pointer; }
.dc-faq details[open] summary { color: var(--inv-primary); }
.dc-faq details p { margin: 8px 0 0; color: var(--dc-muted); }

/* Contact */
.dc-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 64px; }
.dc-contact-name { font-family: var(--inv-font-heading); font-size: 2rem; color: var(--inv-primary); margin: 0; line-height: 1.3; }
.dc-contact-person a { color: var(--inv-text); text-decoration: none; letter-spacing: .08em; }

/* Footer: the ball again, over the name */
.dc-footer { position: relative; padding: clamp(190px, 26vw, 240px) 22px 70px; text-align: center; overflow: hidden; isolation: isolate; }
.dc-footer-message { margin: 0 0 6px; color: var(--dc-muted); }
.dc-footer-name { font-family: var(--inv-font-heading); font-size: clamp(3rem, 10vw, 5.4rem); line-height: 1.2; color: var(--inv-primary); margin: 0 0 12px; text-shadow: 0 0 24px var(--dc-glow); }
.dc-hashtag { margin: 0 0 8px; letter-spacing: .12em; }

@media (prefers-reduced-motion: reduce) {
    .dc-letter, .dc-age .dc-neon, .dc-subtitle, .dc-hero-date { animation: none !important; opacity: 1; }
    .dc-mirrors, .dc-cameo-ring, .dc-floor span { animation: none !important; }
    .kit-js .dc-event, .kit-js .dc-gallery .dc-gallery-grid a { opacity: 1; translate: 0 0; transition: none; }
}
