/* ==========================================================================
   CrewCall — global stylesheet
   Hand-written, no build step. Design tokens up top, then base, layout,
   components. Fonts are self-hosted (assets/fonts). Mirrors the look of the
   source site (Roboto / Roboto Slab, near-monochrome).
   ========================================================================== */

/* ---------- Fonts (variable, self-hosted) -------------------------------- */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/roboto.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/roboto-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/robotoslab.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/robotoslab-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Permanent Marker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/permanentmarker.woff2') format('woff2');
}

/* ---------- Design tokens ------------------------------------------------ */
:root {
  --ink:        #1a1a1a;   /* primary text */
  --muted:      #69727d;   /* secondary text */
  --bg:         #ffffff;
  --bg-alt:     #f9f9f9;   /* alternating section background */
  --bg-dark:    #141414;   /* header / dark sections */
  --line:       #e7e7e7;   /* hairlines, card borders */
  --accent:     #dc0804;   /* CrewCall brand red */
  --accent-ink: #ffffff;
  --discord:    #5865f2;   /* Discord blurple — Discord CTA only */

  --font-body: 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-head: 'Roboto Slab', Georgia, 'Times New Roman', serif;

  --container: 1140px;
  --gutter: 20px;
  --radius: 6px;

  --step-hero: clamp(2.4rem, 6vw, 4.2rem);
  --step-h2:   clamp(1.7rem, 3.5vw, 2.6rem);
  --step-h3:   clamp(1.2rem, 2vw, 1.5rem);
}

/* ---------- Base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-hero); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- Layout helpers ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: url('../img/header-texture.webp') center/cover no-repeat, var(--bg-dark);
  color: #fff;
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.75em 1.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--discord { background: var(--discord); border-color: var(--discord); color: #fff; }
.btn--discord:hover { background: transparent; color: var(--discord); }
.section--dark .btn--ghost { border-color: #fff; color: #fff; }
.section--dark .btn--ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Site header / nav (centered, stacked — mirrors source) ------ */
.site-header {
  background: url('../img/header-texture.webp') center/cover no-repeat, var(--bg-dark);
  color: #fff;
  border-bottom: 3px solid var(--accent);
}
.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 1.8rem 0 1.2rem;
  position: relative;
}
.site-header__logo img {
  height: clamp(64px, 9vw, 104px);
  width: auto;
}

.nav { display: flex; align-items: center; }
.nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: block;
  padding: 0.5rem 0.9rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav__item--active > .nav__link { border-color: var(--accent); background: transparent; }

/* Dropdown */
.nav__item--has-children { position: relative; }
.nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  color: var(--ink);
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav__item--has-children:hover .nav__submenu,
.nav__item--has-children:focus-within .nav__submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__submenu .nav__link { color: var(--ink); }
.nav__submenu .nav__link:hover { background: var(--bg-alt); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; width: 26px; height: 26px; }

/* ---------- Keyword strip + button row (blocks) -------------------------- */
/* Both follow the row's text alignment — see .layout--center / .layout--right. */
.pillars {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin: 0; padding: 0; list-style: none;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem;
}
.pillars li::before { content: '›'; margin-right: 0.5rem; color: var(--accent); }

.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Section heading (reduced: heading + short red accent bar) ---- */
.sec-head { margin: 0 0 1.6rem; }
.sec-head__box { display: inline-block; margin: 0; }
.sec-head__bar {
  display: block; width: 64px; height: 4px; margin-top: 0.7rem;
  background: var(--accent); border-radius: 2px;
}
.sec-head--right { text-align: right; }
.sec-head--right .sec-head__bar { margin-left: auto; }
.sec-head--center { text-align: center; }
.sec-head--center .sec-head__bar { margin-inline: auto; }

/* ---------- Page builder: rows and columns ------------------------------ */
/* One layout row = one .section band; the columns inside it sit on a
   12-column grid. Row settings (background, width, spacing, alignment) come
   from the layout field — see site/snippets/builder.php. */
.section--tight { padding: clamp(1.5rem, 3.5vw, 3rem) 0; }
.section--roomy { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section--flush { padding: 0; }

.layout {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.layout--top    { align-items: start; }
.layout--bottom { align-items: end; }
.layout__col { grid-column: span var(--span, 12); min-width: 0; }
/* Vertical rhythm between the blocks stacked inside one column */
.layout__col > * + * { margin-top: 1.5rem; }

/* Row text alignment, plus the bits that need more than `text-align` */
.layout--center { text-align: center; }
.layout--center .sec-head__bar { margin-inline: auto; }
.layout--center .pillars,
.layout--center .btn-row { justify-content: center; }
.layout--center .prose--lead { margin-inline: auto; }
.layout--right { text-align: right; }
.layout--right .sec-head__bar { margin-left: auto; }
.layout--right .pillars,
.layout--right .btn-row { justify-content: flex-end; }

/* ---------- Image + graphic blocks -------------------------------------- */
.block-figure { margin: 0; }
.block-figure__frame { position: relative; display: block; }
.block-figure img { display: block; width: 100%; height: auto; }
.block-figure--shadow img { border-radius: 6px; box-shadow: 0 14px 34px rgba(0,0,0,0.20); }
.block-figure figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }

/* Photo credit lies on the image, bottom left. Small caps plus a shadow keep
   it readable over both light and dark areas of a picture. */
.block-figure__credit {
  position: absolute;
  left: 0.8rem;
  bottom: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.block-graphic { display: flex; justify-content: center; }
.block-graphic img,
.block-graphic svg { height: auto; }
.block-graphic--small  img, .block-graphic--small  svg { width: min(180px, 55%); }
.block-graphic--medium img, .block-graphic--medium svg { width: min(300px, 78%); }
.block-graphic--large  img, .block-graphic--large  svg { width: min(460px, 92%); }

@media (max-width: 820px) {
  .layout { gap: 2rem; }
  .layout__col { grid-column: 1 / -1; }
  /* A column holding nothing but a logo drops below the copy (source layout). */
  .layout__col:has(> .block-graphic:only-child) { order: 2; }
  .sec-head--right { text-align: left; }
  .sec-head--right .sec-head__bar { margin-left: 0; }
}

/* ---------- Big decorative pull quote ----------------------------------- */
.bigquote { position: relative; margin: 0; padding-top: 2.6rem; }
.bigquote::before {
  content: '\201C'; position: absolute; top: 0.2rem; left: -0.3rem;
  font-family: Georgia, 'Times New Roman', serif; font-size: 4.5rem; line-height: 1;
  color: var(--accent);
}
.bigquote blockquote {
  margin: 0; font-family: var(--font-head); font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--ink);
}
.bigquote figcaption { margin-top: 0.5rem; font-weight: 700; color: var(--muted); }
.section--dark .bigquote blockquote { color: #fff; }

/* ---------- Landing banner image ---------------------------------------- */
.hero-banner { margin: 0; }
.hero-banner img { display: block; width: 100%; height: auto; }

/* ---------- Pull quote (attributed) ------------------------------------- */
.pullquote { margin: 0; }
.pullquote blockquote {
  margin: 0; font-family: var(--font-head); font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem); color: var(--ink);
  border-left: 4px solid var(--accent); padding-left: 1rem;
}
.pullquote figcaption { margin-top: 0.5rem; padding-left: 1rem; font-weight: 700; color: var(--muted); }

/* ---------- Cards grid (team, partners, etc.) --------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

/* ---------- Footer ------------------------------------------------------- */
.site-footer {
  background: url('../img/header-texture.webp') center/cover no-repeat, var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
  border-top: 3px solid var(--accent);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

/* Left column — red circular social icons */
.site-footer__social { display: flex; gap: 0.9rem; }
.social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.social-btn:hover { background: #fff; color: var(--accent); }
.social-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Center column — logo + tagline */
.site-footer__brand { text-align: center; }
.site-footer__brand img { height: 70px; width: auto; margin: 0 auto 0.9rem; }
.site-footer__tagline { margin: 0; color: #fff; font-style: italic; text-decoration: underline; text-underline-offset: 3px; }

/* Right column — legal links, pipe-separated */
.site-footer__legal { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 0.4rem 0; }
.site-footer__legal a:not(:last-child)::after { content: '|'; margin: 0 1rem; color: rgba(255,255,255,0.35); }
.site-footer__legal a:not(:last-child)::after { text-decoration: none; display: inline-block; }

.site-footer__copy { text-align: center; margin: 1.8rem 0 0; color: rgba(255,255,255,0.5); font-size: 0.8rem; }

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; text-align: center; gap: 1.6rem; }
  .site-footer__social { justify-content: center; }
  .site-footer__legal { justify-content: center; }
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 860px) {
  .site-header__inner { padding: 1.2rem 0; }
  .nav-toggle {
    display: block;
    position: absolute;
    top: 1.1rem;
    right: var(--gutter);
  }
  .nav { display: none; width: 100%; margin-top: 0.4rem; }
  body.nav-open .nav { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav__link { text-align: center; padding: 0.8rem; border-radius: 0; }
  .nav__item--active > .nav__link { border-color: transparent; background: rgba(255,255,255,0.1); }
  .nav__submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: transparent; color: #fff; padding: 0;
  }
  .nav__submenu .nav__link { color: rgba(255,255,255,0.8); font-weight: 500; }
  .nav__submenu .nav__link:hover { background: rgba(255,255,255,0.12); }
}

/* ==========================================================================
   Page components (phase 3)
   ========================================================================== */

/* Narrow content columns for prose/legal/faq */
.container--narrow  { max-width: 820px; }
.container--xnarrow { max-width: 560px; }

/* ---------- Prose (kirbytext output) ------------------------------------ */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 2rem; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.prose h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.prose h4 { margin-top: 1.4rem; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: currentColor; }
.prose--legal { font-size: 0.98rem; color: #33373d; }
.prose--legal h2 { font-size: 1.3rem; }
.prose--lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.prose--small { font-size: 0.95rem; }
.section--dark .prose,
.section--dark .prose--lead { color: rgba(255,255,255,0.85); }
.section--dark .prose a { color: #fff; }

/* ---------- FAQ accordion (native details/summary) ---------------------- */
.faq { margin: 0; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+'; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq__item[open] .faq__q::after { content: '\2013'; }
.faq__a { padding: 0 0 1.3rem; }

/* ---------- Team grid — CSS polaroids ----------------------------------- */
.team-grid {
  display: grid; gap: 3rem 2rem;
  grid-template-columns: repeat(3, 1fr);   /* 3 per row on desktop */
}
@media (max-width: 820px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { display: flex; flex-direction: column; align-items: center; }

/* The polaroid: white card, thick bottom margin for the handwritten name */
.polaroid {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  /* subtle warm paper tone at half saturation — close to white */
  background: linear-gradient(180deg, #faf8f5 0%, #f4f2ec 100%);
  padding: 14px 14px 0;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.12);
  transform: rotate(var(--rot, 0deg));
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
  will-change: transform;
}
.polaroid__frame { position: relative; display: block; overflow: hidden; }
.polaroid__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #ddd;
  /* "Vintage Fade" — washed out, lifted shadows */
  filter: contrast(0.88) saturate(0.8) brightness(1.1) sepia(0.22);
  transition: filter .5s ease;
}
.polaroid__img--empty { aspect-ratio: 1 / 1; }
/* slight colour gradient washed over the photo (warm top-left -> cool bottom-right) */
.polaroid__frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(158deg, rgba(255,180,90,0.20) 0%, rgba(255,255,255,0) 46%, rgba(60,110,190,0.22) 100%);
  mix-blend-mode: soft-light;
  transition: opacity .5s ease;
}
.polaroid__name {
  font-family: 'Permanent Marker', 'Comic Sans MS', cursive;
  text-align: center;
  color: #1c1c1c;
  font-size: clamp(1rem, 2.6vw, 1.3rem);   /* upper bound; JS shrinks to fit one line */
  line-height: 1.05;
  padding: 0.55em 0.3em 0.7em;
  transform: rotate(-1.5deg);
  white-space: nowrap;                     /* never wrap to a second row */
  overflow: hidden;
}
.polaroid__name-fit { display: inline-block; }
/* Rotate slightly on hover, lift and deepen the shadow */
.team-card:hover .polaroid {
  transform: rotate(var(--rot-hover, -3deg)) scale(1.03);
  box-shadow: 0 18px 36px rgba(0,0,0,0.30), 0 3px 8px rgba(0,0,0,0.16);
  z-index: 2;
}
/* hover reveals the untouched original: fade the filter and the gradient wash out */
.team-card:hover .polaroid__img { filter: none; }
.team-card:hover .polaroid__frame::after { opacity: 0; }

.team-card__body { padding: 1.2rem 0.3rem 0; width: 100%; max-width: 300px; }

/* ---------- Home "Kernteam" — small polaroids tossed on a table --------- */
.team-throw {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  row-gap: 1.4rem; padding: 0.5rem 0;
}
.mini-polaroid {
  position: relative; flex: 0 0 auto;
  width: clamp(104px, 12vw, 140px);
  margin: 0 -13px;                 /* overlap like a scattered pile */
  padding: 8px 8px 0;
  background: linear-gradient(180deg, #faf8f5 0%, #f4f2ec 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
  text-decoration: none; color: #1c1c1c;
  transform: rotate(var(--rot, 0deg)) translateY(var(--dy, 0));
  transition: transform .25s ease, box-shadow .25s ease;
}
.mini-polaroid__frame { position: relative; display: block; overflow: hidden; }
.mini-polaroid__frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(158deg, rgba(255,180,90,0.20) 0%, rgba(255,255,255,0) 46%, rgba(60,110,190,0.22) 100%);
  mix-blend-mode: soft-light;
}
.mini-polaroid img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #ddd;
  filter: contrast(0.88) saturate(0.8) brightness(1.1) sepia(0.22);
}
.mini-polaroid__name {
  display: block; text-align: center; white-space: nowrap; overflow: hidden;
  font-family: 'Permanent Marker', 'Comic Sans MS', cursive; color: #1c1c1c;
  font-size: .72rem; line-height: 1.05; padding: .38em .2em .5em;
}
.mini-polaroid:hover {
  transform: rotate(0deg) translateY(-9px) scale(1.14); z-index: 5;
  box-shadow: 0 18px 34px rgba(0,0,0,0.42);
}
.team-card__name { font-size: 1.25rem; margin: 0 0 0.1em; }
.team-card__role { font-weight: 700; color: var(--accent); margin: 0 0 0.6em; }
.team-card__meta { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.8em; }
.team-card__quote { font-style: italic; color: var(--ink); margin: 0 0 0.9em; border-left: 3px solid var(--line); padding-left: 0.8rem; }
.team-card__links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.85rem; font-weight: 700; }
.team-card__links a { color: var(--ink); text-decoration: none; }
.team-card__links a:hover { color: var(--accent); }

/* ---------- Partner grid ------------------------------------------------ */
.partner-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 1.5rem 2.5rem;
}
.partner-grid__item { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.partner-grid__item img { max-height: 120px; width: auto; object-fit: contain; }

/* ---------- Gallery + lightbox ------------------------------------------ */
.gallery {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.gallery__item { display: block; overflow: hidden; border-radius: 4px; background: var(--bg-alt); aspect-ratio: 3 / 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery__item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92); padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 3rem; line-height: 1; padding: 0.4rem 0.8rem; opacity: 0.8;
}
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 0.5rem; right: 1rem; font-size: 2.6rem; }
.lightbox__prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Membership CTA cards ---------------------------------------- */
.cta-cards { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cta-card {
  display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; text-decoration: none; color: inherit;
}
.cta-card:hover { border-color: var(--accent); }
.cta-card__title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.cta-card__desc { color: var(--muted); font-size: 0.95rem; }
.cta-card .btn { margin-top: 0.6rem; }

/* ---------- Linktree ---------------------------------------------------- */
.linktree__links { display: flex; flex-direction: column; gap: 0.8rem; }
.linktree__link { display: block; }

/* ---------- Embedded form (mitgliedsantrag) ----------------------------- */
/* The iframe's min-height is set per block (Mindesthöhe). */
.form-embed { margin: 0; }
.form-embed iframe {
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: var(--radius);
}
.form-embed__credit { margin-top: 0.5rem; color: var(--muted); }

/* ---------- Events (Termine) -------------------------------------------- */
.event-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.event__inner {
  display: grid;
  grid-template-columns: minmax(9rem, max-content) 1fr;
  gap: 0.3rem 1.6rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
a.event__inner:hover { border-color: var(--accent); }
.event__when { margin: 0; font-family: var(--font-head); font-weight: 700; }
.event__time {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}
.event__title { font-size: var(--step-h3); margin: 0 0 0.2rem; }
.event__place { margin: 0; color: var(--muted); }
.event__note { margin-top: 0.5rem; }

/* Compact: side-by-side with another module, so smaller type and less padding. */
.event-list--compact { gap: 0.6rem; }
.event-list--compact .event__inner {
  grid-template-columns: minmax(7rem, max-content) 1fr;
  gap: 0.15rem 1rem;
  padding: 0.8rem 1rem;
}
.event-list--compact .event__when { font-size: 0.95rem; }
.event-list--compact .event__title { font-size: 1.05rem; }
.event-list--compact .event__place { font-size: 0.9rem; }

/* One date column for the whole list instead of one per card: the track is
   sized to the widest date in the list, so every title starts at the same x
   whether its row carries a single day or a range. Browsers without subgrid
   keep the per-card minmax above. */
@supports (grid-template-columns: subgrid) {
  @media (min-width: 641px) {
    .event-list {
      grid-template-columns: minmax(9rem, max-content) 1fr;
      column-gap: 1.6rem;
    }
    .event-list--compact {
      grid-template-columns: minmax(7rem, max-content) 1fr;
      column-gap: 1rem;
    }
    .event,
    .event__inner { display: grid; grid-column: 1 / -1; }
    /* Matches the compact rule's specificity so the subgrid wins in both lists. */
    .event-list .event,
    .event-list .event__inner { grid-template-columns: subgrid; }
  }
}

/* Stack the date above the title once the two columns get cramped. */
@media (max-width: 640px) {
  .event__inner { grid-template-columns: 1fr; gap: 0.5rem; }
  .event__time { display: inline; margin-left: 0.5rem; }
}

.section--dark .event__inner { border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.section--dark a.event__inner:hover { border-color: #fff; }

/* ---------- News listing + posts --------------------------------------- */
.news-list { display: grid; gap: 1rem; margin: 0; }
.news-card {
  display: block;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.news-card:hover { border-color: var(--accent); }
.news-card__date { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.news-card__title { font-family: var(--font-head); font-size: var(--step-h3); margin: 0 0 0.4rem; }
.news-card__intro { margin: 0; color: var(--muted); }
.news-post__back { margin-bottom: 1.2rem; }
/* Header band and body band read as one — drop the padding that stacks up
   between them, so the post's first block sits close under the headline. */
.news-post-head { padding-bottom: 0; }
.news-post-head + .section { padding-top: clamp(1.4rem, 3vw, 2.2rem); }
.news-post .news-card__date { margin-bottom: 0.5rem; }
