/* ===========================================================
   PSNG site styles. One file, ~250 lines, no preprocessor.
   To tweak the colour palette, change the CSS variables below.
   Palette is sampled directly from the brand background image.
   =========================================================== */

:root {
  --pink-soft:  #ffe5ee;     /* very light brand wash */
  --pink:       #fdbcbb;     /* mid pink */
  --coral:      #f37a92;     /* warm bright accent */
  --rose-deep:  #d8506b;     /* primary brand button colour */
  --rose-dark:  #a83a52;     /* hover / strong accent */
  --ink:        #2d1f24;     /* warm near-black for body text */
  --ink-soft:   #5a4047;     /* secondary text */
  --bg-soft:        rgba(255, 250, 252, 0.72);
  --bg-soft-strong: rgba(255, 250, 252, 0.88);
  --max-w: 1080px;
  --gap: 1.25rem;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(168, 58, 82, 0.10);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--pink-soft);
  min-height: 100vh;
}

/* === Sticky hero background ===========================================
   The hero image is rendered behind everything via .page-bg (a fixed
   div). Sections below the hero get a semi-opaque background so the
   image bleeds through dimmed once scrolled past the hero. */
.page-bg {
  position: fixed;
  inset: 0;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  background-color: var(--pink-soft);
  z-index: -1;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === Header ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 252, 0.85);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid rgba(168, 58, 82, 0.10);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-logo { display: block; height: 40px; width: 40px; }

/* === Floating hero logo (home page only) ==============================
   `--logo-shrink` is set by static/js/floating-logo.js (0 at top of
   page → 1 once scrolled past the hero). The logo grows 4× and floats
   into the centre of the hero when shrink = 0, settling back into the
   header at shrink = 1. The PSNG text fades in as it shrinks. */
:root { --logo-shrink: 1; }

/* === Floating hero logo (home page only) ============================
   A separate <img class="floating-logo"> is rendered only on the home
   page (see baseof.html). It uses position:fixed + translate(-50%, -50%)
   so it stays bulletproof-centred regardless of viewport width. As you
   scroll past the hero, --logo-shrink (set by floating-logo.js) ramps
   from 0 → 1; the floating logo shrinks toward the header and fades
   out, while the small header logo + PSNG text fade in. */
.floating-logo {
  position: fixed;
  top: var(--logo-top);          /* anchored to the same variable as .hero padding */
  left: 50vw;
  width: var(--logo-size);
  height: var(--logo-size);
  transform: translate(-50%, 0) scale(calc(1 - 0.4 * var(--logo-shrink)));
  transform-origin: top center;
  opacity: calc(1 - var(--logo-shrink));
  pointer-events: none;
  z-index: 40;
  filter: drop-shadow(0 8px 28px rgba(168, 58, 82, 0.22));
  will-change: transform, opacity;
}

body.home .brand-logo,
body.home .brand-text {
  opacity: var(--logo-shrink);
  transition: opacity 0.1s linear;
}

.main-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.main-nav a:hover { color: var(--rose-deep); }
.lang-switch a {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 1px solid var(--rose-deep);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 760px) {
  .nav-toggle-label {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
  }
  .nav-toggle-label span {
    display: block;
    height: 3px;
    background: var(--ink);
    border-radius: 3px;
  }
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft-strong);
    border-bottom: 1px solid rgba(168, 58, 82, 0.10);
  }
  .main-nav ul li { padding: 0.7rem 1.25rem; border-top: 1px solid rgba(168, 58, 82, 0.06); }
  .nav-toggle:checked ~ ul { display: flex; }
}

/* === Hero ============================================================= */
/* --logo-top / --logo-size are shared by .hero (which uses them to push
   the title below the logo) and .floating-logo (which uses them to size
   and position itself). Define on :root so both can read them. */
:root {
  --logo-top: 4.5rem;     /* distance from viewport top to logo TOP edge */
  --logo-size: 320px;     /* rendered diameter of the floating logo */
}
@media (max-width: 900px) { :root { --logo-top: 4rem;  --logo-size: 220px; } }
@media (max-width: 500px) { :root { --logo-top: 3.5rem; --logo-size: 160px; } }

.hero {
  min-height: 70vh;
  display: flex;
  align-items: flex-start;
  text-align: center;
  background: transparent;
  padding: calc(var(--logo-top) + var(--logo-size) + 2rem) 1.25rem 3rem;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.hero .tagline { font-size: clamp(1.05rem, 2vw, 1.35rem); margin: 0 0 1rem; }
.hero .launch { font-weight: 600; margin: 0 0 1.6rem; }

/* === Sections ========================================================= */
.section {
  background: var(--bg-soft);
  padding: 3.5rem 0;
  border-top: 1px solid rgba(168, 58, 82, 0.06);
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1.2rem;
}
.section p { margin: 0 0 1rem; }

/* Prose pages (about/coc/impressum/mitmachen intro) */
.prose {
  background: var(--bg-soft);
  padding: 3rem 1.25rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose .subtitle { color: var(--ink-soft); font-size: 1.1rem; margin-top: -0.4rem; }
.prose .version { color: var(--ink-soft); font-size: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose a { color: var(--rose-deep); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--rose-deep);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--rose-dark); }

.link-arrow { color: var(--rose-deep); font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* === Calendar / form embeds =========================================== */
.calendar-embed iframe, .form-embed iframe {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: white;
}

/* === FAQ ============================================================== */
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
  background: white;
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  box-shadow: 0 1px 4px rgba(168, 58, 82, 0.08);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--rose-deep); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 0 0.8rem; color: var(--ink-soft); }
.faq-answer p { margin: 0.2rem 0; }

/* === Team grid ======================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 760px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding-bottom: 1rem;
}
.team-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.team-card h3 { margin: 0.8rem 0 0.2rem; font-size: 1.1rem; }
.team-card .role { font-size: 0.9rem; color: var(--rose-deep); margin: 0; }
.team-card .bio { font-size: 0.92rem; padding: 0.6rem 1rem 0; color: var(--ink-soft); text-align: left; }

/* === Partners grid ==================================================== */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.partner-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.partner-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}
.partner-card h3 { margin: 0.2rem 0 0.4rem; }
.partner-links {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.partner-links a { color: var(--rose-deep); text-decoration: none; font-size: 0.9rem; }
.partner-links a:hover { text-decoration: underline; }

/* === Mitmachen cards ================================================== */
.join-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.join-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.join-card h2 { margin-top: 0; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.contact-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.contact-list .icon { width: 18px; height: 18px; color: var(--rose-deep); flex-shrink: 0; }
.contact-list a { color: var(--rose-deep); }

/* === CTA block ======================================================== */
.cta-block {
  text-align: center;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose-deep) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow);
}
.cta-block h2 { margin-top: 0; color: white; }
.cta-block .btn-primary { background: white; color: var(--rose-deep); }
.cta-block .btn-primary:hover { background: var(--ink); color: white; }

/* === Footer =========================================================== */
.site-footer {
  background: var(--ink);
  color: white;
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.2rem; }
.site-footer a { color: var(--pink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.site-footer a:hover { text-decoration: underline; color: white; }
.site-footer .icon { width: 18px; height: 18px; }
.site-footer .credit { margin: 0; font-size: 0.85rem; opacity: 0.7; flex: 1 1 100%; text-align: center; }

/* === Mobile fallback ===================================================
   On very small screens we lighten the section overlay so the image
   still feels present without overpowering the text. */
@media (max-width: 600px) {
  .section, .prose { background: var(--bg-soft-strong); }
  .footer-inner { flex-direction: column; text-align: center; }
  .site-footer ul { justify-content: center; flex-wrap: wrap; }
}
