@layer base {
/* ========== CSS Reset & Box Model ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
/* The safety net for long unbroken text (METIS-pub#541): split a word only
   when it would otherwise overflow its line, never an ordinary word. Unlike
   `anywhere`, it does not change how boxes size themselves, so the brand
   pages' scrolling tables keep their width. Addresses are shortened instead —
   `.url-link` below, and `plain_summary` in cards. */
body { overflow-wrap: break-word; }

/* ========== Palette + font aliases ==========
   These ramps used to be defined here, and were the only correct primitive
   tier in the codebase. They have been promoted to
   crm/css/tokens/primitives.css so the CRM and the public site share one
   palette; what remains is a back-compat alias shim for this tree's existing
   call sites. Deprecated — write var(--olive-*) / var(--green-*) in new
   public-site CSS. See docs/dev/web/design-system.md §3.3. */
:root {
  --dark-green-950: var(--green-950);
  --dark-green-900: var(--green-900);
  --dark-green-800: var(--green-800);
  --dark-green-700: var(--green-700);
  --dark-green-600: var(--green-600);
  --dark-green-500: var(--green-500);
  --dark-green-400: var(--green-400);
  --dark-green-300: var(--green-300);
  --dark-green-200: var(--green-200);
  --dark-green-100: var(--green-100);
  --dark-green-50:  var(--green-50);

  --olive-green-950: var(--olive-950);
  --olive-green-900: var(--olive-900);
  --olive-green-800: var(--olive-800);
  --olive-green-700: var(--olive-700);
  --olive-green-600: var(--olive-600);
  --olive-green-500: var(--olive-500);
  --olive-green-400: var(--olive-400);
  --olive-green-300: var(--olive-300);
  --olive-green-200: var(--olive-200);
  --olive-green-100: var(--olive-100);
  --olive-green-50:  var(--olive-50);
}

/* ========== Public Nav ========== */
.view-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 24px;
  transition: background var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}

/* The fixed header's height, for what must sit or land below it (the
   programme's pinned bar, METIS-pub#616): its 12px padding either side of
   the 44px Join us pill; under 600px, its 10px padding either side of the
   36px logo, the pill hidden (Responsive nav, below). */
:root { --view-nav-height: calc(2 * var(--space-3) + 44px); }

.view-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.view-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--dark-green-700);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-link:hover {
  color: var(--dark-green-900);
}

/* The name beside the mark (METIS-pub#489). */
.view-nav-logo { gap: var(--space-3); }

.view-nav-wordmark {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--dark-green-800);
}

/* Join us: an outlined pill that fills with the link colour. Styled here, not
   with .tg-button, because that is declared under [data-app="gathering"] and
   renders as bare text on camp, person and organisation pages. */
.nav-link--cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
}

/* Compound, so it outranks .lift's own `transition`, declared later. */
.nav-link--cta.lift {
  transition: var(--lift-transition), color var(--dur-base) var(--ease-out);
}

.nav-link--cta:hover,
.nav-link--cta:focus-visible {
  background-color: var(--dark-green-700);
  border-color: var(--dark-green-700);
  color: var(--color-bg);
}

/* ---- Nav dropdown ---- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-chevron {
  transition: transform var(--dur-base) var(--ease-out);
}

.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(25, 47, 43, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-3);
  padding: 6px 0;
  z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--dark-green-800);
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out);
}

.nav-dropdown-item:hover {
  background: var(--dark-green-50);
}

/* ========== Shared icon utility ========== */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ========== Shared link list ========== */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.link-row a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  transition: opacity var(--dur-base) var(--ease-out);
}

.link-row a:hover { opacity: 0.7; }

.link-row .icon { width: 16px; height: 16px; }

/* ========== Shared sphere/location tags ========== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ========== Responsive nav ========== */
@media (max-width: 600px) {
  :root { --view-nav-height: calc(2 * 10px + 36px); }
  .view-nav { padding: 10px 16px; }
  .view-nav-links { gap: 16px; }
  .nav-link { font-size: var(--text-base); }
  .nav-dropdown-menu { min-width: 180px; }
  .view-nav-wordmark,
  .nav-link--cta { display: none; }
}

/* ========== The one hover: .lift (METIS-pub#469) ==========
   One hover for everything you can open on the public site: it rises and its
   shadow deepens. The Gathering style.md says "Cards lift 4px"; since #469 that
   covers buttons too — they keep their fill-in and also lift.

   translate/scale, never transform: .d1-fade's entrance, the road's placement
   and the big hexagon's entrance animation all own `transform`, and a hover
   transform there would either fight them or be silently pinned.

   --lift-transition is the list, not a copy of it: an element that must keep
   its own transition (.d1-fade's entrance, .tg-button in the theme layer)
   appends var(--lift-transition) instead of restating the three lines.

   lift--ground is for elements with no background of their own: a lifted
   transparent box casts a shadow around empty space, so it takes a surface —
   one step lighter green on the dark band, where the green-tinted shadow is
   almost invisible. */
.lift {
  --lift-surface: var(--color-surface);
  --lift-shadow: var(--elev-3);
  --lift-rise: 0 calc(var(--space-1) * -1);
  --lift-transition:
    translate var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out);
  transition: var(--lift-transition);
}
.tg-dark .lift { --lift-surface: var(--green-800); }

@media (hover: hover) {
  .lift:hover { translate: var(--lift-rise); box-shadow: var(--lift-shadow); }
  .lift--ground:hover { background-color: var(--lift-surface); }
}
.lift:focus-visible,
.lift:has(.stretched-link:focus-visible) { translate: var(--lift-rise); box-shadow: var(--lift-shadow); }
.lift--ground:is(:focus-visible, :has(.stretched-link:focus-visible)) { background-color: var(--lift-surface); }

/* Touch screens fire :hover on tap and leave it stuck; the press is the
   feedback there. */
@media (hover: none) {
  .lift:active { translate: var(--lift-rise); box-shadow: var(--lift-shadow); }
  .lift--ground:active { background-color: var(--lift-surface); }
}

/* No movement; the shadow and the surface still change, so the state shows. */
@media (prefers-reduced-motion: reduce) {
  .lift,
  .lift:is(:hover, :focus-visible, :active, :has(.stretched-link:focus-visible)) { translate: none; }
}

/* ========== The stretched link ==========
   A card or row whose one real link covers all of it; the card's other links
   sit above the overlay. The third copy of this is what made it shared (the
   CRM keeps its own in entity-row.css). */
.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.lift:has(.stretched-link) { position: relative; }
.lift:has(.stretched-link) :is(a, button, summary):not(.stretched-link) { position: relative; z-index: 1; }
}

@layer components {
/* A link whose text is an address, shortened with "…" to its line (METIS-pub#541).
   Marked by render_description; the link keeps its full href. */
.url-link {
  display: inline-block;
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
}
