/* ABBI Community UK website styles.
   BRAND: change the colours and fonts in :root once the ABBI brand guide is agreed.
   Everything else picks them up automatically. */
:root {
  --ink: #111111;          /* main text and dark sections */
  --paper: #ffffff;        /* page background */
  --soft: #f3f3f1;         /* light grey sections */
  --line: #d9d9d6;         /* borders */
  --muted: #555555;        /* quieter text (passes 4.5:1 on white and soft) */
  --accent: #111111;       /* buttons and links: swap for the brand colour */
  --accent-ink: #ffffff;   /* text on accent */
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px;
  --wrap: 1180px;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
.h-sm { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.small { font-size: .85rem; opacity: .85; margin-top: .6rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .8em 1.4em; border-radius: var(--radius); border: 2px solid var(--accent); font-weight: 600; text-decoration: none; font-size: .98rem; line-height: 1.2; cursor: pointer; }
.btn-dark { background: var(--accent); color: var(--accent-ink); }
.btn-dark:hover { opacity: .88; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-outline-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-outline-light:hover { background: var(--paper); color: var(--ink); }
.btn-small { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.actions.center { justify-content: center; }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); flex: none; }
#site-nav { display: flex; align-items: center; gap: 28px; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
#site-nav ul a { text-decoration: none; font-size: .96rem; }
#site-nav ul a:hover, #site-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius); padding: .45em .9em; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
@media (max-width: 880px) {
  .menu-toggle { display: inline-block; }
  #site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 12px; }
  #site-nav.open { display: flex; }
  #site-nav ul { flex-direction: column; gap: 0; }
  #site-nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
}

/* Sections */
.section { padding: 72px 0; }
.section-grey { background: var(--soft); }
.page-header { background: var(--soft); padding: 64px 0 56px; }
.page-header h1 { max-width: 20ch; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.band { padding: 64px 0; }
.band-dark { background: var(--ink); color: var(--paper); }
.band-dark .lead, .band-dark p { color: #e6e6e6; }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band-inner h2 { font-size: 1.7rem; margin-bottom: .3em; }
.band-inner p { margin: 0; }
.cta { text-align: center; padding: 88px 0; }
.cta p { max-width: 36rem; margin: 0 auto; }

/* Hero */
.hero { background: var(--soft); padding: 72px 0; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-photo .photo { aspect-ratio: 4 / 3; border-radius: var(--radius); }
@media (max-width: 880px) { .hero-inner { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 48px 0; } }

/* Photos */
.photo { width: 100%; object-fit: cover; background: #dcdcd8; }
.placeholder { display: flex; align-items: center; justify-content: center; color: #6a6a66; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; background: repeating-linear-gradient(135deg, #e2e2de 0 12px, #d9d9d5 12px 24px); }
.card-photo { aspect-ratio: 16 / 10; }
.post-photo { aspect-ratio: 16 / 9; border-radius: var(--radius); margin: 1.5rem 0; }

/* Cards and grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.card-link { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-link:hover h3 { text-decoration: underline; }
.card-body { padding: 22px 24px 26px; }
.card-body h3 { margin-bottom: .4em; }
.card-body p { color: var(--muted); }

/* Stats */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats li { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.1; }
.stat-label { color: #d6d6d6; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Events */
.event-list { display: grid; gap: 12px; }
.event-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.event-row h3 { margin: 0 0 .2em; }
.event-row h3 a { text-decoration: none; }
.event-row h3 a:hover { text-decoration: underline; }
.event-row .meta { margin: 0; }
.date-block { background: var(--ink); color: var(--paper); border-radius: var(--radius); width: 68px; padding: 10px 0; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.date-block .d { font-size: 1.7rem; font-weight: 700; }
.date-block .m { font-size: .75rem; font-weight: 600; letter-spacing: .06em; margin-top: 4px; }
.past .date-block { background: var(--muted); }
@media (max-width: 600px) { .event-row { grid-template-columns: auto 1fr; } .event-row .btn { grid-column: 1 / -1; } }
.empty-note { color: var(--muted); }
.event-page { padding: 48px 0 80px; }
.event-layout { display: grid; grid-template-columns: 1fr 360px; gap: 56px; align-items: start; }
.event-side { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; position: sticky; top: 96px; }
.event-side dl, .contact-side dl { margin: 0 0 8px; display: grid; gap: 4px; }
.event-side dt, .contact-side dt { text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; font-weight: 600; color: var(--muted); margin-top: 10px; }
.event-side dd, .contact-side dd { margin: 0; font-weight: 600; }
.past-note { background: var(--soft); border-left: 4px solid var(--ink); padding: 12px 16px; }
@media (max-width: 880px) { .event-layout { grid-template-columns: 1fr; gap: 32px; } .event-side { position: static; } }

/* Posts */
.post { padding: 48px 0 80px; }
.back { margin-bottom: 1.5rem; }
.back a { text-decoration: none; font-weight: 600; }
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--ink); font-size: 1.15rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { font: inherit; font-size: .9rem; font-weight: 600; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .45em 1.1em; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Get involved */
.donate { max-width: 760px; }
.contact { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
.contact-side { background: var(--soft); border-radius: var(--radius); padding: 28px; }
.form-embed { width: 100%; min-height: 720px; border: 1px solid var(--line); border-radius: var(--radius); }
.form-fallback { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 600; font-size: 1.08rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding: 56px 0 28px; border-top: 1px solid #3a3a3a; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer p, .site-footer li { color: #d6d6d6; font-size: .95rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-name { font-weight: 700; font-size: 1.15rem; color: var(--paper) !important; }
.footer-head { font-weight: 600; color: var(--paper) !important; margin-bottom: .6em; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid #444; margin-top: 40px; padding-top: 20px; }
.footer-legal ul { display: flex; gap: 18px; }
.footer-legal p, .footer-legal li { font-size: .85rem; margin: 0; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
