/* Northern Lights Fest 2026 - evening "party" look (2026-10-14).
   String lights, drifting bokeh and the day-1 evening photos hung on a
   clothesline of fairy lights. Strands, bokeh and the clothesline rows are
   built by the script at the bottom of the page; without JS the photos
   still show as a plain grid. */

:root {
    --nlf-night: #0b0a1a;
    --nlf-night-2: #170f2b;
    --nlf-mint: #8fe8c9;
    --nlf-lavender: #c9b6ea;
    --nlf-amber: #ffcf6e;
    --nlf-pink: #ff8fc4;
    --nlf-paper: #fbf5e9;
}

/* ===== Fairy-light strands ===== */
.nlf-strand {
    position: absolute;
    left: 0;
    right: 0;
    height: 70px;
    pointer-events: none;
    z-index: 2;
}

.nlf-strand svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.nlf-strand path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.nlf-bulb {
    position: absolute;
    width: 9px;
    height: 13px;
    margin-left: -4.5px;
    border-radius: 50% 50% 45% 45%;
    background: var(--c, var(--nlf-amber));
    box-shadow: 0 0 6px 2px var(--c, var(--nlf-amber)), 0 0 22px 6px color-mix(in srgb, var(--c, var(--nlf-amber)) 45%, transparent);
    animation: nlf-twinkle var(--t, 2.6s) ease-in-out var(--d, 0s) infinite alternate;
}

.nlf-bulb::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: #3a3346;
}

@keyframes nlf-twinkle {
    0%   { opacity: 1; }
    70%  { opacity: 0.85; }
    100% { opacity: 0.35; box-shadow: 0 0 3px 1px var(--c, var(--nlf-amber)); }
}

/* Hero strand sits under the fixed header */
.events-hero > .nlf-strand {
    top: 62px;
    height: 44px;
}

/* ===== Bokeh ===== */
.nlf-bokeh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.nlf-bokeh span {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c) 0%, transparent 70%);
    opacity: 0;
    filter: blur(1px);
    animation: nlf-float var(--t, 14s) ease-in-out var(--d, 0s) infinite;
}

@keyframes nlf-float {
    0%   { opacity: 0;    transform: translateY(20px) scale(0.9); }
    30%  { opacity: 0.55; }
    70%  { opacity: 0.45; }
    100% { opacity: 0;    transform: translateY(-60px) scale(1.1); }
}

/* Hero content above the bokeh */
.events-hero .events-hero-inner {
    position: relative;
    z-index: 3;
}

/* ===== The Night Market section ===== */
.nlf-night {
    position: relative;
    overflow: hidden;
    padding: 110px 0 90px;
    color: var(--white);
    background:
        radial-gradient(ellipse 60% 40% at 15% 20%, rgba(255, 143, 196, 0.16), transparent 70%),
        radial-gradient(ellipse 50% 45% at 85% 35%, rgba(143, 232, 201, 0.13), transparent 70%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 170, 80, 0.18), transparent 70%),
        linear-gradient(180deg, #030304 0%, var(--nlf-night) 18%, var(--nlf-night-2) 100%);
}

.nlf-night > .nlf-strand {
    top: 0;
}

.nlf-night .container {
    position: relative;
    z-index: 3;
}

.nlf-night-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.nlf-night-eyebrow {
    display: inline-block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--nlf-amber);
    text-shadow: 0 0 14px rgba(255, 207, 110, 0.6);
    margin-bottom: 10px;
}

.nlf-night-title {
    font-family: 'Prata', serif;
    font-weight: 400;
    font-size: clamp(2.3rem, 5.5vw, 4rem);
    line-height: 1.1;
    margin: 0 0 16px;
    color: var(--white);
}

.nlf-night-title span {
    background: linear-gradient(100deg, var(--nlf-amber) 0%, var(--nlf-pink) 50%, var(--nlf-lavender) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(255, 143, 196, 0.35));
}

.nlf-night-sub {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
    margin: 0;
}

/* ===== Photos ===== */
/* No-JS fallback: a plain grid */
.nlf-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
}

/* JS regroups the photos into clotheslines, each with its own strand */
.nlf-gallery.is-lines {
    display: block;
}

.nlf-line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--per, 5), minmax(0, 1fr));
    gap: clamp(14px, 2.4vw, 34px);
    padding: 46px clamp(4px, 2vw, 30px) 0;
    margin-bottom: 40px;
}

.nlf-line > .nlf-strand {
    top: 0;
    height: 46px;
}

.nlf-photo {
    position: relative;
    margin: 0;
    padding: 9px 9px 0;
    background: var(--nlf-paper);
    border-radius: 3px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 190, 120, 0.12);
    transform: translateY(var(--drop, 0)) rotate(var(--r, 0deg));
    transform-origin: 50% -14px;
    cursor: zoom-in;
    transition: scale 0.3s ease, box-shadow 0.35s ease;
    animation: nlf-sway var(--sway, 6s) ease-in-out var(--sd, 0s) infinite alternate;
}

/* `scale` composes with the sway/drop animations' transform */
.nlf-photo:hover,
.nlf-photo:focus-visible {
    scale: 1.07;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 190, 120, 0.3);
    z-index: 4;
    outline: none;
}

@keyframes nlf-sway {
    from { transform: translateY(var(--drop, 0)) rotate(calc(var(--r, 0deg) - 1.2deg)); }
    to   { transform: translateY(var(--drop, 0)) rotate(calc(var(--r, 0deg) + 1.2deg)); }
}

/* Wooden peg - only when hanging on a line */
.nlf-line .nlf-photo::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    width: 9px;
    height: 26px;
    margin-left: -4.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, #b88a5a, #d9ad7c 50%, #b88a5a);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.nlf-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1px;
}

/* Warm evening vignette over each print */
.nlf-photo .nlf-photo-glow {
    position: absolute;
    left: 9px;
    right: 9px;
    top: 9px;
    aspect-ratio: 3 / 4;
    background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(40, 10, 40, 0.35) 100%);
    pointer-events: none;
}

.nlf-photo figcaption {
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    line-height: 1.1;
    color: #3a2e42;
    text-align: center;
    padding: 8px 4px 10px;
}

/* ===== Closing band ===== */
.nlf-encore {
    position: relative;
    text-align: center;
    margin-top: 40px;
    padding: 46px 24px 10px;
}

.nlf-encore h3 {
    font-family: 'Prata', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    margin: 0 0 10px;
    color: var(--white);
}

.nlf-encore p {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 24px;
}

.nlf-encore .btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 1.05rem;
    box-shadow: 0 0 30px rgba(196, 30, 58, 0.55);
}

/* ===== Lightbox ===== */
.nlf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 4, 14, 0.92);
    backdrop-filter: blur(6px);
    padding: 20px;
}

.nlf-lightbox.open {
    display: flex;
}

.nlf-lightbox figure {
    margin: 0;
    max-width: min(560px, 92vw);
    text-align: center;
}

.nlf-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(255, 190, 120, 0.25);
}

.nlf-lightbox figcaption {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: var(--nlf-paper);
    margin-top: 12px;
}

.nlf-lb-btn {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nlf-lb-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.nlf-lb-close { top: 18px; right: 18px; }
.nlf-lb-prev  { left: 18px;  top: 50%; transform: translateY(-50%); }
.nlf-lb-next  { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
    .nlf-night {
        padding: 90px 0 70px;
    }

    .nlf-night-head {
        margin-bottom: 36px;
    }

    .nlf-photo figcaption {
        font-size: 1.05rem;
    }

    .nlf-lb-prev, .nlf-lb-next {
        top: auto;
        bottom: 18px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nlf-bulb,
    .nlf-bokeh span,
    .nlf-photo {
        animation: none;
    }

    .nlf-bokeh span {
        opacity: 0.35;
    }
}

/* ===== Flashier pass (2026-10-14) ===== */

/* Moving aurora ribbons over the hero photo */
.nlf-aurora {
    position: absolute;
    inset: -20%;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: blur(50px);
    opacity: 0.55;
}

.nlf-aurora span {
    position: absolute;
    width: 55%;
    height: 40%;
    border-radius: 50%;
    animation: nlf-aurora-drift var(--t, 16s) ease-in-out var(--d, 0s) infinite alternate;
}

.nlf-aurora span:nth-child(1) { left: 5%;  top: 20%; background: #2bffb0; --t: 14s; }
.nlf-aurora span:nth-child(2) { left: 35%; top: 10%; background: #a46bff; --t: 18s; --d: -6s; }
.nlf-aurora span:nth-child(3) { left: 55%; top: 35%; background: #ff5fb0; --t: 20s; --d: -11s; opacity: 0.6; }

@keyframes nlf-aurora-drift {
    0%   { transform: translate(0, 0) rotate(-8deg) scaleX(1); }
    50%  { transform: translate(12%, -8%) rotate(6deg) scaleX(1.3); }
    100% { transform: translate(-10%, 6%) rotate(-3deg) scaleX(0.9); }
}

/* Title shimmer */
.events-hero-title .nlf-title-line2,
.nlf-night-title span {
    background-size: 220% auto;
    animation: nlf-shimmer 5s linear infinite;
}

.events-hero-title .nlf-title-line2 {
    background-image: linear-gradient(100deg, #8fe8c9 0%, #b9d4ec 25%, #c9b6ea 45%, #ffffff 50%, #c9b6ea 55%, #8fe8c9 100%);
    filter: drop-shadow(0 0 16px rgba(143, 232, 201, 0.35));
}

.nlf-night-title span {
    background-image: linear-gradient(100deg, #ffcf6e 0%, #ff8fc4 30%, #c9b6ea 45%, #fff 50%, #c9b6ea 55%, #ff8fc4 75%, #ffcf6e 100%);
}

@keyframes nlf-shimmer {
    to { background-position: -220% center; }
}

/* Neon flicker on the eyebrow */
.nlf-night-eyebrow {
    animation: nlf-flicker 4s linear infinite;
}

@keyframes nlf-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; text-shadow: 0 0 14px rgba(255, 207, 110, 0.8), 0 0 30px rgba(255, 143, 196, 0.5); }
    20%, 24%, 55% { opacity: 0.45; text-shadow: none; }
}

/* Neon frame round the reel */
.nlf-video-wrap {
    position: relative;
    padding: 3px;
    background: conic-gradient(from var(--nlf-angle, 0deg), #8fe8c9, #c9b6ea, #ff8fc4, #ffcf6e, #8fe8c9);
    animation: nlf-spin 4s linear infinite;
    box-shadow: 0 0 30px rgba(255, 143, 196, 0.45), 0 20px 50px rgba(0, 0, 0, 0.6);
}

.nlf-video {
    border-radius: 10px;
}

@property --nlf-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes nlf-spin {
    to { --nlf-angle: 360deg; }
}

/* Neon ticker between hero and night section (wrapper clips the tilted band's ends) */
.nlf-ticker-wrap {
    position: relative;
    z-index: 3;
    overflow-x: clip;
}

.nlf-ticker {
    position: relative;
    z-index: 3;
    overflow: hidden;
    background: linear-gradient(90deg, #ff3d8b, #a46bff, #2bd9a0, #ffb13d, #ff3d8b);
    background-size: 300% 100%;
    animation: nlf-ticker-bg 12s linear infinite;
    transform: rotate(-1.5deg) scale(1.04);
    margin: -18px 0 -10px;
    box-shadow: 0 0 40px rgba(255, 61, 139, 0.45);
}

.nlf-ticker-track {
    display: flex;
    width: max-content;
    animation: nlf-marquee 28s linear infinite;
}

.nlf-ticker-track span {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(1.1rem, 2.4vw, 1.6rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #12091f;
    white-space: nowrap;
    padding: 12px 0;
}

@keyframes nlf-marquee {
    to { transform: translateX(-50%); }
}

@keyframes nlf-ticker-bg {
    to { background-position: 300% 0; }
}

/* Sweeping spotlights in the night section */
.nlf-beams {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.nlf-beams span {
    position: absolute;
    bottom: -10%;
    width: 22vw;
    min-width: 160px;
    height: 130%;
    transform-origin: 50% 100%;
    background: linear-gradient(0deg, var(--c) 0%, transparent 85%);
    clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0);
    opacity: 0.16;
    mix-blend-mode: screen;
    animation: nlf-sweep var(--t, 9s) ease-in-out var(--d, 0s) infinite alternate;
}

.nlf-beams span:nth-child(1) { left: 6%;  --c: #ff8fc4; --t: 8s; }
.nlf-beams span:nth-child(2) { left: 39%; --c: #8fe8c9; --t: 11s; --d: -4s; }
.nlf-beams span:nth-child(3) { left: 72%; --c: #ffcf6e; --t: 9s;  --d: -7s; }

@keyframes nlf-sweep {
    from { transform: rotate(-28deg); }
    to   { transform: rotate(28deg); }
}

/* Photos drop onto the line as it scrolls into view */
.nlf-line .nlf-photo {
    opacity: 0;
}

.nlf-line.is-in .nlf-photo {
    animation: nlf-drop 0.9s cubic-bezier(.3, 1.5, .5, 1) var(--in, 0s) both, nlf-sway var(--sway, 6s) ease-in-out calc(var(--in, 0s) + 0.9s) infinite alternate;
}

@keyframes nlf-drop {
    0%   { opacity: 0; transform: translateY(-120px) rotate(calc(var(--r, 0deg) * -4)); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(var(--drop, 0)) rotate(var(--r, 0deg)); }
}

/* Glowing CTA */
.nlf-encore .btn,
.nlf-register .btn {
    animation: nlf-pulse 2.4s ease-in-out infinite;
}

@keyframes nlf-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(196, 30, 58, 0.45); }
    50%      { box-shadow: 0 0 38px rgba(255, 61, 139, 0.85), 0 0 70px rgba(196, 30, 58, 0.4); }
}

/* Confetti + sparkle canvas */
.nlf-fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

@media (prefers-reduced-motion: reduce) {
    .nlf-aurora span,
    .events-hero-title .nlf-title-line2,
    .nlf-night-title span,
    .nlf-night-eyebrow,
    .nlf-video-wrap,
    .nlf-ticker,
    .nlf-ticker-track,
    .nlf-beams span,
    .nlf-encore .btn,
    .nlf-register .btn {
        animation: none;
    }

    .nlf-line .nlf-photo,
    .nlf-line.is-in .nlf-photo {
        opacity: 1;
        animation: none;
    }

    .nlf-fx {
        display: none;
    }
}
