/* Franke lah, Bäumli ha — assets/style.css */

:root {
  color-scheme: light dark;
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #eef0e5;
  --ink: #12291c;
  --ink-2: #3d5346;
  --muted: #64776a;
  --line: rgba(18, 41, 28, .14);

  --forest: #1e4d35;
  --forest-2: #256042;
  --forest-ink: #f4f6ee;
  --leaf-1: #2f7a4e;
  --leaf-2: #4c9a63;
  --leaf-3: #7cc07a;
  --leaf-4: #a9d98c;
  --bark: #6a4a2f;
  --soil: #4a3421;

  --accent: #f4b73c;
  --accent-hover: #f8c65c;
  --accent-ink: #1b2a14;
  --link: #1e4d35;
  --link-hover: #2f7a4e;

  --ok: #227a4b;
  --ok-bg: #e2f2e6;
  --warn: #8a5a00;
  --warn-bg: #fbeccb;
  --err: #a8271f;
  --err-bg: #fbe2df;
  --info: #3d5346;
  --info-bg: #edefe7;

  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 24px 60px -28px rgba(18, 41, 28, .35), 0 2px 6px -2px rgba(18, 41, 28, .12);
  --gutter: 16px;
  --focus: var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1912;
    --surface: #142319;
    --surface-2: #1b2e22;
    --ink: #eef3ea;
    --ink-2: #c2d1c4;
    --muted: #8ea393;
    --line: rgba(238, 243, 234, .14);
    --forest: #17382a;
    --forest-2: #1e4836;
    --forest-ink: #f1f5ec;
    --leaf-1: #3d8a5b;
    --leaf-2: #5aa86f;
    --leaf-3: #86c987;
    --leaf-4: #b6df9c;
    --bark: #8a6544;
    --soil: #2c3b30;
    --accent: #f5be4b;
    --accent-hover: #ffd070;
    --link: #86c987;
    --link-hover: #b6df9c;
    --ok: #9bdcb0; --ok-bg: #1a3b29;
    --warn: #f3cf7a; --warn-bg: #3d3010;
    --err: #ffb4ab; --err-bg: #4a1f1c;
    --info: #c2d1c4; --info-bg: #1b2e22;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0d1912;
  --surface: #142319;
  --surface-2: #1b2e22;
  --ink: #eef3ea;
  --ink-2: #c2d1c4;
  --muted: #8ea393;
  --line: rgba(238, 243, 234, .14);
  --forest: #17382a;
  --forest-2: #1e4836;
  --forest-ink: #f1f5ec;
  --leaf-1: #3d8a5b;
  --leaf-2: #5aa86f;
  --leaf-3: #86c987;
  --leaf-4: #b6df9c;
  --bark: #8a6544;
  --soil: #2c3b30;
  --accent: #f5be4b;
  --accent-hover: #ffd070;
  --link: #86c987;
  --link-hover: #b6df9c;
  --ok: #9bdcb0; --ok-bg: #1a3b29;
  --warn: #f3cf7a; --warn-bg: #3d3010;
  --err: #ffb4ab; --err-bg: #4a1f1c;
  --info: #c2d1c4; --info-bg: #1b2e22;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--link-hover); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

.lead { font-size: clamp(18px, 1.6vw + 12px, 22px); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.eyebrow {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
/* the gap between the eyebrow halves turns into a line break on phones */
@media (max-width: 479px) {
  .eyebrow-sep { display: block; height: 0; overflow: hidden; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  text-wrap: balance;
  text-align: center;
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -14px rgba(244, 183, 60, .9);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(244, 183, 60, .95); }
.btn-accent:active { transform: translateY(0); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; cursor: default; box-shadow: none; }

/* ---------- header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.brand-mark i {
  position: absolute;
  left: 9px; top: 6px;
  width: 12px; height: 18px;
  border-radius: 100% 0 100% 0;
  background: var(--forest);
  transform: rotate(-20deg);
}
.brand-name { display: none; }
@media (min-width: 480px) { .brand-name { display: inline; } }

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.lang-switch button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--forest); color: var(--forest-ink); }

/* ---------- countdown ---------- */
.countdown {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
}
.countdown[data-ended="true"] {
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  font-weight: 600;
}
.cd-label { font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.cd-grid { display: flex; gap: 8px; }
.cd-cell {
  display: grid;
  justify-items: center;
  min-width: 64px;
  padding: 10px 8px 8px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px -2px rgba(18, 41, 28, .12);
}
.cd-value {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cd-unit { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cd-until { font-size: 14px; color: var(--muted); }
@media (max-width: 479px) { .cd-cell { min-width: 0; flex: 1; } .cd-grid { width: 100%; } }

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: 24px;
  padding-block: 20px 48px;
  align-items: center;
}
@media (min-width: 840px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; padding-block: 48px 96px; }
}
.hero-copy { display: grid; gap: 20px; order: 2; }
@media (min-width: 840px) { .hero-copy { order: 0; } }
.hero h1 {
  font-size: clamp(44px, 8.5vw, 92px);
  font-variation-settings: "opsz" 96;
}
.tagline { font-size: clamp(19px, 1.4vw + 13px, 24px); line-height: 1.4; color: var(--ink-2); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
@media (max-width: 479px) { .hero-actions .btn { width: 100%; } }

.hero-art {
  position: relative;
  aspect-ratio: 320 / 360;
  width: min(100%, 300px);
  margin-inline: auto;
  order: 1;
}
@media (min-width: 840px) { .hero-art { width: min(100%, 420px); order: 0; } }
/* Phones: the tree stacks above the copy, so trim the dead space above it —
   the SVG's top ~19% is empty apart from the falling coin's start — and
   tighten the stack so the donate button sits in the first screen. */
@media (max-width: 839px) {
  .site-head { padding-block: 12px; }
  .hero { padding-block: 0 40px; gap: 16px; }
  .hero-copy { gap: 16px; }
  .hero-art { width: min(100%, 240px); margin-top: -40px; }
}
.tree { width: 100%; height: 100%; overflow: visible; }

/* tree parts */
.ground { fill: var(--surface-2); }
.soil { fill: var(--soil); }
.trunk, .branch {
  fill: none;
  stroke: var(--bark);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.trunk { stroke-width: 15; animation: draw .55s cubic-bezier(.4, 0, .2, 1) .62s forwards; }
.branch { stroke-width: 8; animation: draw .4s cubic-bezier(.4, 0, .2, 1) forwards; }
.b1 { animation-delay: .95s; }
.b2 { animation-delay: 1.02s; }
.canopy .c {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scale(0);
  animation: bloom .55s cubic-bezier(.2, .9, .3, 1.15) forwards;
}
.c1 { fill: var(--leaf-2); animation-delay: 1.1s; }
.c2 { fill: var(--leaf-1); animation-delay: 1.2s; }
.c3 { fill: var(--leaf-1); animation-delay: 1.25s; }
.c4 { fill: var(--leaf-3); animation-delay: 1.32s; }
.c5 { fill: var(--leaf-3); animation-delay: 1.36s; }
.c6 { fill: var(--leaf-4); animation-delay: 1.45s; }
.coin circle { fill: var(--accent); }
.coin .coin-ring { fill: none; stroke: rgba(27, 42, 20, .35); stroke-width: 1.5; }
.coin text { font-family: var(--display); font-weight: 800; font-size: 15px; fill: var(--accent-ink); }
.coin { animation: coinDrop .75s cubic-bezier(.5, 0, .9, .6) forwards; opacity: 0; }

@keyframes coinDrop {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 1; }
  70%  { transform: translateY(318px); opacity: 1; }
  82%  { transform: translateY(308px); }
  100% { transform: translateY(330px); opacity: 0; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bloom { to { transform: scale(1); } }

/* leaf particles */
.leaves { position: absolute; inset: -10% -6%; pointer-events: none; overflow: hidden; }
.leaves i {
  position: absolute;
  top: -24px;
  width: 12px; height: 18px;
  background: var(--leaf-3);
  border-radius: 100% 0 100% 0;
  opacity: 0;
  animation: drift linear infinite;
}
.leaves i:nth-child(1) { left: 12%; animation-duration: 19s; animation-delay: 1s; }
.leaves i:nth-child(2) { left: 78%; animation-duration: 23s; animation-delay: 6s; width: 9px; height: 14px; }
.leaves i:nth-child(3) { left: 40%; animation-duration: 26s; animation-delay: 12s; background: var(--leaf-4); }
.leaves i:nth-child(4) { left: 92%; animation-duration: 21s; animation-delay: 17s; width: 10px; height: 15px; }
.leaves i:nth-child(5) { left: 4%; animation-duration: 25s; animation-delay: 9s; background: var(--leaf-2); }
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: .55; }
  90%  { opacity: .45; }
  100% { transform: translate(-60px, 520px) rotate(300deg); opacity: 0; }
}

/* ---------- donate ---------- */
.donate {
  background: var(--forest);
  color: var(--forest-ink);
  padding-block: clamp(48px, 8vw, 96px);
  border-radius: 32px 32px 0 0;
  position: relative;
}
.donate::before {
  /* soft sunlight */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 50% at 85% 0%, rgba(244, 183, 60, .18), transparent 70%);
  pointer-events: none;
}
.donate-grid {
  position: relative;
  display: grid;
  gap: 36px;
  align-items: center;
}
@media (min-width: 840px) { .donate-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 64px; } }
.donate-copy { display: grid; gap: 22px; }
.donate h2 { font-size: clamp(38px, 6vw, 68px); }
.donate .lead { color: rgba(244, 246, 238, .86); }
.steps {
  list-style: none;
  counter-reset: step;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 34em;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  font-size: 17px;
  line-height: 1.45;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
}
.note { font-size: 15px; color: rgba(244, 246, 238, .72); }

.qr-card {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  padding: 20px 20px 22px;
  background: #fff;
  color: #12291c;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  transform: rotate(-1deg);
  transition: transform .3s ease;
}
.qr-card:hover { transform: rotate(0deg) scale(1.01); }
.qr-card img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 12px;
  background: #fff;
}
.qr-card figcaption { display: grid; gap: 2px; text-align: center; }
.donate-done {
  align-self: center;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2vw + 10px, 26px);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
.qr-button { display: block; border-radius: 12px; }
.qr-button:hover img { transform: scale(1.01); }
.qr-button img { transition: transform .2s ease; }

/* ---------- partners ---------- */
.partners { padding-block: clamp(48px, 7vw, 88px) 0; display: grid; gap: 24px; }
.partners h2 { font-size: clamp(30px, 4.6vw, 48px); }
.partner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .partner-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.partner {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: #fff; /* logos are designed for white; keep it in dark mode too */
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.partner img { width: 100%; max-height: 72px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s ease, opacity .2s ease; }
.partner:hover, .partner[aria-expanded="true"] { border-color: var(--leaf-1); transform: translateY(-2px); box-shadow: var(--shadow); }
.partner:hover img, .partner[aria-expanded="true"] img { filter: none; opacity: 1; }
.partner[aria-expanded="true"] { background: #f4f6ee; }
.partner-panel {
  display: grid;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--surface-2);
  animation: fieldIn .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes fieldIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.partner-name { font-size: 20px; }
.partner-tagline { font-weight: 600; color: var(--leaf-1); margin-top: -4px; }
.partner-text { color: var(--ink-2); max-width: 60em; }
.partner-link { font-weight: 600; justify-self: start; }

/* ---------- about ---------- */
.about { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); }
.about-card {
  display: grid;
  gap: 16px;
  max-width: 44em;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about h2 { font-size: clamp(30px, 4.6vw, 48px); }
.about .lead { font-size: clamp(17px, 1.1vw + 12px, 19px); }
.about .team { font-size: 16px; color: var(--ink-2); }
.about a.team-member { font-weight: 600; text-decoration-thickness: 1.5px; }

/* ---------- footer ---------- */
.site-foot { padding-block: 24px 40px; font-size: 14px; color: var(--muted); display: grid; gap: 8px; }
.site-foot .privacy { font-size: 13px; max-width: 48em; }

/* ---------- scroll reveals (gated on .js) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .coin { opacity: 0; }
  .leaves { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .qr-card { transform: none; }
}
