/* =============================================================================
   alpinestakepool.at — the site's own styles
   -----------------------------------------------------------------------------
   bergbua.css next to this file is the bergbua corporate design, generated by
   ../sync-corporate-design.sh from the bergbua.at repository — never edit it
   here. Colour, type, the glass surfaces, the sky, the ridge and every
   component (.bb-*) come from there. This file is only what is this site's:
   the layout, the sticky header, the hero with its stats, the sections, the
   donation rows and the legal page.
   ============================================================================= */

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

html { scroll-behavior: smooth; }

img, svg { display: block; max-width: 100%; }

/* The ridge stays behind everything; softened so the cards over it keep calm. */
.site-ridge { opacity: 0.55; }

/* --- header ------------------------------------------------------------------
   A sticky glass panel (.bb-panel--sticky) with the small logo, the section
   links and, on narrow screens, a menu built on <details> (.bb-menu). */
.site-header { padding: 0.55rem clamp(1rem, 4vw, 2rem); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--bb-fg);
  text-decoration: none;
}
.site-header__brand img { height: 2.1rem; width: auto; }
.site-header__brand span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--bb-track-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  margin-left: auto;
}
.site-nav a {
  color: var(--bb-fg-2);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: var(--bb-track-chip);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--bb-fg); }

.site-menu { display: none; margin-left: auto; }
/* Opaque, not the usual translucent bb-surface: this panel floats over the
   hero artwork, and the glass look let it bleed through and hurt legibility. */
.site-menu .bb-menu__panel {
  min-width: 11rem;
  background: var(--bb-night);
  backdrop-filter: none;
}

@media (max-width: 47rem) {
  .site-nav { display: none; }
  .site-menu { display: block; }
}
@media (max-width: 26rem) {
  .site-header__brand span { display: none; }
}

/* --- hero ------------------------------------------------------------------- */
.hero {
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
  text-align: center;
}
/* A flex column, not a grid: a grid's auto track would grow to the stats'
   full six-column width and push the hero off narrow screens. */
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 64rem;
  margin-inline: auto;
}
.hero__logo {
  width: 280px;
  max-width: 70vw;
  margin-bottom: 2rem;
}
.hero .bb-lead { margin: 0 auto; }

.hero__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  width: 100%;
  max-width: 56rem;
  margin: 2.5rem auto 0;
  padding: 0;
}
@media (min-width: 56rem) { .hero__stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero__stats .bb-stat { min-width: 0; align-items: center; text-align: center; }
/* The figure above its label; in the DOM the <dt> comes first, as it must. */
.hero__stats dt { order: 2; }
.hero__stats dd { order: 1; margin: 0; }

.skeleton-stat {
  display: inline-block;
  width: 4.5rem;
  height: 1.6em;
  vertical-align: middle;
}

/* --- sections --------------------------------------------------------------- */
.site-section {
  width: min(100%, 64rem);
  margin-inline: auto;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 4vw, 2rem);
  scroll-margin-top: 4.5rem;
}

.site-section__head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.site-section__head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-section__head .bb-lead { margin: 0; }

.bb-prose p, .bb-card p { margin: 0 0 0.75rem; }
.bb-prose p:last-child, .bb-card p:last-child { margin-bottom: 0; }
.bb-card .bb-label--underline { margin-bottom: 0.9rem; }

.site-card { margin-top: 1.25rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.btn-row, .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pill-row { gap: 0.5rem; margin-top: 0.75rem; }

/* relays */
.relay-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.relay {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--bb-radius-sm);
  background: var(--bb-surface-sunken);
}
.relay__flag { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; }
.relay__ip { flex: 1; color: var(--bb-fg); }

/* organizations */
.org-groups { display: grid; gap: 1.5rem; }

/* donations */
.donation-year { margin: 0; font-size: 1rem; font-weight: 600; }
/* A month label belongs to the rows beneath it: air above, almost none below.
   The .bb-card prefix is needed to outrank the generic `.bb-card p` spacing,
   which would otherwise swap the two margins round. */
.donation-month,
.bb-card .donation-month { margin: 1.6rem 0 0.15rem; }
.bb-card__head + .donation-month,
.bb-accordion__body .donation-month:first-child { margin-top: 0.25rem; }

.donation-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.donation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Pulled out by its own side padding, so the name lines up with the month
     label while the hover plate still reaches past it. Kept low, so a month's
     rows sit close under their label and the air goes above the next month. */
  margin-inline: -0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--bb-radius-sm);
  color: var(--bb-fg);
  text-decoration: none;
  transition: background-color var(--bb-speed) ease;
}
.donation:hover { background: var(--bb-surface-hover); color: var(--bb-fg); }
.donation__org { flex: 1; min-width: 0; }
.donation .bb-pill { padding-block: 0.2rem; }
.donation__icon { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; color: var(--bb-accent); }

.site-subhead { margin: 1.5rem 0 0.75rem; }
.bb-accordion__item > summary > .bb-pill { margin-left: auto; }

/* loading */
.skeleton-line { height: 1rem; margin-bottom: 0.75rem; }
.skeleton-line--wide { height: 2.5rem; }
.skeleton-line:last-child { margin-bottom: 0; }

/* --- footer ----------------------------------------------------------------- */
.site-footer {
  padding: 2rem clamp(1rem, 4vw, 2rem) 3rem;
  color: var(--bb-fg-3);
  font-size: 0.8rem;
  letter-spacing: var(--bb-track-body);
  text-align: center;
}
.site-footer p { margin: 0 0 0.5rem; color: inherit; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.site-footer a { color: var(--bb-fg-3); text-decoration: none; }
.site-footer a:hover { color: var(--bb-mist); }

/* Back to top, once the hero has scrolled away (js/app.js). */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
}
.to-top[hidden] { display: none; }

/* --- impressum.html --------------------------------------------------------- */
.legal {
  display: grid;
  gap: 1.25rem;
  width: min(100%, 46rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) 5rem;
}
.legal .bb-title { margin-bottom: 0.5rem; text-align: center; }
.legal .bb-card h3 {
  margin: 1.2rem 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: var(--bb-track-body);
}
.legal .bb-card p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  letter-spacing: var(--bb-track-body);
}
.legal .bb-card p:last-child { margin-bottom: 0; }
.legal .bb-btn { justify-self: center; margin-top: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
