/* site-refine.css — unifying design layer.
   Loaded LAST so it overrides earlier CSS.

   Goals:
   - Smooth scrolling globally
   - Consistent horizontal gutters (nav, hero, every section share the same edges)
   - Hero flush left, no max-width centering
   - Calm editorial rhythm: all section heads left-aligned, same spacing scale
   - Replace cinematic three-card scroll-runway with a clean three-image gallery
   - Tighter, more breathing-aware section gaps
*/

/* ---------- 1. Smooth scroll + body baseline ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  overflow-x: hidden;
  background: var(--bg-1);
}

/* Shared horizontal gutters — single source of truth */
:root {
  --gutter: 16px;
  --section-y: 96px;
  --section-y-tight: 64px;
}
@media (min-width: 720px)  { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; --section-y: 128px; } }

/* ---------- 2. Nav alignment ---------- */
.gfm-nav {
  padding: 12px var(--gutter);
  border-bottom: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}
.gfm-nav .gfm-links { gap: 22px; }
.gfm-nav .gfm-links .nav-link { color: var(--fg-1); }
.gfm-nav .gfm-links .nav-link.is-active {
  color: var(--color-brand-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- 3. Hero — flush left, no centering ---------- */
.gfm-hero,
.gfm-hero-light {
  background: var(--bg-1);
  color: var(--fg-1);
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(28px, 4vw, 64px);
  max-width: none;
  margin: 0;
  display: block;
}
.gfm-hero .gfm-hero-inner,
.gfm-hero-light .gfm-hero-inner {
  max-width: 1200px;
  margin: 0;
  padding-left: clamp(16px, 5vw, 80px); /* shift slightly right */
  align-items: flex-start;
  text-align: left;
  gap: 24px;
}
.gfm-hero-title,
.gfm-hero-light .gfm-hero-title {
  text-align: left;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 20ch;
  color: var(--fg-1);
  margin: 0;
}
.gfm-hero-globe {
  display: inline-block;
  font-size: 0.92em;
  vertical-align: -0.02em;
  margin-right: 0.06em;
}
/* kill any rotation animation */
.gfm-hero-globe svg { animation: none !important; }

/* ---------- 4. Section scaffolding — unified rhythm ---------- */
.gfm-section,
.gfm-section-narrow,
.gfm-section-wide {
  max-width: none;
  margin: 0;
  padding: var(--section-y) var(--gutter);
}
.gfm-section { max-width: 1440px; margin: 0 auto; }

/* Section heads — centered (default site rhythm) */
.gfm-shead,
.gfm-stack-center {
  text-align: center;
  align-items: center;
  max-width: 720px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gfm-shead h2,
.gfm-stack-center h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 600;
  max-width: 32ch;
}
.gfm-shead p { font-size: 18px; color: var(--fg-2); line-height: 1.55; text-align: center; }

/* Wide variant — for headings with inline media (Zeugnisse) */
.gfm-stack-center--wide { max-width: 1100px; }
.gfm-stack-center--wide h2 { max-width: none; }

/* ---------- 5b. Unsere Projekte — editorial 2-card grid ---------- */
.gfm-projects {
  padding: clamp(80px, 9vw, 140px) var(--gutter) clamp(80px, 9vw, 120px);
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
}
.gfm-pj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 2.4vw, 40px);
  margin-top: clamp(36px, 4vw, 56px);
}
@media (max-width: 880px) {
  .gfm-pj-grid { grid-template-columns: 1fr; }
}
.gfm-pj {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gfm-pj:hover { transform: translateY(-4px); }
.gfm-pj-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #1a1816;
  isolation: isolate;
  box-shadow: 0 30px 70px -40px rgba(20,16,10,0.35);
}
.gfm-pj-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
  z-index: 0;
}
.gfm-pj:hover .gfm-pj-media img {
  transform: scale(1.06);
  filter: saturate(1.05);
}
.gfm-pj-glaze {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(0deg, rgba(20,16,10,0.20), rgba(20,16,10,0.20));
  pointer-events: none;
}
.gfm-pj-meta {
  position: absolute; top: 18px; left: 18px; right: 18px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  color: rgba(255,255,255,0.95);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.gfm-pj-meta-row { display: inline-flex; align-items: center; gap: 8px; }
.gfm-pj-pin {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.gfm-pj-meta-num {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
}
.gfm-pj-tags {
  position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 2;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.gfm-pj-tag {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #1a1816;
  font: 500 12px/1 var(--font-sans, system-ui);
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.25);
}
.gfm-pj-foot {
  padding: 28px 4px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.gfm-pj-title {
  margin: 0;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--fg-1, #1a1816);
}
.gfm-pj-blurb {
  margin: 0;
  color: var(--fg-2, #5a544a);
  font-size: 16px;
  line-height: 1.55;
  max-width: 56ch;
}
.gfm-pj-cta {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--fg-1, #1a1816);
  border-bottom: 1px solid currentColor;
  padding-bottom: 6px;
  align-self: flex-start;
  transition: gap 280ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms ease;
}
.gfm-pj:hover .gfm-pj-cta { gap: 16px; color: var(--color-brand-primary, #6e1f1f); }
.gfm-pj-cta svg { transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1); }
.gfm-pj:hover .gfm-pj-cta svg { transform: translateX(2px); }

/* ---------- 5c. Aus dem Feld — editorial marquee (legacy, kept for /projekte) ---------- */
.gfm-feld {
  padding: clamp(80px, 9vw, 140px) 0 clamp(80px, 9vw, 120px);
  background: var(--bg-1, #fff);
  position: relative;
  overflow: hidden;
}
.gfm-feld-marquee {
  position: relative;
  margin-top: clamp(36px, 4vw, 56px);
  /* full bleed */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}
.gfm-feld-track {
  display: flex;
  gap: clamp(20px, 2.2vw, 36px);
  width: max-content;
  padding: 24px clamp(16px, 3vw, 48px);
  animation: gfm-feld-scroll 70s linear infinite;
  will-change: transform;
}
@keyframes gfm-feld-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.gfm-feld-frame {
  flex: none;
  width: clamp(260px, 26vw, 380px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  transform: translateY(20px);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gfm-feld-frame:nth-child(odd)  { transform: translateY(0); }
.gfm-feld-frame:nth-child(even) { transform: translateY(40px); }
.gfm-feld-frame--tall .gfm-feld-img { aspect-ratio: 3 / 4; }
.gfm-feld-img {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1816;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 30px 60px -30px rgba(0,0,0,0.35);
}
.gfm-feld-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
}
.gfm-feld-frame:hover .gfm-feld-img img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.05);
}
.gfm-feld-stamp {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  display: flex; justify-content: space-between; align-items: baseline;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
  pointer-events: none;
}
.gfm-feld-no  { padding: 4px 8px; background: rgba(255,255,255,0.14); backdrop-filter: blur(4px); border-radius: 999px; }
.gfm-feld-loc { font-weight: 500; }
.gfm-feld-caption {
  font: italic 400 16px/1.45 var(--font-serif, Georgia, "Times New Roman", serif);
  color: var(--fg-2, #4a463f);
  letter-spacing: -0.005em;
  padding: 0 2px;
  text-wrap: pretty;
}
/* edge fades for cinematic feel */
.gfm-feld-edge {
  position: absolute; top: 0; bottom: 0; width: clamp(40px, 8vw, 120px);
  pointer-events: none; z-index: 2;
}
.gfm-feld-edge--l { left: 0;  background: linear-gradient(to right, var(--bg-1, #fff), transparent); }
.gfm-feld-edge--r { right: 0; background: linear-gradient(to left,  var(--bg-1, #fff), transparent); }
.gfm-feld-marquee:hover .gfm-feld-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .gfm-feld-track { animation: none; }
  .gfm-feld-marquee { overflow-x: auto; scroll-snap-type: x mandatory; }
  .gfm-feld-frame { scroll-snap-align: start; }
}
@media (max-width: 720px) {
  .gfm-feld-frame:nth-child(even) { transform: translateY(20px); }
  .gfm-feld-frame { width: 220px; }
}
.gfm-showcase-wrap {
  padding: 0 28px 0;
  max-width: none;
  margin: 0;
}

/* Header CTA — Spenden button gets a soft drop shadow */
.gfm-nav-cta .btn-primary {
  box-shadow: 0 8px 20px -6px rgba(91, 20, 20, 0.45), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: box-shadow 220ms ease, transform 220ms ease, background-color 220ms ease;
}
.gfm-nav-cta .btn-primary:hover {
  box-shadow: 0 12px 28px -8px rgba(91, 20, 20, 0.55), 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.gfm-nav-cta .btn-primary:active {
  box-shadow: 0 4px 10px -4px rgba(91, 20, 20, 0.5), 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

/* ---------- 6. Mission statement — centered ---------- */
.gfm-mission-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-7);
}
.gfm-mission-badge { transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1); }
.gfm-mission {
  text-align: center;
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 550;
  text-wrap: balance;
}
/* longer official mission copy — smaller, wider measure for readability */
.gfm-mission-scroll {
  max-width: 30ch;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.28;
  letter-spacing: -0.025em;
}

/* Mission scroll-reveal — per-word opacity animation */
.gfm-mission-scroll .gfm-mw {
  display: inline-block;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
  color: var(--fg-1);
}
.gfm-mission-scroll .gfm-mw.accent {
  color: var(--color-brand-primary);
}

/* ---------- 7. Areas grid — neat, denser (5 cards: 3 + 2 centered) ---------- */
.gfm-areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}
.gfm-area {
  flex: 1 1 320px;
  max-width: 380px;
  background: var(--bg-2);
  padding: 32px;
  min-height: 240px;
  border-radius: 20px;
  transition: transform 350ms cubic-bezier(0.22,1,0.36,1), box-shadow 350ms ease;
}
.gfm-area:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}
.gfm-area h3 { font-size: 22px; }

/* ---------- 8. Banner image grid ---------- */
.gfm-banner {
  max-width: none;
  padding: 0;
}

/* ---------- 9. Video band — calmer ---------- */
.gfm-video-band {
  max-width: 1440px;
  padding: 0 var(--gutter) var(--section-y);
}

/* ---------- 10b. Donation block — LIGHT variant (centered, black card) ---------- */
.gfm-donate.gfm-donate--light {
  background: var(--bg-1, #fff);
  color: var(--fg-1, #111);
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
.gfm-donate.gfm-donate--light .gfm-donate-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(80px, 9vw, 140px) var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.gfm-donate.gfm-donate--light .gfm-donate-title {
  margin: 24px auto 64px;
  max-width: 22ch;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--fg-1, #111);
  text-wrap: balance;
}
.gfm-donate.gfm-donate--light .gfm-donate-card {
  width: 100%;
  max-width: 980px;
  background: #0e0d0c;
  color: #fff;
  border-radius: 28px;
  padding: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: clamp(28px, 3.5vw, 56px);
  text-align: left;
  border: 0;
}
.gfm-donate.gfm-donate--light .gfm-donate-icon {
  width: 64px; height: 64px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: flex-start; justify-content: flex-start;
  color: #fff;
  flex: none;
}
.gfm-donate.gfm-donate--light .gfm-donate-icon svg { width: 44px; height: 44px; }
.gfm-donate.gfm-donate--light .gfm-donate-method {
  margin: 0 0 24px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.gfm-donate.gfm-donate--light .gfm-donate-lines {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.92);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-feature-settings: "tnum";
}
.gfm-donate.gfm-donate--light .gfm-donate-note {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  max-width: 56ch;
}
@media (max-width: 720px) {
  .gfm-donate.gfm-donate--light .gfm-donate-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- 10. Donation (legacy dark) — full-bleed band ---------- */
.gfm-donate:not(.gfm-donate--light) {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
.gfm-donate-inner {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- 11. Testimonials, About, FAQ — unified container ---------- */
.gfm-testimonials,
.gfm-about,
.gfm-faq-section {
  max-width: 1440px;
}

/* ---------- FAQ — live-site look (pill rows, plain plus icon) ---------- */
.gfm-faq-list { gap: 14px !important; max-width: none !important; }
.gfm-faq-item {
  background: var(--bg-2) !important;
  border-radius: 28px !important;
  border: 1px solid transparent !important;
  overflow: hidden;
  transition: background 260ms ease, border-color 260ms ease;
}
.gfm-faq-item:hover { background: color-mix(in oklab, var(--bg-2) 88%, #000 4%) !important; }
.gfm-faq-item.is-open {
  background: var(--bg-2) !important;
  border-color: transparent !important;
}
/* Open: top of card (trigger) becomes white, bottom (body) stays grey */
.gfm-faq-item.is-open .gfm-faq-trigger {
  background: var(--color-white) !important;
  border-bottom: 1px dashed color-mix(in oklab, var(--fg-2) 28%, transparent) !important;
}
.gfm-faq-trigger {
  padding: 22px 28px !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  gap: 24px !important;
  align-items: center !important;
  line-height: 1.4 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-bottom-color: transparent !important;
  transition: background 260ms ease, border-color 260ms ease;
}
.gfm-faq-trigger > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
/* Replace circle icon with a plain thin plus that rotates to × when open */
.gfm-faq-icon {
  width: 22px !important;
  height: 22px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  position: relative;
  flex: none;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gfm-faq-icon::before,
.gfm-faq-icon::after {
  background: var(--fg-1) !important;
  border-radius: 2px !important;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}
.gfm-faq-icon::before { width: 16px !important; height: 1.8px !important; }
.gfm-faq-icon::after  { width: 1.8px !important; height: 16px !important; }
.gfm-faq-item.is-open .gfm-faq-icon { transform: rotate(45deg); background: transparent !important; }
.gfm-faq-item.is-open .gfm-faq-icon::before,
.gfm-faq-item.is-open .gfm-faq-icon::after { background: var(--fg-1) !important; opacity: 1 !important; display: block !important; transform: translate(-50%, -50%) !important; }
.gfm-faq-body {
  padding: 22px 28px 24px !important;
  color: var(--fg-2) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

/* Left column (heading) — wider headline, kill the small h2 cap */
.gfm-faq-grid h2 {
  font-size: clamp(32px, 4vw, 56px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.04 !important;
  max-width: none !important;
}

/* ---------- 12. Footer alignment ---------- */
/* (footer styles live in site.css now — overridden in floating card) */

/* ---------- 13. CTA pair (Partner + Kontakt) — calmer ---------- */
.gfm-cta-pair {
  max-width: 1440px;
  padding: 0 var(--gutter) var(--section-y);
}
.gfm-cta-card { padding: 56px; }
.gfm-cta-card h2 { font-size: clamp(28px, 3vw, 40px); }

/* ---------- 14. Reveal — subtler, faster ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms cubic-bezier(0.22,1,0.36,1), transform 600ms cubic-bezier(0.22,1,0.36,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 15. Page hero (inner pages) — centered ---------- */
.gfm-page-hero {
  text-align: center;
  padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(48px, 6vw, 96px);
}
.gfm-page-hero-inner {
  max-width: 920px;
  margin: 0 auto;
  align-items: center;
  text-align: center;
  gap: 20px;
}

/* ---------- 16. Buttons polish ---------- */
.btn { transition: opacity 200ms ease, transform 200ms ease, background 200ms ease; }
.btn:active { transform: translateY(1px); }

/* ---------- 17. Hide redundant logo block on home ---------- */
.gfm-logoblock { display: none; }
