/* ============================================================================
   FESTIVAL CAMPAIGN PAGE — /festival/{slug} for a festival with a programme
   ----------------------------------------------------------------------------
   Ported from the client-approved mockup (Docs/mockups/fiesta-mahal-tana.html,
   approved 2026-10-22) without its review chrome. Loads after
   css/public/tokens.css, editorial.css, shell.css and css/festival/skin.css.
   Phase classes on .fm-page: --before / --live / --after (js/festival/campaign.js
   keeps them current). Three tiers: phone < 640 · tablet 640–899 · desktop >= 900.
   ============================================================================ */
.fm-page { display: flex; flex-direction: column; }
.fm-page section { overflow-x: clip; }
/* phase switching uses [hidden]; component display rules (.btn, .cd …) must not override it */
.fm-page [hidden] { display: none !important; }

.crumbs { padding: 18px var(--gutter) 0; font-size: .78rem; color: var(--ink-3); position: relative; z-index: 2; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red-ink); }

/* one section-head pattern, as on the homepage: label → display h2 (accent in <em>) → lead */
.sec-head { display: grid; gap: var(--s4); justify-items: start; }
.sec-head h2 { font-size: var(--fs-l); }
.sec-head h2 em { color: var(--red-ink); }
.sec-head .lead { margin-top: var(--s2); color: var(--ink-2); }
h3.label { margin-bottom: var(--s4); }

/* ---------- hero: the social banner's composition ---------- */
.fm-hero { padding: 0 var(--gutter) var(--s9); isolation: isolate; text-align: center; }
.fm-hero .fm-bunting.tl { left: -3vw; top: -6px; width: min(600px, 46vw); }
.fm-hero .fm-bunting.br { right: -3vw; bottom: -6px; width: min(560px, 42vw); }
.fm-hero-inner { display: grid; justify-items: center; padding-top: clamp(56px, 7vw, 96px); max-width: 980px; margin: 0 auto; }
.fm-h1 { margin: 18px 0 0; width: min(640px, 86vw); }
.fm-h1 img { width: 100%; height: auto; }
.fm-h1--text { width: auto; font-size: var(--fs-xl); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4) clamp(24px, 4vw, 56px); margin: var(--s7) 0 0; }
.facts div { display: flex; flex-direction: column-reverse; }
.facts dt { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.facts dd { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.15; font-variation-settings: "SOFT" 100; }
.fm-hero .lead { margin: var(--s5) auto 0; color: var(--ink-2); max-width: 40rem; white-space: pre-line; }
.fm-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: var(--s6); }
.fm-ctas .btn-ghost:hover { background: rgba(23, 20, 15, .06); }
.fm-thanks { color: var(--fm-magenta-ink); }
.recap-next { margin-top: var(--s5); font-family: var(--f-display); font-style: italic; font-size: 1.25rem; color: var(--fm-magenta-ink); font-variation-settings: "SOFT" 100, "WONK" 1; }
.fm-tagline { position: absolute; z-index: 2; left: max(2vw, calc(50% - 640px)); bottom: 12%; width: clamp(150px, 15vw, 230px); height: auto; rotate: -7deg; filter: drop-shadow(0 16px 24px rgba(60, 38, 92, .3)); }
@media (max-width: 1099px) { .fm-tagline { position: static; margin: var(--s7) auto 0; width: 150px; } }
@media (max-width: 899px) { .fm-hero .fm-bunting.tl { width: 62vw; top: 44px; } .fm-hero .fm-bunting.br { display: none; } .fm-hero-inner { padding-top: 110px; } }

/* now card (live) */
.now-card { margin-top: var(--s6); padding: 22px 24px 24px; max-width: 34rem; text-align: left; }
.now-card .label { display: flex; align-items: center; gap: 10px; color: var(--fm-magenta-ink); }
.now-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.02; margin: 10px 0 6px; letter-spacing: -.02em; font-variation-settings: "SOFT" 100; }
.now-where { font-size: .9rem; color: var(--ink-2); margin: 0; }
.now-next { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(23, 20, 15, .12); font-size: .92rem; }
.now-next .label { display: inline; color: var(--fm-teal-ink); margin-right: 8px; }
.now-card .btn { margin-top: 18px; }

/* photo strip — real festival photos as stickers (uploads are ≤ 568 px, so they stay small) */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 19vw, 300px); justify-content: safe center; gap: 18px; padding: 10px var(--gutter) var(--s8); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { display: none; }
.strip .sticker { scroll-snap-align: start; margin: 0; }
.strip .ph { aspect-ratio: 3 / 2; }
.strip .sticker:nth-child(odd) { rotate: -1.6deg; }
.strip .sticker:nth-child(even) { rotate: 1.8deg; margin-top: 18px; }
.strip figcaption { font-size: .72rem; color: var(--ink-3); padding: 8px 4px 2px; text-align: left; }

/* ---------- live panel (festival days only) ---------- */
.fm-live { padding: 14vh var(--gutter) 12vh; }
.live-grid { display: grid; gap: var(--s6); margin-top: var(--s7); }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; display: block; text-decoration: none; color: #fff; border-radius: calc(var(--fm-r) - 8px); }
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent 60%); }
.player .meta { position: absolute; z-index: 2; left: 20px; bottom: 18px; right: 120px; }
.player .meta b { display: block; font-family: var(--f-display); font-size: clamp(1.3rem, 2.6vw, 2.2rem); line-height: 1.05; margin-top: 8px; font-variation-settings: "SOFT" 100; }
.player .meta small { display: block; margin-top: 6px; font-size: .8rem; opacity: .8; }
.player .live-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; background: var(--fm-magenta); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-radius: var(--r-pill); }
.player .live-tag .fm-dot { background: #fff; }
.player .play { position: absolute; z-index: 2; right: 20px; bottom: 18px; width: 84px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); transition: background .4s, transform .6s var(--e-out); }
.player:hover .play { background: var(--red); transform: scale(1.08); }
.player .play svg { width: 26%; margin-left: 6%; }
.player[aria-disabled="true"] { pointer-events: none; }
.player[aria-disabled="true"] .play { display: none; }
.today-card { padding: 22px 24px; }
.today { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(23, 20, 15, .14); }
.today li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(23, 20, 15, .14); font-size: .95rem; }
.today time { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.today .is-now { font-weight: 600; }
.today .is-now time { color: var(--fm-magenta-ink); }
/* muted by colour, not opacity: --ink-3 keeps 6:1 on the white stickers */
.today .is-done { color: var(--ink-3); }
.live-note { font-size: .8rem; color: var(--ink-3); margin: 14px 0 0; }
.fm-live h3.label { color: var(--fm-teal-ink); }
@media (min-width: 900px) { .live-grid { grid-template-columns: 2fr 1fr; gap: 3vw; align-items: start; } }

/* ---------- schedule: each day is a dashed sticker card ---------- */
.fm-sched { padding: 14vh var(--gutter) 12vh; }
.days { display: grid; gap: var(--s6); margin-top: var(--s8); align-items: start; }
.day { padding: 30px 30px 14px; }
.day h3 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1; padding-bottom: 14px; border-bottom: 2px solid var(--ink); font-variation-settings: "SOFT" 100, "opsz" 144; }
.day h3 small { font-family: var(--f-sans); font-weight: 600; font-size: .7rem; letter-spacing: .16em; color: var(--fm-magenta-ink); }
.day:nth-child(2) h3 small { color: var(--fm-teal-ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 5.6rem 1fr; gap: 6px 18px; padding: 20px 0 22px; border-bottom: 1px solid rgba(23, 20, 15, .14); position: relative; transition: background .4s; }
.row:last-child { border-bottom: 0; }
.row .t { font-family: var(--f-display); font-weight: 300; font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-variation-settings: "SOFT" 50, "opsz" 144; }
.row .t small { display: block; font-family: var(--f-sans); font-weight: 600; font-size: .66rem; letter-spacing: .16em; margin-top: 6px; color: var(--ink-3); }
.row.tba .t { font-family: var(--f-sans); font-size: .78rem; font-weight: 600; letter-spacing: .04em; line-height: 1.3; color: var(--ink-3); padding-top: 6px; }
.row h4 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.08; letter-spacing: -.015em; font-variation-settings: "SOFT" 100; }
.row .sub { margin: 6px 0 0; font-size: .95rem; color: var(--ink-2); max-width: 34rem; }
.row .where { margin: 8px 0 0; font-size: .85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.row .where svg { width: 14px; height: 14px; flex: none; }
.row .where a { color: var(--ink-2); text-underline-offset: 3px; }
.row .acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 12px; font-size: .85rem; }
.row .acts:empty { display: none; }
.badge { display: none; align-items: center; gap: 8px; padding: 4px 10px; font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-radius: var(--r-pill); }
.row.is-now { background: #FBEAF3; margin-inline: -14px; padding-inline: 14px; border-radius: 12px; border-bottom-color: transparent; }
.row.is-now .b-now { display: inline-flex; background: var(--fm-magenta); color: #fff; }
.row.is-now .b-now .fm-dot { background: #fff; width: 7px; height: 7px; }
.row.is-next .b-next { display: inline-flex; background: var(--fm-teal-ink); color: #fff; }
.row.is-done { color: var(--ink-3); }
.row.is-done .b-done { display: inline-flex; box-shadow: inset 0 0 0 1px currentColor; }
.fm-page--after .row.is-done { opacity: 1; }
.fm-page--after .row .b-done { display: none; }
.stream { display: none; align-items: center; gap: 8px; font-weight: 600; color: var(--fm-magenta-ink); text-decoration: none; }
.stream svg { width: 16px; height: 16px; }
.fm-page--live .row.is-now .stream { display: inline-flex; }
@media (min-width: 900px) {
  .fm-sched { display: grid; grid-template-columns: .8fr 2fr; gap: 0 5vw; align-items: start; }
  .fm-sched .sec-head { position: sticky; top: calc(var(--pub-header-h, 56px) + 6vh); }
  .days { grid-template-columns: 1fr 1fr; gap: 2.4vw; margin-top: 0; }
}
@media (max-width: 639px) { .day { padding: 24px 18px 10px; } .row { grid-template-columns: 4.4rem 1fr; gap: 6px 14px; } .row .t { font-size: 1.55rem; } .row .acts { grid-column: 1 / -1; } }

/* ---------- venues: the homepage's ruled list, numbers as confetti dots ---------- */
.fm-where { padding: 14vh var(--gutter) 12vh; }
.venues { list-style: none; margin: var(--s7) 0 0; padding: 0; display: grid; border-top: 1px solid rgba(23, 20, 15, .2); counter-reset: v; }
.venues li { counter-increment: v; display: grid; grid-template-columns: 3rem 1fr auto; gap: 2px 16px; align-items: baseline; padding: 18px 0 20px; border-bottom: 1px solid rgba(23, 20, 15, .2); }
.venues li::before { content: counter(v); grid-column: 1; grid-row: 1 / span 3; align-self: center; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 1rem; color: #fff; background: var(--fm-magenta); }
.venues li:nth-child(5n+2)::before { background: var(--fm-teal); }
.venues li:nth-child(5n+3)::before { background: var(--fm-yellow); color: var(--ink); }
.venues li:nth-child(5n+4)::before { background: var(--fm-purple); }
.venues li:nth-child(5n+5)::before { background: var(--fm-sky); color: var(--ink); }
.venues .town-tag { grid-column: 2; grid-row: 1; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.venues li.far .town-tag { color: var(--fm-magenta-ink); }
.venues b { grid-column: 2; grid-row: 2; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.1; font-variation-settings: "SOFT" 100; }
.venues .uses { grid-column: 2; grid-row: 3; font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.venues .link-arrow { grid-column: 3; grid-row: 1 / span 3; align-self: center; font-size: .85rem; }
@media (max-width: 639px) { .venues li { grid-template-columns: 2.8rem 1fr; } .venues .link-arrow { grid-column: 2; grid-row: 4; justify-self: start; margin-top: 10px; } }
@media (min-width: 900px) { .venues { grid-template-columns: 1fr 1fr; column-gap: 4vw; } }

/* ---------- plan your visit ---------- */
.fm-plan { padding: 14vh var(--gutter) 12vh; }
.plan-grid { display: grid; gap: var(--s8); margin-top: 7vh; }
.route { position: relative; padding: 26px 26px 26px 54px; align-self: start; }
.route::before { content: ""; position: absolute; left: 32px; top: 64px; bottom: 110px; width: 2px; background: repeating-linear-gradient(to bottom, var(--fm-magenta) 0 6px, transparent 6px 12px); }
.route ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.route li { position: relative; }
.route li::before { content: ""; position: absolute; left: -27px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--fm-teal); }
.route b { display: block; font-family: var(--f-display); font-size: 1.4rem; font-weight: 600; line-height: 1.1; font-variation-settings: "SOFT" 100; }
.route span { font-size: .88rem; color: var(--ink-2); }
.route .note { margin-top: 26px; font-size: .82rem; color: var(--ink-3); max-width: 24rem; }
.route .link-arrow { margin-top: 6px; font-size: .9rem; }
.picks .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: var(--s7); }
.picks a.card { text-decoration: none; display: block; }
.picks .ph { aspect-ratio: 4 / 3; }
.picks .cap { margin: 8px 4px 2px; }
.picks .cap b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; font-variation-settings: "SOFT" 100; }
.picks .hint { font-size: .85rem; color: var(--ink-3); margin: -8px 0 14px; }
.picks .more { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.picks .related { list-style: none; margin: 0 0 var(--s7); padding: 0; display: grid; gap: 12px; border-top: 1px solid rgba(23, 20, 15, .16); padding-top: 14px; }
.picks .related li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.picks .related .link-arrow { font-family: var(--f-display); font-weight: 500; font-size: 1.15rem; font-variation-settings: "SOFT" 100; }
.picks .related small { font-size: .8rem; color: var(--ink-3); }
@media (min-width: 640px) { .picks .cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .plan-grid { grid-template-columns: .8fr 1.6fr; gap: 5vw; align-items: start; } }

/* ---------- photos: a scrapbook of stickers ---------- */
.fm-photos { padding: 14vh var(--gutter) 12vh; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: var(--s7); }
.mosaic .sticker { margin: 0; }
.mosaic .ph { aspect-ratio: 3 / 2; }
.mosaic .big { grid-column: 1 / -1; }
.mosaic .sticker:nth-child(5n+2) { rotate: 1.4deg; }
.mosaic .sticker:nth-child(5n+3) { rotate: -1.2deg; }
.mosaic .sticker:nth-child(5n+4) { rotate: -.8deg; }
.mosaic .sticker:nth-child(5n+5) { rotate: 1.6deg; }
.fm-photos .credit { margin-top: 18px; font-size: .78rem; color: var(--ink-3); }
@media (min-width: 900px) { .mosaic { grid-template-columns: repeat(4, 1fr); gap: 20px; } .mosaic .big { grid-column: span 2; grid-row: span 2; } .mosaic .big .ph { aspect-ratio: auto; height: 100%; } }

/* ---------- hand-off to the next festival — night (the Festival of Lights) ---------- */
.fm-night { position: relative; min-height: 86vh; display: grid; align-items: center; padding: 16vh var(--gutter); color: var(--paper); background: var(--night); isolation: isolate; overflow: hidden; }
.fm-night .bg { position: absolute; inset: 0; z-index: -2; margin: 0; }
.fm-night .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.fm-night .bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 30% 60%, transparent, var(--night) 88%), linear-gradient(to bottom, var(--navy-deep), transparent 30%, transparent 70%, var(--night-2)); }
.fm-night .glow { position: absolute; z-index: -1; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 22px 8px rgba(144, 203, 89, .7), 0 0 80px 30px rgba(36, 161, 236, .3); }
.fm-night .glow:nth-of-type(1) { left: 64%; top: 40%; }
.fm-night .glow:nth-of-type(2) { left: 72%; top: 24%; animation-delay: -1.2s; }
.fm-night .glow:nth-of-type(3) { left: 84%; top: 62%; animation-delay: -2.1s; }
.fm-night .glow:nth-of-type(4) { left: 58%; top: 78%; animation-delay: -.4s; }
@media (prefers-reduced-motion: no-preference) { .fm-night .glow { animation: fm-twinkle 3.4s ease-in-out infinite alternate; } }
@keyframes fm-twinkle { from { opacity: .35; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
.fm-night h2 { font-size: var(--fs-xl); margin-top: var(--s5); }
.fm-night h2 .ln { display: block; }
.fm-night h2 .ln:nth-child(2) { padding-left: .9em; }
.fm-night h2 .ln:nth-child(3) { margin-top: .32em; }
.fm-night h2 .ln:nth-child(4) { padding-left: 1.4em; color: var(--sky-2); }
.fm-night .lead { margin-top: var(--s6); opacity: .9; }
.fm-night .when { margin-top: var(--s5); font-family: var(--f-display); font-style: italic; font-size: var(--fs-m); color: var(--sky); font-variation-settings: "SOFT" 100, "WONK" 1; }
.fm-night .btn { margin-top: var(--s6); }

/* ---------- section order: after the festival the photos lead ---------- */
.fm-page > .crumbs { order: 0; }
.fm-page > .fm-hero { order: 1; }
.fm-page > .strip { order: 2; }
.fm-page > .fm-live { order: 3; }
.fm-page > .fm-sched { order: 4; }
.fm-page > .fm-where { order: 6; }
.fm-page > .fm-plan { order: 7; }
.fm-page > .fm-photos { order: 8; }
.fm-page > .fm-night { order: 10; }
.fm-page--after > .fm-photos { order: 3; }
.fm-page--after > .strip { display: none; }
