/* Devon Festivals — static site styles. Mirrors the Bristol Festivals card
   design. Brand colour is driven by --brand (set per-build from festivals.json). */
:root {
  --brand: #00a838;
  --brand-tint: rgba(0, 168, 56, 0.1);
  --ink: #1a1a1a;
  --line: #e6e6e6;
  --line-soft: #f0f0f0;
  --red: #e11414;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  color: var(--brand);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---- header ---- */
/* masthead (references Bristol: logo left, search + nav right, page-width) */
/* Sticky, solid, no keyline (matches Bristol Festivals). Nav sits left, next to
   the logo on desktop; on mobile it collapses to a hamburger drawer. */
.masthead { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.masthead__inner { max-width: 1440px; margin: 0 auto; padding: 21px 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; text-decoration: none; color: var(--brand); --logo-bg: #fff; }
.brand__logo { display: block; height: 40px; width: auto; } /* Bristol desktop: 82px bar, 40px logo centred */
.brand__bg { fill: var(--logo-bg); }
.nav { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.nav a, .masthead__drawer a { text-decoration: none; color: var(--brand); display: inline-flex; align-items: center; }
.nav__search { color: var(--brand); display: inline-flex; align-items: center; }
.nav__search svg { width: 20px; height: 20px; display: block; }
/* hamburger (mobile only) */
.masthead__burger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.masthead__burger span { display: block; width: 22px; height: 2px; background: var(--brand); transition: transform .2s, opacity .2s; }
.masthead__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.masthead__burger.is-open span:nth-child(2) { opacity: 0; }
.masthead__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.masthead__drawer { display: none; flex-direction: column; padding: 4px 24px 14px; background: #fff; }
.masthead__drawer a { padding: 11px 2px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-top: 1px solid var(--line-soft); }
@media (max-width: 749px) {
  .masthead__inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .masthead__burger { display: inline-flex; justify-self: start; }
  .brand { justify-self: center; }
  .masthead__inner { padding-top: 10px; padding-bottom: 10px; }
  .brand__logo { width: 197px; } /* Bristol mobile: 60px bar, logo fitted in a 197x40 box */
  .nav__search { justify-self: end; }
  .nav { display: none; }
  .masthead__drawer { display: flex; }
  .masthead__drawer[hidden] { display: none; }
}

/* Homepage: header is fixed and transparent over the hero video, turning solid
   white once scrolled (.is-stuck is toggled by nav.js). */
.is-home .masthead { position: fixed; top: 0; left: 0; right: 0; background: transparent; box-shadow: none; }
.is-home .masthead .nav a, .is-home .masthead .nav__search { color: #fff; }
.is-home .masthead .masthead__burger span { background: #fff; }
.is-home .masthead.is-stuck { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.is-home .masthead.is-stuck .nav a, .is-home .masthead.is-stuck .nav__search { color: var(--brand); }
.is-home .masthead.is-stuck .masthead__burger span { background: var(--brand); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; background: var(--brand); color: #fff; padding: 72px 0; }
/* Homepage video hero: fixed ~422px tall (matches Bristol Festivals), content
   vertically centred. The fixed transparent header sits over it (see below). */
.is-home .hero { height: 422px; min-height: 422px; padding: 0 0 40px; display: flex; flex-direction: column; justify-content: flex-end; text-align: left; }
/* inner matches .wrap exactly so the banner's left edge lines up with the cards */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--brand); opacity: .6; z-index: 1; }
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.hero h1 { margin: 0; font-size: clamp(30px, 6vw, 52px); font-weight: 700; letter-spacing: -1.5px; line-height: 1.05; }
.hero__intro { margin: 16px 0 0; max-width: 760px; font-size: 15px; line-height: 1.6; color: #fff; }

/* intro band (solid brand, below the hero) */
.intro { background: var(--brand); color: #fff; padding: 28px 0; }
.intro__inner { max-width: 1440px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.intro p { margin: 0 0 18px; max-width: 780px; font-size: 15px; line-height: 1.6; font-weight: 400; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* divider */
.hr { height: 1px; background: var(--brand); border: 0; width: calc(100% - 48px); max-width: 1392px; margin: 0 auto; }

/* reversed cards on the brand (green) panel — mirrors Bristol's "Beyond" */
.section--brand .card { background: transparent; border-color: rgba(255, 255, 255, .45); }
.section--brand .card:hover { border-color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.section--brand .card__title, .section--brand .card__title a, .section--brand .card__date, .section--brand .card__desc { color: #fff; }
.section--brand .card__wx { background: rgba(255, 255, 255, .18); color: #fff; }
.section--brand .badge--cat { background: #fff; color: var(--brand); }
.section--brand .card__ticket { border-color: #fff; color: #fff; }
.section--brand .card__foot { border-top-color: rgba(255, 255, 255, .25); }
.section--brand .savebtn { border-color: #fff; color: #fff; background: transparent; }
.section--brand .savebtn:hover { background: rgba(255, 255, 255, .14); }
.section--brand .savebtn.is-saved { background: #fff; color: var(--brand); }
.section--brand .ph-mark { border-color: #fff; color: #fff; }
.btn { font-family: inherit; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 11px 18px; text-decoration: none; cursor: pointer; border-radius: 0; }
.btn--solid { background: #fff; color: var(--brand); border: 2px solid #fff; }
.btn--outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn--solid:hover { background: transparent; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--brand); }

/* ---- sections ---- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 16px 24px; }
.secrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.secrow h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.3px; color: var(--brand); }
.secrow .sub { font-size: 12.5px; color: var(--brand); opacity: .75; }
.section { padding: 28px 0; border-top: 1px solid var(--line-soft); }
.section:first-of-type { border-top: 0; }
.section--brand { background: var(--brand); margin-top: 8px; }
.section--brand .secrow h2, .section--brand .secrow .sub { color: #fff; }
.empty { font-size: 13px; opacity: .7; }

/* ---- card grid ---- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* carousel (This week / This month) — same card width as the grid */
.carousel { position: relative; margin-top: 20px; }
.carousel__track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-top: 4px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > .card { flex: 0 0 calc((100% - 16px) / 3); scroll-snap-align: start; }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--brand); background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.carousel__nav svg { width: 20px; height: 20px; }
.carousel__nav--prev { left: -14px; }
.carousel__nav--next { right: -14px; }
.carousel__nav[hidden] { display: none; }
@media (max-width: 900px) { .carousel__track > .card { flex: 0 0 calc((100% - 8px) / 2); } }
@media (max-width: 560px) { .carousel__track > .card { flex: 0 0 85%; } }
/* Mobile: no arrows (native swipe), like the homepage carousels */
@media (max-width: 749px) { .carousel__nav { display: none; } }
/* Centred CTA under a section (e.g. View all listings below Beyond) */
.section__cta { margin-top: 28px; display: flex; justify-content: flex-start; }

.card { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-3px); }
/* Whole card is clickable: an overlay link covers it; the Save-date button and
   ticket link sit above it so they stay usable. */
.card__link { position: absolute; inset: 0; z-index: 1; }
.card__ticket, .savebtn { position: relative; z-index: 2; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--brand-tint); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.ph-mark { border: 2px solid var(--brand); color: var(--brand); padding: 6px 12px; font-weight: 700; font-size: 15px; letter-spacing: -.3px; opacity: .55; }
.card__badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1; padding: 4px 9px; }
.badge--cat { background: var(--brand); color: #fff; }
.badge--live { background: var(--red); color: #fff; }
.badge--live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.card__meta { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 12.5px; flex-wrap: wrap; }
.card__date { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--brand); }
.card__date svg { width: 14px; height: 14px; flex: none; }
.card__wx { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 3px 9px; font-size: .82em; font-weight: 600; }
.card__wx:empty { display: none; }
.card__ticket { display: inline-flex; align-items: center; border: 1px solid var(--brand); color: var(--brand); padding: 3px; }
.card__ticket svg { width: 14px; height: 14px; }
.card__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.22; letter-spacing: -.3px; color: var(--brand); }
.card__title a { text-decoration: none; }
.card__desc { margin: 0 0 12px; font-size: 12.5px; font-weight: 400; color: var(--brand); line-height: 1.5; flex: 1; }
.card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.savebtn { font-family: inherit; text-transform: uppercase; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border: 1px solid var(--brand); background: #fff; color: var(--brand); cursor: pointer; }
.savebtn:hover { background: var(--brand-tint); }
.savebtn.is-saved { background: var(--brand); color: #fff; }
.savebtn svg { width: 16px; height: 16px; }

/* ---- reduced (strips) ---- */
.card--sm .card__body { padding: 11px 13px 13px; }

/* ---- festival page ---- */
.fp { max-width: 1440px; margin: 0 auto; padding: 24px; }
.crumb { font-size: 12.5px; margin: 0 0 16px; color: var(--brand); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.crumb a { text-decoration: none; color: var(--brand); }
.crumb a:hover { text-decoration: underline; }
.crumb__sep { opacity: .4; margin: 0 4px; }
.crumb [aria-current] { opacity: .6; }
.fp__hero { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.fp__media { position: relative; aspect-ratio: 3 / 2; background: var(--brand-tint); overflow: hidden; border: 1px solid var(--line); }
.fp__media img { width: 100%; height: 100%; object-fit: cover; }
.fp__eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.fp__date { display: inline-flex; align-items: center; gap: 8px; }
.fp__eyebrow svg { width: 16px; height: 16px; flex: none; }
.fp__eyebrow .card__wx { flex: none; }
.fp__title { margin: 0 0 10px; font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -1px; line-height: 1.08; }
.fp__facts { display: flex; flex-direction: column; gap: 10px; font-size: 15px; margin: 0 0 18px; }
.fp__facts .row { display: flex; align-items: center; gap: 8px; }
.fp__facts .row svg { width: 18px; height: 18px; flex: none; }
.fp__facts .card__wx { flex: none; }
.fp__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fp__actions a, .fp__actions button { font-family: inherit; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 9px 14px; border: 1px solid var(--brand); background: #fff; color: var(--brand); text-decoration: none; cursor: pointer; }
.fp__actions a:hover, .fp__actions button:hover { background: var(--brand-tint); }
.fp__actions svg { width: 16px; height: 16px; flex: none; }
.fp__body { margin: 32px 0 0; font-size: 16px; color: var(--brand); }
.fp__body h2 { color: var(--brand); font-size: 20px; }

/* ---- FAQ ---- */
.faq { margin: 32px 0 0; }
.faq h2 { color: var(--brand); font-size: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--brand); list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq .ans { margin: 10px 0 0; color: var(--brand); font-size: 15px; }
.card__wx svg { width: 13px; height: 13px; flex: none; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--brand); margin-top: 48px; color: var(--brand); }
.footer__inner { max-width: 1440px; margin: 0 auto; padding: 28px 24px; display: flex; align-items: center; justify-content: flex-start; gap: 24px; flex-wrap: wrap; text-align: left; }
.footer__news-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.footer__form { display: flex; gap: 8px; }
.footer__form input { font-family: inherit; border: 2px solid var(--brand); padding: 9px 12px; font-size: 14px; color: var(--brand); background: #fff; min-width: 220px; }
.footer__form input::placeholder { color: var(--brand); opacity: .5; }
.footer__form button { font-family: inherit; border: 2px solid var(--brand); background: var(--brand); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; padding: 9px 16px; cursor: pointer; }
.footer__form button:hover { background: #fff; color: var(--brand); }
.footer__copy { margin: 0; font-size: 12.5px; }
.footer__copy a { text-decoration: underline; color: var(--brand); }

@media (max-width: 760px) {
  .fp__hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}
