/* ═══ Homepage (index.php) ════════════════════════════════════════════════
   Film first: a blurred, warm-graded video with the logo at its centre, then an
   editorial rhythm of solid ink bands and photo strips. Sizes are in px here
   (the site's rem is 10px). Colours come from css/variables.css. */

.home {
  --ink: var(--bg-page, #07070a);
  --ink-2: #111016;
  --ink-3: #19171e;
  --ivory: #f0e8da;
  --ivory-2: rgba(240, 232, 218, 0.74);
  --ivory-3: rgba(240, 232, 218, 0.56);
  --line: rgba(240, 232, 218, 0.13);
  --v2-accent: var(--accent);   /* used by sections/organisers.php's inline links */
  --f-brand: var(--font-logo, "Futura", sans-serif);
  --f-serif: "Source Serif 4", Georgia, serif;
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
}
.home *, .home *::before, .home *::after { box-sizing: border-box; }
.home img, .home video { display: block; max-width: 100%; }
.home p { margin: 0; }
.home h1, .home h2, .home h3 { margin: 0; text-wrap: balance; font-weight: 600; text-transform: none; letter-spacing: 0; text-align: left; }
.home a { color: inherit; }
.home :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home .wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.home .label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-secondary); }
.home .serif-h { font-family: var(--f-serif); font-size: clamp(32px, 3vw + 16px, 50px); line-height: 1.1; }
.home .band { padding-block: 112px; }
.home .band--raised { background: var(--ink-2); }

/* Buttons */
.home .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.home .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 32px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: 13.5px; letter-spacing: 0.14em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s; }
.home .btn--fill { background: var(--btn-bg); color: var(--text-on-accent, #07070a); }
.home .btn--fill:hover { background: var(--btn-bg-hover); }
.home .btn--line { border: 1px solid rgba(240, 232, 218, 0.45); color: var(--ivory); }
.home .btn--line:hover { border-color: var(--ivory); background: rgba(240, 232, 218, 0.07); }

/* ── Hero: the film, blurred and warm, logo at the centre ── */
.home-hero { position: relative; isolation: isolate; min-height: min(92svh, 920px); display: grid; align-items: center; overflow: hidden; background: #000; }
.home-hero video { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(28px) saturate(0.55) brightness(0.85) contrast(1.12); transform: scale(1.18); z-index: 0; }
/* Warm grade: red into amber, laid on as colour so the movement still shows */
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: color; opacity: 0.88;
  background: linear-gradient(125deg, #c2362f 0%, #d9643a 40%, #e39a4a 70%, #7a1e2a 100%); }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
  radial-gradient(ellipse at 50% 45%, rgba(4, 5, 9, 0) 0%, rgba(4, 5, 9, 0.35) 70%, rgba(4, 5, 9, 0.7) 100%),
  linear-gradient(to top, rgba(4, 5, 9, 0.6) 0%, rgba(4, 5, 9, 0) 35%); }
.home-hero__in { position: relative; z-index: 3; width: 100%; padding-block: 72px; display: grid; gap: 24px; justify-items: center; text-align: center; }
.home-hero__logo { width: clamp(150px, 19vw, 260px); height: auto; margin-bottom: 12px; }
.home .home-hero__brand { font-family: var(--f-brand); font-weight: 700; font-size: clamp(48px, 8.4vw, 134px); line-height: 0.9; letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap; text-align: center; color: var(--ivory); }
.home-hero__words { display: grid; gap: 12px; justify-items: center; max-width: 36em; }
.home-hero__line { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 1.6vw + 16px, 35px); line-height: 1.2; }
.home-hero__pos { color: var(--ivory-2); font-size: 17px; }
.home-hero .btns { justify-content: center; margin-top: 8px; }

/* ── Who we are ── */
.home-statement { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; }
.home-statement__label { grid-column: 1 / -1; }
.home-statement__text { grid-column: 1 / span 8; font-family: var(--f-serif); font-size: clamp(27px, 2.4vw + 16px, 48px); line-height: 1.18; }
.home-statement__text em { font-style: italic; color: var(--text-primary); }
.home-statement__side { grid-column: 10 / span 3; color: var(--ivory-2); display: grid; gap: 16px; }
.home-statement__side .btn { justify-self: start; }

/* ── Coming up (filled by js/next-event.js) ── */
.home-up__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.home-up__head > div { display: grid; gap: 16px; }
.home #nextEventStatus { color: var(--ivory-2); }
.home #nextEventStatus a { color: var(--text-primary); text-decoration-color: var(--accent); text-underline-offset: 0.3em; }
.home .nx-dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.home .nx-dates li { display: grid; margin: 0; border-bottom: 1px solid var(--line); }
.home .nx-dates li:nth-child(even) { border-left: 1px solid var(--line); }
.home .nx-date-row { height: 100%; display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 32px 24px; text-decoration: none; transition: background .2s; }
.home .nx-dates li:nth-child(odd) .nx-date-row { padding-left: 0; }
.home .nx-date-row:hover { background: rgba(240, 232, 218, 0.03); }
.home .nx-date-row__date { display: grid; gap: 6px; line-height: 0.9; }
.home .nx-date-row__day { font-family: var(--f-brand); font-weight: 700; font-size: clamp(48px, 2vw + 32px, 67px); }
.home .nx-date-row__mon { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; color: var(--text-secondary); }
.home .nx-date-row__info { display: grid; gap: 4px; min-width: 0; }
.home .nx-date-row__wd { font-family: var(--f-serif); font-size: 21px; line-height: 1.3; }
.home .nx-date-row__meta { color: var(--ivory-3); font-size: 14.5px; }
.home .nx-date-row__tag { padding: 4px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(240, 232, 218, 0.1); color: var(--ivory); }
.home .nx-foot { display: none; }   /* the section's own "All events" button does this job */

/* ── About the practice ── */
.home-practice { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.home-practice__media { grid-column: 1 / span 5; }
.home-practice__text { grid-column: 7 / span 6; display: grid; gap: 24px; color: var(--ivory-2); }
.home-practice__text h2 { font-family: var(--f-brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; font-size: clamp(38px, 3vw + 16px, 61px); line-height: 0.95; color: var(--ivory); }
.home-practice__text strong { color: var(--ivory); font-weight: 600; }

/* Carousel */
.carousel { position: relative; }
.carousel__slides { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); touch-action: pan-y; }
.carousel__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.9s ease; }
.carousel__slide.is-on { opacity: 1; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.carousel__btn { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ivory); font: 400 24px/1 var(--f-sans); cursor: pointer; transition: border-color .2s, color .2s; }
.carousel__btn:hover { border-color: var(--accent); color: var(--accent); background: none; }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dots button { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carousel__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ivory-3); transition: background .2s, transform .2s; }
.carousel__dots button[aria-current="true"]::before { background: var(--accent); transform: scale(1.3); }

/* ── The Nest: words, then a strip of photographs ── */
.home-nest__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; margin-bottom: 48px; }
.home-nest__title { grid-column: 1 / span 5; display: grid; gap: 16px; }
.home-nest__title h2 { font-family: var(--f-brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; font-size: clamp(38px, 3vw + 16px, 61px); line-height: 0.95; }
.home-nest__desc { grid-column: 7 / span 6; color: var(--ivory-2); font-size: 18.5px; }
.home-nest__desc a { color: var(--text-primary); text-decoration-color: var(--accent); text-underline-offset: 0.3em; }
.home-strip { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 30vw, 440px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-left: max(var(--gut), calc((100vw - var(--wrap)) / 2 + 16px)); padding-right: var(--gut-r); scrollbar-width: none; }
.home-strip::-webkit-scrollbar { display: none; }
.home-strip figure { margin: 0; scroll-snap-align: start; aspect-ratio: 3 / 4; overflow: hidden; }
.home-strip a { display: block; height: 100%; }
.home-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.home-strip figure:hover img { transform: scale(1.04); }
.home-strip__hint { margin-top: 12px; font-size: 12.5px; color: var(--ivory-3); letter-spacing: 0.04em; }

/* ── Hosts (sections/organisers.php, restyled) ── */
.home .v2-organisers { padding-block: 112px; background: var(--ink); border-top: 0; }
.home .v2-organisers__inner { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.home .v2-organisers__header { display: grid; gap: 16px; margin-bottom: 48px; }
.home .v2-organisers__eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-secondary); margin: 0; }
.home .v2-organisers__title { font-family: var(--f-serif); font-size: clamp(32px, 3vw + 16px, 50px); line-height: 1.1; color: var(--ivory); }
.home .v2-organisers__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; }
.home .v2-organiser { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 32px; align-items: start; }
.home .v2-organiser__img { width: 140px; height: 170px; border-radius: 0; overflow: hidden; }
.home .v2-organiser__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.home .v2-organiser__pronoun { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 4px; }
.home .v2-organiser__name { font-family: var(--f-brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 26px; line-height: 1; color: var(--ivory); margin: 0 0 6px; }
.home .v2-organiser__role { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ivory-3); margin: 0 0 14px; }
.home .v2-organiser__bio { font-size: 16.5px; line-height: 1.7; color: var(--ivory-2); margin: 0; }

/* ── You belong here: copy and flag unchanged ── */
.home-pride { display: flex; align-items: center; gap: clamp(32px, 5vw, 64px); max-width: 900px; }
.home-pride__flag { flex-shrink: 0; width: clamp(80px, 10vw, 112px); border-radius: 3px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
.home-pride__flag img { width: 100%; height: auto; }
.home-pride__copy { display: grid; gap: 16px; }
.home-pride__copy h2 { font-family: var(--f-serif); font-size: clamp(30px, 2.2vw + 16px, 42px); line-height: 1.1; }
.home-pride__copy p:last-child { color: var(--ivory-2); font-size: 18px; max-width: 36em; }

/* ── FAQ ── */
.home-faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.home-faq__head { grid-column: 1 / span 4; display: grid; gap: 16px; align-content: start; }
.home-faq__head p:last-child { color: var(--ivory-2); }
.home-faq__head a { color: var(--text-primary); text-decoration-color: var(--accent); text-underline-offset: 0.25em; }
.home-faq__items { grid-column: 6 / span 7; border-top: 1px solid var(--line); }
.home-faq__items details { border-bottom: 1px solid var(--line); }
.home-faq__items summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; font-family: var(--f-serif); font-size: 19px; }
.home-faq__items summary::-webkit-details-marker { display: none; }
.home-faq__items summary::after { content: "+"; font-family: var(--f-sans); font-size: 22px; color: var(--accent); transition: transform .2s; }
.home-faq__items details[open] summary::after { transform: rotate(45deg); }
.home-faq__items summary:hover { color: var(--accent); }
.home-faq__items .ans { padding: 0 0 24px; color: var(--ivory-2); max-width: 38em; }
.home-faq__items .ans a { color: var(--text-primary); text-decoration-color: var(--accent); }

/* ── Join ── */
.home-join { background: var(--ink-3); }
.home-join__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; padding-block: 112px; }
.home-join__text { grid-column: 1 / span 7; display: grid; gap: 24px; }
.home-join__text h2 { font-family: var(--f-brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(42px, 5vw + 16px, 83px); line-height: 0.92; }
.home-join__text p { color: var(--ivory-2); max-width: 34em; }
.home-join__contact { grid-column: 9 / span 4; display: grid; gap: 12px; padding: 32px; border: 1px solid var(--line); }
.home-join__mail { font-family: var(--f-serif); font-size: 21px; user-select: all; word-break: break-all; }
.home-join__mail a { text-decoration: none; }

/* ── Tablet ── */
@media (max-width: 1060px) {
  .home-statement__text, .home-statement__side, .home-practice__media, .home-practice__text, .home-nest__title, .home-nest__desc, .home-faq__head, .home-faq__items, .home-join__text, .home-join__contact { grid-column: 1 / -1; }
  .carousel__slides { aspect-ratio: 16 / 10; }
  .home .v2-organisers__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 900px) {
  .home-hero { min-height: 82svh; }
}
/* ── Phone ── */
@media (max-width: 640px) {
  .home .band, .home .v2-organisers { padding-block: 72px; }
  .home .nx-dates { grid-template-columns: minmax(0, 1fr); }
  .home .nx-dates li:nth-child(even) { border-left: 0; }
  .home .nx-date-row, .home .nx-dates li:nth-child(odd) .nx-date-row { grid-template-columns: 96px minmax(0, 1fr) auto; padding: 24px 0; }
  .home .v2-organiser { grid-template-columns: 104px minmax(0, 1fr); gap: 24px; }
  .home .v2-organiser__img { width: 104px; height: 128px; }
  .home-pride { flex-direction: column; align-items: flex-start; gap: 24px; }
  .home-pride__flag { width: 72px; }
  .home-hero .btn { flex: 1 1 100%; }
  .home-strip { grid-auto-columns: 78vw; }
  .home-join__in { padding-block: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel__slide, .home-strip img, .home .btn { transition: none; }
}
