:root {
  --paper: #FBFAF7;
  --ink: #1B1A18;
  --ink-soft: #55524C;
  --red: #DE3B2B;
  --blue: #3A6297;
  --orange: #F36D36;
  --pink: #C96A94;
  --line: #E6E3DB;
  --tint: #F1EFE8;
  --nav-h: 64px;
  --nav-top: 12px;
  --nav-max: 1200px;
  --content-max: 1060px;
  --radius-pill: 999px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); line-height: 1.55; }

/* ===================== NAV PILL ===================== */
.nav-wrap {
  position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
}
.nav-pill {
  pointer-events: auto; position: relative;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--nav-max); height: var(--nav-h);
  padding: 0 14px 0 22px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(27,26,24,0.04);
  transition: box-shadow 0.35s ease, background 0.35s ease,
              max-width 0.45s cubic-bezier(0.4,0,0.2,1);
}
.nav-pill.is-scrolled {
  max-width: 760px;
  padding-left: 24px;
  padding-right: 24px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 24px rgba(27,26,24,0.10);
}
.nav-logo {
  display: block; height: 34px; flex: 0 0 auto; overflow: hidden; width: 98px;
  transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
}
.nav-pill.is-scrolled .nav-logo { width: 34px; }
.nav-logo svg { height: 34px; width: auto; display: block; }
/* No opacity/filter on the logo: the wordmark (x 82-200 of the viewBox)
   is hidden purely by the width clip, so colours can never change */

.nav-menu {
  list-style: none; display: flex; gap: 2px;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
}
.nav-menu > li { position: static; padding: 13px 0; }
.nav-menu a.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 15px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border-radius: var(--radius-pill); transition: background 0.2s ease;
  white-space: nowrap; cursor: pointer;
}
.nav-menu .nav-link:hover,
.nav-menu li.is-open > .nav-link,
.nav-menu li:focus-within > .nav-link { background: rgba(27,26,24,0.06); }
.nav-menu .nav-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.nav-link .chev {
  width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.25s ease;
}
li.is-open > .nav-link .chev,
li:focus-within > .nav-link .chev { transform: rotate(225deg); margin-top: 0; }

.mega {
  position: fixed; left: 50%;
  top: calc(var(--nav-top) + var(--nav-h));
  transform: translateX(-50%) translateY(-6px);
  width: min(var(--content-max), calc(100vw - 32px));
  padding-top: 8px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
}
li.is-open > .mega,
li:focus-within > .mega {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}
.mega__panel {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 16px 48px rgba(27,26,24,0.14);
  display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 32px;
}
.mega__intro h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.mega__intro p { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.mega__links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.mega__links a { display: block; padding: 12px 14px; border-radius: 16px; text-decoration: none; transition: background 0.2s ease; }
.mega__links a:hover, .mega__links a:focus-visible { background: rgba(27,26,24,0.05); }
.mega__links a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mega__links .t { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.mega__links .d { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.nav-ctas {
  display: flex; gap: 8px; flex: 0 0 auto;
  max-width: 220px; overflow: hidden; white-space: nowrap; opacity: 1;
  transition: max-width 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease 0.1s;
}
.nav-pill.is-scrolled .nav-ctas {
  max-width: 0; opacity: 0; pointer-events: none;
  transition: max-width 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
}
.btn {
  display: inline-block; padding: 10px 20px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  text-decoration: none; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn--join { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn--join:hover { background: var(--ink); color: #fff; }
.btn--give { color: #fff; background: var(--red); }
.btn--give:hover { background: #C22F21; }
.btn--lg { padding: 14px 28px; font-size: 16px; }

.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: none; cursor: pointer; border-radius: var(--radius-pill);
}
.nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; position: fixed;
  top: calc(var(--nav-top) + var(--nav-h) + 8px); left: 16px; right: 16px; z-index: 99;
  max-height: calc(100vh - 110px); overflow-y: auto;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 24px; padding: 12px;
  box-shadow: 0 12px 40px rgba(27,26,24,0.14);
}
.nav-mobile.is-open { display: block; }
.nav-mobile a, .acc-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 16px;
  font-family: var(--font); font-size: 17px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  background: none; border: none; border-radius: 14px; cursor: pointer; text-align: left;
}
.nav-mobile a:hover, .acc-toggle:hover { background: rgba(27,26,24,0.05); }
.acc-toggle .chev {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.25s ease; flex: 0 0 auto;
}
.acc-toggle[aria-expanded="true"] .chev { transform: rotate(225deg); }
.acc-panel { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.acc-panel a { font-size: 15px; font-weight: 400; padding: 11px 16px 11px 28px; color: var(--ink-soft); }
.nav-mobile__ctas { display: flex; gap: 8px; padding: 10px 8px 6px; }
.nav-mobile__ctas .btn { flex: 1; text-align: center; }
@media (max-width: 920px) {
  .nav-menu, .nav-ctas { display: none; }
  .nav-burger { display: flex; }
  .nav-pill { padding: 0 8px 0 18px; }
}

