/* ============================================================
   COMMUNITY PAGE
   Page-specific styles. The shared LOOK of the header, footer,
   buttons, .section, .eyebrow, .lead, .reveal and h2.section-title
   comes from site.css and must not be redefined here.
   ============================================================ */

/* ------------------------------------------------------------
   SHARED CHROME, RESPONSIVE. Duplicated on purpose, do not delete.

   site.css carries how the header and footer LOOK but almost none of
   how they RESPOND: it holds only two media queries (reduced-motion
   and a nav-gap tweak). Every breakpoint that collapses the nav to a
   hamburger and stacks the footer lives inside each page's own CSS
   file, so home.css, about.css, contact.css and 404.css each carry
   their own copy.

   Leave this out and the page looks perfect on a desktop and breaks
   on a phone: the desktop nav never hides, the footer never stacks,
   and the layout viewport blows out to about 835px with the whole
   page scrolling sideways. That is exactly what happened when this
   file was first written.

   Only the rules for elements THIS page actually uses are copied.
   The hero, carousel and CTA-card rules from about.css are not here
   because this page has none of those.
   ------------------------------------------------------------ */
/* 1280, not 1200: with Insights and Community added the row squashes the
   logo and wraps the CTA between about 1200 and 1250. Collapse earlier. */
@media (max-width:1439px){
  .nav-links{display:none}
  /* 3 columns, not 2. With .nav-links hidden the row is brand | Get in touch |
     hamburger. At 2 columns the hamburger was pushed onto a second row, which
     it has been doing on the live site at every width from 721 to 1200. */
  .nav{grid-template-columns:auto 1fr auto}
  .oc-btn{grid-column:3}
}
@media (max-width:980px){
  .foot-grid{grid-template-columns:1fr}
  .foot-cols{grid-template-columns:1fr 1fr}
  .foot-form{margin-top:-60px}
}
@media (max-width:720px){
  body{font-size:16px}
  .oc-btn{width:44px;height:44px}
  .section{padding:68px 0}
  .nav-git{display:none}
  .foot-cols{grid-template-columns:1fr}
  .foot-form{margin-top:-104px}
  .foot-tagline{font-size:2.5rem}
}


/* ---------- hero ----------
   Same green panel as /about/. The right-hand slot carries the organisations
   embossed into the green rather than a photo, because no single photo covers
   a festival, an ultra, a cricket club, a park and an opera company. */
.comm-hero{
  position:relative;
  background:
    url("/assets/images/hz-yellow.png") right -40px bottom -30px / clamp(620px,66vw,1040px) auto no-repeat,
    url("/assets/images/website-flat.jpg") center/cover var(--green);
  border-radius:0 0 36px 36px;
  padding:clamp(96px,10vh,116px) 0 0;
  overflow:hidden;
}
.comm-hero .wrap{max-width:1320px;padding-inline:clamp(24px,4vw,80px)}
.comm-hero-inner{
  display:grid;grid-template-columns:1fr minmax(0,560px);
  align-items:end;gap:clamp(20px,4vw,56px);
  min-height:min(34vh,300px);
}
.comm-hero-lead{padding-bottom:clamp(26px,4vh,46px)}
.comm-hero-lead .eyebrow{color:var(--purple);margin-bottom:14px}
.comm-hero-lead h1{
  font-size:clamp(2.6rem,7.4vw,5.4rem);line-height:.98;letter-spacing:-.02em;
  color:var(--purple);text-transform:uppercase;
}
/* White marks, not the tone-on-tone emboss: green-on-green was too quiet to
   read. A purple set is kept alongside as community-orgs-emboss-purple.webp,
   but purple fights the COMMUNITY headline, so white is the one in use. */
.comm-hero-orgs{
  align-self:end;width:100%;height:auto;display:block;
  margin-bottom:clamp(10px,2vh,26px);
  opacity:.9;
}
@media(max-width:900px){
  .comm-hero-inner{grid-template-columns:1fr;min-height:0;gap:18px}
  .comm-hero-orgs{max-width:460px;margin:0 auto clamp(16px,3vh,30px)}
}

/* ---------- Brodstock feature ---------- */
.feature-grid{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:clamp(28px,4.5vw,64px);align-items:center;
}
.feature-photo img{
  width:100%;height:auto;display:block;
  border-radius:var(--radius-lg);box-shadow:var(--shadow-md);
}
.feature-text .section-title{margin-top:.4rem}
.feature-text p{color:var(--slate);line-height:1.62;margin:0 0 1rem}
.feature-text a{color:var(--green-deep);font-weight:700}
.feature-flag{
  background:var(--bg-alt);border-left:3px solid var(--green);
  border-radius:0 var(--radius) var(--radius) 0;
  padding:16px 20px;margin-top:1.3rem !important;
}
.feature-flag b{color:var(--purple)}
@media(max-width:900px){.feature-grid{grid-template-columns:1fr}}

/* ---------- video facade ----------
   A poster plus a play button, NOT a live <iframe>. The Vimeo player is
   only fetched on click, so the page loads with zero third-party player
   JS. The aspect-ratio is fixed on the shell, so swapping the poster for
   the iframe shifts nothing. Posters are our own WebP files, downloaded
   from Vimeo and re-encoded at display size, so nothing hotlinks a CDN. */
.vid{
  position:relative;width:100%;aspect-ratio:16/9;
  border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:var(--shadow-md);background:var(--purple-deep);
}
.vid.vid-portrait{aspect-ratio:9/16;max-width:300px}
.vid-btn{
  position:absolute;inset:0;width:100%;height:100%;
  padding:0;border:0;background:none;cursor:pointer;display:block;
  -webkit-tap-highlight-color:transparent;
}
.vid-btn img{width:100%;height:100%;object-fit:cover;display:block}
.vid-btn::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(28,0,64,0) 42%,rgba(28,0,64,.72) 100%);
  transition:background .25s var(--ease);
}
.vid-play{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:74px;height:74px;border-radius:50%;
  background:var(--green);color:#fff;
  display:grid;place-items:center;z-index:2;
  transition:transform .25s var(--ease),box-shadow .25s var(--ease);
}
.vid-play svg{width:34px;height:34px;margin-left:4px}
.vid-btn:hover .vid-play,
.vid-btn:focus-visible .vid-play{transform:translate(-50%,-50%) scale(1.09)}
.vid-btn:focus-visible{outline:3px solid var(--green);outline-offset:3px}
.vid-time{
  position:absolute;top:14px;right:14px;z-index:2;
  background:rgba(28,0,64,.78);color:#fff;
  font-size:.76rem;font-weight:700;letter-spacing:.04em;
  border-radius:6px;padding:4px 8px;font-variant-numeric:tabular-nums;
}
.vid-label{
  position:absolute;left:18px;right:18px;bottom:16px;z-index:2;
  display:flex;flex-direction:column;text-align:left;
  color:rgba(255,255,255,.72);font-size:.72rem;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;
}
.vid-label b{
  color:#fff;font-size:1.02rem;letter-spacing:normal;text-transform:none;
  margin-top:3px;line-height:1.25;
}
.vid iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.vid-portrait .vid-play{width:60px;height:60px}
.vid-portrait .vid-play svg{width:27px;height:27px}
@media(max-width:720px){
  .vid-play{width:62px;height:62px}
  .vid-play svg{width:28px;height:28px}
}
/* a video inside an entry card sits left, at a readable width */
.entry-vid{margin:1.2rem 0}
.entry-vid .vid-portrait{max-width:260px}

/* ---------- stat row ---------- */
.comm-stats{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(14px,2vw,26px);margin-top:clamp(38px,5vw,60px);
}
.comm-stats .stat{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:clamp(22px,2.6vw,32px);box-shadow:var(--shadow-sm);
}
.comm-stats .s-fig{
  display:block;font-size:clamp(1.8rem,3.2vw,2.5rem);font-weight:800;
  color:var(--green);line-height:1;letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.comm-stats .s-lab{
  display:block;margin-top:10px;
  font-size:.95rem;line-height:1.4;color:var(--slate);
}
.stats-src{
  font-size:.84rem;line-height:1.55;color:var(--slate);opacity:.78;
  max-width:78ch;margin:16px 0 0;
}
.stats-src a{color:var(--green-deep);font-weight:600}
@media(max-width:860px){.comm-stats{grid-template-columns:1fr;max-width:460px;margin-inline:auto}}

/* ---------- quote ---------- */
.comm-quote{
  margin-top:clamp(34px,4.5vw,56px);
  background:var(--purple);color:#fff;
  border-radius:var(--radius-lg);padding:clamp(28px,3.6vw,44px);
  max-width:820px;
}
.comm-quote p{
  font-size:clamp(1.1rem,1.8vw,1.35rem);line-height:1.5;
  margin:.7rem 0 1.4rem;
}
.comm-quote cite{display:flex;align-items:center;gap:14px;font-style:normal}
.comm-quote cite img{
  width:52px;height:52px;border-radius:50%;object-fit:cover;display:block;flex:none;
}
.comm-quote cite span{display:flex;flex-direction:column;font-size:.92rem;line-height:1.35;color:rgba(255,255,255,.72)}
.comm-quote cite b{color:#fff;font-size:1rem}

/* ---------- split (Ultra) ---------- */
.split-grid{
  display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:clamp(28px,4.5vw,64px);align-items:center;
}
.split-text .section-title{margin-top:.4rem}
.split-text p{color:var(--slate);line-height:1.62;margin:0 0 1rem}
.split-photo img{
  width:100%;height:auto;display:block;
  border-radius:var(--radius-lg);box-shadow:var(--shadow-md);
}
@media(max-width:900px){
  .split-grid{grid-template-columns:1fr}
  .split-photo{order:-1}
}

/* ---------- entry list ---------- */
.entry-list{display:flex;flex-direction:column;gap:clamp(16px,2.2vw,26px)}
.entry{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);overflow:hidden;
  display:grid;grid-template-columns:minmax(0,.42fr) minmax(0,1fr);
}
.section.alt .entry{background:#fff}
.entry-head{
  padding:clamp(24px,2.8vw,34px);
  border-right:1px solid var(--line);
  background:linear-gradient(180deg,var(--bg-alt),#fff);
}
.entry-head .kicker{
  display:block;
  font-size:.74rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
  color:var(--green-deep);margin-bottom:10px;
}
.entry-head h3{
  font-size:clamp(1.25rem,2.1vw,1.6rem);line-height:1.18;
  color:var(--purple);letter-spacing:-.01em;margin:0;
}
.entry-body{padding:clamp(24px,2.8vw,34px)}
.entry-body p{color:var(--slate);line-height:1.62;margin:0 0 1rem;font-size:1rem}
.entry-body p:last-child{margin-bottom:0}
@media(max-width:820px){
  .entry{grid-template-columns:1fr}
  .entry-head{border-right:0;border-bottom:1px solid var(--line)}
}

/* ---------- the "needs your facts" block ----------
   Deliberately loud. This is scaffolding, and it should be impossible to
   publish by accident or mistake for finished copy. Remove the whole
   block when the entry is written. */
.gap{
  background:#fffbe6;border:1.5px solid #f0d96b;border-radius:var(--radius);
  padding:16px 18px;margin-top:1.2rem;
}
.gap.gap-solo{margin-top:0}
.gap-tag{
  display:inline-block;
  background:#8a6d00;color:#fff;
  font-size:.66rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  border-radius:999px;padding:4px 11px;margin-bottom:10px;
}
.gap p{margin:0 !important;font-size:.95rem;line-height:1.55;color:#4a3a00 !important}
.gap p b{color:#2f2400}

/* ---------- closing CTA ---------- */
.cta-box{
  background:var(--purple);color:#fff;
  border-radius:var(--radius-lg);
  padding:clamp(36px,5vw,64px);text-align:center;
}
/* No glow on this one. site.css puts a green halo under .btn-primary, which
   reads as a leftover on a flat purple panel. Scoped here so every other page
   keeps its button as it was. */
.cta-box .btn-primary{box-shadow:none}
.cta-box .btn-primary:hover{box-shadow:none;transform:translateY(-3px)}
.cta-box h2{font-size:clamp(1.6rem,3.2vw,2.4rem);line-height:1.18;margin:0 0 .8rem}
.cta-box p{
  color:rgba(255,255,255,.8);font-size:1.08rem;line-height:1.55;
  max-width:56ch;margin:0 auto 1.8rem;
}

/* A confirm-this-number block. Same shape as .gap but calmer, because the facts
   are there and only a figure needs checking. Kept for the next time this page
   needs facts filling in; nothing on the page uses them today. */
.gap.gap-check{background:#eaf4fd;border-color:#8bbfe8}
.gap.gap-check .gap-tag{background:#1d5c8f}
.gap.gap-check p{color:#123a5c !important}
.gap.gap-check p b{color:#0b2740}

/* The Lightcliffe film is DCI-ish 2048x1080, not 16:9, so it gets its own
   ratio rather than being letterboxed inside a 16:9 shell. */
.vid.vid-cinema{aspect-ratio:2048/1080}
.vid video{position:absolute;inset:0;width:100%;height:100%;display:block;background:#000}
.entry-vid.entry-vid-wide{max-width:none}
.entry-vid.entry-vid-wide .vid{max-width:none}

/* ---------- the clubs and causes ----------
   A logo is only useful if you can tell what it is and where it goes, so each
   tile carries the name and the domain underneath rather than the logo alone.
   Tiles are a fixed size so a wide wordmark and a round crest sit level. */
.org-grid{display:grid;gap:clamp(12px,1.8vw,20px);grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.org{
  display:flex;flex-direction:column;align-items:center;text-align:center;
  background:#fff;border:1.5px solid var(--line);border-radius:var(--radius-lg);
  padding:clamp(16px,2vw,22px);text-decoration:none;
  transition:border-color .25s,transform .25s var(--ease),box-shadow .25s;
}
.org:hover{border-color:var(--green);transform:translateY(-3px);box-shadow:var(--shadow-sm)}
.org img{width:100%;height:auto;max-width:190px;object-fit:contain;display:block}
.org span{
  display:flex;flex-direction:column;gap:2px;margin-top:14px;
  font-size:.92rem;font-weight:700;color:var(--purple);line-height:1.3;
}
.org span b{
  font-size:.74rem;font-weight:600;color:var(--muted);
  word-break:break-all;letter-spacing:.01em;
}
.org-note{
  margin:clamp(20px,3vw,30px) 0 0;font-size:.85rem;line-height:1.55;
  color:var(--slate);opacity:.8;max-width:76ch;
}

/* Two groups, because "we sponsor them" and "the festival we work for raises
   for them" are different claims and running them together would overstate it. */
.org-head{
  font-size:.78rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  color:var(--green-deep);margin:0 0 14px;
}
.org-grid + .org-head{margin-top:clamp(30px,4vw,44px)}
.gap + .org-head{margin-top:clamp(26px,3.4vw,38px)}
.org-lede{margin:-6px 0 16px;font-size:.95rem;color:var(--slate);max-width:70ch}

/* ---------- the projects tabs ----------
   Classic folder tabs: a white panel box with a border, and the tabs sitting on
   top of it. The live tab is white with its bottom border removed so it joins
   the box; the others are grey and sunk. That join is what makes it read as a
   tab rather than a button, and the borders are what tell people it is clickable.

   Two earlier attempts were wrong and are worth not repeating: a plain
   underline row (too quiet, nobody would click it) and a purple slab with a
   white card inside it (a frame inside a frame, which made everything look
   small).

   Every panel is the same shape: media left, text right, one result callout.
   Do not give one of them a bespoke layout. */
.comm-tabs{background:var(--bg-alt)}

.tabs{
  display:flex;flex-wrap:wrap;gap:5px;
  margin:0;padding:0 0 0 clamp(4px,1vw,14px);
  position:relative;z-index:2;
}
.tab{
  font:inherit;font-size:clamp(.88rem,1.4vw,1rem);font-weight:800;
  background:#eeeaf5;
  border:1.5px solid var(--line);
  border-top:3px solid transparent;
  border-radius:12px 12px 0 0;
  color:var(--muted, #6b5f80);
  padding:13px clamp(16px,2.2vw,30px);
  margin-bottom:-1.5px;              /* sit over the panel's top border */
  cursor:pointer;
  transition:background .18s,color .18s,border-color .18s;
  -webkit-tap-highlight-color:transparent;
}
.tab:hover{background:#f7f5fb;color:var(--purple)}
.tab:focus-visible{outline:3px solid var(--green);outline-offset:-3px}
.tab[aria-selected="true"]{
  background:#fff;
  color:var(--purple);
  border-top-color:var(--green);
  border-bottom-color:#fff;          /* the join into the panel */
  cursor:default;
}

.tab-panel{
  background:#fff;
  border:1.5px solid var(--line);
  border-radius:0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding:clamp(22px,3vw,40px);
  box-shadow:var(--shadow-sm);
}
.tab-panel[hidden]{display:none}

/* ---------- one panel shape, used by all three ---------- */
.proj{
  display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:clamp(24px,3.4vw,48px);align-items:start;
}
.proj-media .vid{box-shadow:var(--shadow-md)}
/* The Cavan Murphy panel has a screenshot where the others have a film, so it
   needs the .vid treatment without the player: same radius, same shadow, and it
   opens the site. aspect-ratio is deliberately NOT set, the image is already
   1400x739 and letting it size itself avoids cropping the hero type. */
.proj-media .proj-shot{
  display:block;border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:var(--shadow-md);background:var(--purple-deep);
  transition:transform .25s var(--ease),box-shadow .25s var(--ease);
}
.proj-media .proj-shot:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg)}
.proj-media .proj-shot img{width:100%;height:auto;display:block}
.proj-text .eyebrow{color:var(--green-deep)}
.proj-title{
  font-size:clamp(1.6rem,3.2vw,2.4rem);line-height:1.08;letter-spacing:-.022em;
  color:var(--purple);margin:.45rem 0 1rem;
}
.proj-text .lead{margin:0 0 1rem}
.proj-text p{color:var(--slate);line-height:1.62;margin:0 0 1rem}
.proj-text a{color:var(--green-deep);font-weight:700}
.proj-text a:hover{text-decoration:underline}
.proj-text .feature-flag{
  background:var(--bg-alt);border-left:3px solid var(--green);
  border-radius:0 var(--radius) var(--radius) 0;
  padding:16px 20px;margin:1.4rem 0 0 !important;
}
.proj-text .feature-flag b{color:var(--purple)}

/* extras that hang below a panel, inside the white box */
.tab-panel .comm-stats{margin-top:clamp(24px,3vw,38px)}
.tab-panel .stat{background:var(--bg-alt);border-color:var(--line)}
.tab-panel .comm-quote{max-width:none;margin-top:clamp(24px,3vw,38px)}

@media(max-width:900px){
  .proj{grid-template-columns:1fr;gap:24px}
  .proj-media{order:-1}
}
/* Wrapping is worse than scrolling here: a wrapped tab lands on a second row
   sitting BETWEEN the selected tab and the panel it is supposed to join, and the
   selected tab's white join opens onto the gap instead of the panel. One
   scrolling row keeps every tab attached. Five tabs with their logos measure
   about 860px, so the row scrolls below 1024px, and the trimmed padding on a
   phone is what buys the peek that shows there is more. The script scrolls the
   row to whichever tab is selected. */
@media(max-width:1023px){
  .tabs{
    padding-right:16px;
    flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;
    scrollbar-width:none;-ms-overflow-style:none;
  }
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:0 0 auto}
}
@media(max-width:640px){
  .tabs{gap:3px;padding-left:0}
  .tab{padding:11px 10px;font-size:.8rem;border-radius:10px 10px 0 0}
  .tab-panel{border-radius:0 0 var(--radius) var(--radius)}
}

/* a logo on each tab, small enough not to make the tab a card */
.tab{display:inline-flex;align-items:center;gap:9px}
.tab img{
  height:26px;width:auto;max-width:78px;object-fit:contain;display:block;
  opacity:.55;transition:opacity .18s;
}
.tab:hover img{opacity:.8}
.tab[aria-selected="true"] img{opacity:1}

/* the site credit under a project heading */
.proj-site{margin:0 0 1.1rem !important}
.proj-site a{
  display:inline-flex;flex-direction:column;gap:1px;
  background:var(--bg-alt);border:1.5px solid var(--line);border-radius:var(--radius);
  padding:10px 16px;text-decoration:none;
  font-size:1rem;font-weight:800;color:var(--purple) !important;
  transition:border-color .2s,transform .2s var(--ease);
}
.proj-site a:hover{border-color:var(--green);transform:translateY(-2px);text-decoration:none}
.proj-site a span{
  font-size:.68rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:var(--green-deep);
}
/* On a phone the logos push the three tabs onto two rows, which reads worse
   than no logos at all, so they come off and the row stays intact. */
@media(max-width:640px){
  .tab img{display:none}
  .tab{gap:0}
}
