/* Sidebar design system
 *
 * The one place the site's type, color, spacing, layout and buttons are
 * decided. Loaded after the Webflow stylesheet, so everything here wins over
 * the old per-page styling at the same specificity.
 *
 * Reference design: the current homepage (/, /membership, /experience).
 * Every other page is brought into line with it.
 *
 * How it connects:
 *   - scripts/lib/unify.mjs snaps the Webflow stylesheet's font sizes, gaps
 *     and radii onto the tokens below, and renames retired classes in the
 *     markup (m-heading-style-h1 -> heading-style-h1, button_white -> button).
 *   - /system renders every token and component in this file.
 *
 * Hand-written. Not touched by the importer.
 */

:root {
  /* ---- Color -------------------------------------------------------- */
  --sb-plum-950: #0c0117; /* page ground */
  --sb-plum-900: #140d1b;
  --sb-surface-0: #131018;
  --sb-surface-1: #18151f; /* cards, dark buttons */
  --sb-surface-2: #23202d;
  --sb-ink: #ffffff;
  --sb-ink-muted: #e0d9f2;
  --sb-ink-soft: #ffffffb3;
  --sb-lavender-50: #f9f5ff;
  --sb-lavender-100: #ede7fd;
  --sb-lavender-300: #c2abdf;
  --sb-purple-40: #4d0bb7;
  --sb-purple-50: #7937e3;
  --sb-purple-60: #a374ff; /* accent */
  --sb-purple-70: #af8ce5;
  --sb-accent: var(--sb-purple-60);
  --sb-line: #ffffff26;

  /* ---- Type --------------------------------------------------------- */
  --sb-font: "Graphik Web", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fixed steps. Component styles snap onto these. */
  --sb-fs-xs: 0.75rem;
  --sb-fs-sm: 0.875rem;
  --sb-fs-base: 1rem;
  --sb-fs-md-sm: 1.125rem;
  --sb-fs-md: 1.25rem;
  --sb-fs-lg: 1.5rem;
  --sb-fs-xl: 2rem;
  --sb-fs-2xl: 2.5rem;
  --sb-fs-3xl: 3rem;
  --sb-fs-4xl: 4rem;
  --sb-fs-5xl: 5rem;

  /* The scale headings and body text use. Fluid between phone (375px) and
     desktop (~1200px), so one value covers every breakpoint. */
  --sb-display: clamp(2.75rem, 1.5rem + 5vw, 5rem);
  --sb-h1: clamp(2.5rem, 1.5rem + 3.6vw, 4rem);
  --sb-h2: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --sb-h3: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  --sb-h4: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);
  --sb-h5: 1.25rem;
  --sb-h6: 1rem;
  --sb-text-lg: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);
  --sb-text-md: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --sb-text: 1rem;
  --sb-text-sm: 0.875rem;
  --sb-text-xs: 0.75rem;

  --sb-weight-regular: 400;
  --sb-weight-medium: 500;
  --sb-weight-semibold: 600;

  --sb-leading-display: 1;
  --sb-leading-heading: 1.1;
  --sb-leading-title: 1.25;
  --sb-leading-body: 1.5;

  --sb-tracking-display: -0.03em;
  --sb-tracking-h2: -0.025em;
  --sb-tracking-h3: -0.02em;
  --sb-tracking-h4: -0.01em;

  /* ---- Space -------------------------------------------------------- */
  --sb-space-1: 0.25rem;
  --sb-space-2: 0.5rem;
  --sb-space-3: 0.75rem;
  --sb-space-4: 1rem;
  --sb-space-4-5: 1.25rem;
  --sb-space-5: 1.5rem;
  --sb-space-6: 2rem;
  --sb-space-6-5: 2.5rem;
  --sb-space-7: 3rem;
  --sb-space-8: 4rem;
  --sb-space-9: 5rem;
  --sb-space-10: 6rem;
  --sb-space-11: 8rem;

  /* ---- Layout ------------------------------------------------------- */
  --sb-gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --sb-container-lg: 80rem;
  --sb-container-md: 64rem;
  --sb-container-sm: 48rem;
  --sb-section-lg: clamp(4rem, 2rem + 8vw, 8rem);
  --sb-section-md: clamp(3rem, 1.8rem + 4.5vw, 5rem);
  --sb-section-sm: clamp(2rem, 1.5rem + 2vw, 3rem);

  /* ---- Shape -------------------------------------------------------- */
  --sb-radius-xs: 0.25rem;
  --sb-radius-sm: 0.5rem;
  --sb-radius-sm-md: 0.75rem;
  --sb-radius-md: 1rem;
  --sb-radius-lg: 1.5rem;
  --sb-radius-xl: 2rem;
  --sb-radius-pill: 999px;

  /* ---- Buttons ------------------------------------------------------ */
  --sb-button-h: 3rem;
  --sb-button-h-sm: 2.5rem;
  --sb-button-h-lg: 3.5rem;
  --sb-button-px: 1.5rem;
  --sb-button-glow: 0 0 12px #ffffff40, 0 0 32px 4px #ffffff59;
  --sb-button-glow-hover: 0 0 12px #ffffff40, 0 0 40px 8px #ffffff80;

  /* The Webflow palette, pointed at the system so existing classes follow it. */
  --dark-plum: var(--sb-plum-950);
  --plum: var(--sb-plum-900);
  --surface-00: var(--sb-surface-0);
  --surface-01: var(--sb-surface-1);
  --surface-02: var(--sb-surface-2);
  --text-muted: var(--sb-ink-muted);
  --white-muted: var(--sb-ink-soft);
  --prime: var(--sb-lavender-50);
  --neutral-08: var(--sb-lavender-100);
  --lavendar: var(--sb-lavender-300);
  --purple--40: var(--sb-purple-40);
  --purple--50: var(--sb-purple-50);
  --purple--60: var(--sb-purple-60);
  --purple--70: var(--sb-purple-70);
}

/* ======================================================================
   Type
   ====================================================================== */

body {
  font-family: var(--sb-font);
  font-size: var(--sb-text);
  line-height: var(--sb-leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  line-height: var(--sb-leading-body);
}

/* One heading voice: Graphik Semibold, tracking tightening as size grows. */
h1, h2, h3, h4, h5, h6,
.heading-style-display, .heading-style-h1, .heading-style-h2, .heading-style-h3,
.heading-style-h4, .heading-style-h5, .heading-style-h6 {
  font-family: var(--sb-font);
  font-weight: var(--sb-weight-semibold);
  text-transform: none;
}

.heading-style-display {
  font-size: var(--sb-display);
  line-height: var(--sb-leading-display);
  letter-spacing: var(--sb-tracking-display);
}
h1, .heading-style-h1 {
  font-size: var(--sb-h1);
  line-height: 1.05;
  letter-spacing: var(--sb-tracking-display);
}
h2, .heading-style-h2 {
  font-size: var(--sb-h2);
  line-height: var(--sb-leading-heading);
  letter-spacing: var(--sb-tracking-h2);
}
h3, .heading-style-h3 {
  font-size: var(--sb-h3);
  line-height: 1.15;
  letter-spacing: var(--sb-tracking-h3);
}
h4, .heading-style-h4 {
  font-size: var(--sb-h4);
  line-height: var(--sb-leading-title);
  letter-spacing: var(--sb-tracking-h4);
}
h5, .heading-style-h5 {
  font-size: var(--sb-h5);
  line-height: 1.35;
  letter-spacing: 0;
}
h6, .heading-style-h6 {
  font-size: var(--sb-h6);
  line-height: var(--sb-leading-body);
  letter-spacing: 0;
}

/* Page heroes that set their own heading class keep their color and
   gradients but take the system's weight and tracking. */
.gradient_hero-heading,
.gradient-heading,
.lonely-header,
.exp-impact_content-header,
.exp-timeline_date-text,
.feature-name,
.summit-header_title,
.exp-faq_heading,
.blog_title {
  font-weight: var(--sb-weight-semibold);
}
.gradient_hero-heading {
  letter-spacing: var(--sb-tracking-display);
  line-height: 1.05;
}
.gradient-heading,
.lonely-header {
  font-size: var(--sb-h2);
  letter-spacing: var(--sb-tracking-h2);
  line-height: var(--sb-leading-heading);
}

/* Rich text (blog posts, journeys, facilitator bios, legal pages) uses the
   same heading voice as the rest of the site. */
.w-richtext :is(h1, h2, h3, h4, h5, h6),
.text-rich-text :is(h1, h2, h3, h4, h5, h6),
.believe_rich-text :is(h1, h2, h3, h4, h5, h6) {
  font-weight: var(--sb-weight-semibold);
}

/* Rich text headings: a step below the page's own headings, so an article
   or a legal page reads as a document rather than a stack of titles. */
.w-richtext h2 {
  font-size: var(--sb-h3);
  line-height: 1.2;
  letter-spacing: var(--sb-tracking-h3);
  margin-top: var(--sb-space-7);
  margin-bottom: var(--sb-space-4);
}
.w-richtext h3 {
  font-size: var(--sb-h4);
  line-height: var(--sb-leading-title);
  letter-spacing: var(--sb-tracking-h4);
  margin-top: var(--sb-space-6);
  margin-bottom: var(--sb-space-3);
}
.w-richtext > :first-child {
  margin-top: 0;
}

/* Big stat numerals ("93%"). One treatment everywhere: the page families had
   three sizes and three weights for the same number. */
.people_number,
.sb2_people_number,
.sidebar-stats_number {
  font-size: clamp(5rem, 2.75rem + 7vw, 9rem);
  font-weight: var(--sb-weight-regular);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

/* Body sizes: five steps. */
.text-size-large {
  font-size: var(--sb-text-lg);
  line-height: 1.4;
}
.text-size-medium {
  font-size: var(--sb-text-md);
  line-height: var(--sb-leading-body);
}
.text-size-regular {
  font-size: var(--sb-text);
  line-height: 1.6;
}
.text-size-small {
  font-size: var(--sb-text-sm);
  line-height: var(--sb-leading-body);
}
.text-size-tiny {
  font-size: var(--sb-text-xs);
  line-height: var(--sb-leading-body);
}

/* Older size and weight names, kept because some also carry layout. */
.text-size-semi-medium {
  font-size: var(--sb-text-md);
  line-height: var(--sb-leading-body);
}
.text-weight-light { font-weight: var(--sb-weight-regular); }
.text-weight-bold,
.text-weight-xbold { font-weight: var(--sb-weight-semibold); }

/* Three weights. */
.text-weight-normal { font-weight: var(--sb-weight-regular); }
.text-weight-medium { font-weight: var(--sb-weight-medium); }
.text-weight-semibold { font-weight: var(--sb-weight-semibold); }

/* ======================================================================
   Layout: gutter, three containers, three section rhythms
   ====================================================================== */

.padding-global {
  padding-left: var(--sb-gutter);
  padding-right: var(--sb-gutter);
}
.container-large {
  width: 100%;
  max-width: var(--sb-container-lg);
  margin-left: auto;
  margin-right: auto;
}
.container-medium {
  width: 100%;
  max-width: var(--sb-container-md);
  margin-left: auto;
  margin-right: auto;
}
.container-small {
  width: 100%;
  max-width: var(--sb-container-sm);
  margin-left: auto;
  margin-right: auto;
}
.padding-section-large {
  padding-top: var(--sb-section-lg);
  padding-bottom: var(--sb-section-lg);
}
.padding-section-medium {
  padding-top: var(--sb-section-md);
  padding-bottom: var(--sb-section-md);
}
.padding-section-small {
  padding-top: var(--sb-section-sm);
  padding-bottom: var(--sb-section-sm);
}

/* The older 100rem container folds into the large one (it keeps its
   position: relative, which absolutely placed art depends on). */
.container-x-large {
  max-width: var(--sb-container-lg);
}

/* Measures for text blocks. */
.max-width-medium { max-width: 32rem; }
.max-width-semi-medium,
.max-width-xmedium,
.max-width-mid { max-width: 38rem; }
.max-width-large { max-width: 48rem; }
.max-width-xlarge { max-width: 64rem; }

/* ======================================================================
   Buttons: one pill, three looks, three sizes
   ====================================================================== */

.button,
.button_white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sb-space-2);
  min-height: var(--sb-button-h);
  padding: 0 var(--sb-button-px);
  border: 0;
  border-radius: var(--sb-radius-pill);
  background-color: var(--sb-ink);
  background-image: none;
  color: var(--sb-plum-950);
  font-family: var(--sb-font);
  font-size: var(--sb-fs-base);
  font-weight: var(--sb-weight-semibold);
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--sb-button-glow);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.button:hover,
.button_white:hover {
  background-color: var(--sb-lavender-50);
  background-image: none;
  box-shadow: var(--sb-button-glow-hover);
}
.button:focus-visible {
  outline: 2px solid var(--sb-accent);
  outline-offset: 3px;
}

/* The older lavender button fills its column; same look, block layout. */
.button_white {
  display: flex;
}

/* Sizes */
.button.is-small,
.button.is-nav {
  min-height: var(--sb-button-h-sm);
  height: auto;
  padding: 0 1.125rem;
  font-size: var(--sb-fs-sm);
}
.button.is-large {
  min-height: var(--sb-button-h-lg);
  padding: 0 2rem;
  font-size: var(--sb-fs-md-sm);
}

/* Dark: for light backgrounds, and the nav's Apply button. */
.button.is-dark,
.button.shadow-superglow-button {
  background-color: var(--sb-surface-1);
  color: var(--sb-ink);
  box-shadow: 0 0 0 1px #ffffff1f, 0 8px 24px #0c011733;
}
.button.is-dark:hover,
.button.shadow-superglow-button:hover {
  background-color: var(--sb-surface-2);
  box-shadow: 0 0 0 1px #ffffff33, 0 10px 32px #0c01174d;
}

/* Secondary: glass. .button-secondary (a wrapper with a gradient hairline
   and an inner _content) is the older markup for the same button; both
   read identically. */
.button.is-secondary {
  background-color: #ffffff0f;
  color: var(--sb-ink);
  box-shadow: inset 0 0 0 1px #ffffff4d;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.button.is-secondary:hover {
  background-color: #ffffff1f;
  box-shadow: inset 0 0 0 1px #ffffff80;
}
.button-secondary {
  border-radius: var(--sb-radius-pill);
  padding: 1px;
}
.button-secondary_content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sb-space-2);
  min-height: calc(var(--sb-button-h) - 2px);
  padding: 0 var(--sb-button-px);
  border-radius: var(--sb-radius-pill);
  font-family: var(--sb-font);
  font-size: var(--sb-fs-base);
  font-weight: var(--sb-weight-semibold);
  line-height: 1;
}

/* Text: a link that sits with buttons. */
.button.is-text {
  min-height: auto;
  padding: 0;
  background-color: transparent;
  color: inherit;
  box-shadow: none;
}

/* Inside the email capture pill the button keeps its size next to the field. */
.contact-form_wrapper .button {
  flex: none;
}

@media screen and (max-width: 479px) {
  .button {
    padding: 0 1.125rem;
    font-size: var(--sb-fs-sm);
  }
}
