/* Rooted — design system framework.
   Verbatim from the design kit's design-system/styles.css.
   Re-skin by swapping the --ds-* token values in @tokens below; nothing
   downstream (rooted-bb.css, rooted-home.css, the BB layout) hardcodes a hex. */

/* @tokens */
:root {
  --ds-color-ground: #F5F1EC;
  --ds-color-panel: #ECE3DA;
  --ds-color-elevated: #FBF7F2;
  --ds-color-petal: #F3E5E1;
  --ds-color-ink-deep: #2C2429;
  --ds-color-on-ink: #F5F1EC;
  --ds-color-on-ink-70: rgba(245,241,236,0.72);
  --ds-color-on-ink-18: rgba(245,241,236,0.20);
  --ds-color-accent: #8A5560;
  --ds-color-accent-deep: #6F3E49;
  --ds-color-accent-light: #CBA0A6;
  --ds-color-text: #43383C;
  --ds-color-text-80: rgba(67,56,60,0.82);
  --ds-color-text-55: rgba(67,56,60,0.56);
  --ds-color-text-25: rgba(67,56,60,0.26);
  --ds-color-text-12: rgba(67,56,60,0.12);
  --ds-color-on-accent: #FFFFFF;
  --ds-font-heading: 'Cormorant Garamond', Georgia, serif;
  --ds-font-body: 'Nunito Sans', system-ui, sans-serif;
  --ds-weight-regular: 400;
  --ds-weight-medium: 600;
  --ds-weight-semibold: 600;
  --ds-space-xs: 0.5rem;
  --ds-space-sm: 1rem;
  --ds-space-md: 1.5rem;
  --ds-space-lg: 2.5rem;
  --ds-space-xl: 4rem;
  --ds-space-2xl: 6rem;
  --ds-space-section: 7rem;
  --ds-text-xs: 0.75rem;
  --ds-text-sm: 0.875rem;
  --ds-text-base: 1rem;
  --ds-text-lg: 1.125rem;
  --ds-text-xl: 1.3rem;
  --ds-text-2xl: clamp(1.5rem, 1.2rem + 1vw, 1.85rem);
  --ds-text-3xl: clamp(1.9rem, 1.4rem + 2vw, 2.65rem);
  --ds-text-4xl: clamp(2.4rem, 1.7rem + 3vw, 3.6rem);
  --ds-text-5xl: clamp(2.9rem, 1.9rem + 4.4vw, 4.9rem);
  --ds-line-tight: 1.08;
  --ds-line-snug: 1.2;
  --ds-line-body: 1.65;
  --ds-radius-sm: 4px;
  --ds-radius-md: 12px;
  --ds-transition-base: 0.3s ease-out;
  --ds-width-container: 1180px;
  --ds-system-root-font-size: 16px;
}

html { font-size: var(--ds-system-root-font-size); }

/* @reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, blockquote, figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { color: inherit; font: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
blockquote { padding: 0; border: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* @base */
body {
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-regular);
  color: var(--ds-color-text);
  background: var(--ds-color-ground);
  line-height: var(--ds-line-body);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1, h2, h3, h4 {
  font-family: var(--ds-font-heading);
  font-weight: var(--ds-weight-semibold);
  line-height: var(--ds-line-tight);
  color: var(--ds-color-text);
  text-wrap: balance;
}
h2 { font-size: var(--ds-text-3xl); margin-bottom: var(--ds-space-md); }
h3 { font-size: var(--ds-text-xl); margin-bottom: var(--ds-space-sm); line-height: var(--ds-line-snug); }
h4 { font-size: var(--ds-text-lg); margin-bottom: var(--ds-space-xs); line-height: var(--ds-line-snug); }

.bb-container {
  width: 100%;
  max-width: var(--ds-width-container);
  margin-inline: auto;
  padding-inline: var(--ds-space-lg);
}

.bb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-medium);
  letter-spacing: 0.01em;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  transition: background var(--ds-transition-base), border-color var(--ds-transition-base), color var(--ds-transition-base);
}
.bb-btn-primary { background: var(--ds-color-accent); color: var(--ds-color-on-accent); }
.bb-btn-primary:hover { background: var(--ds-color-accent-deep); }
.bb-btn-outline { background: transparent; color: var(--ds-color-text); border: 1px solid var(--ds-color-text-25); }
.bb-btn-outline:hover { border-color: var(--ds-color-accent); color: var(--ds-color-accent-deep); }

.bb-hero {
  position: relative;
  min-height: 360px;
  height: 52svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--ds-space-xl);
  overflow: hidden;
}
.bb-hero-bg { position: absolute; inset: 0; z-index: 0; }
.bb-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.bb-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(44,36,41,0.82) 0%, rgba(44,36,41,0.62) 48%, rgba(44,36,41,0.34) 100%);
}
.bb-hero .bb-container { position: relative; z-index: 1; }
.bb-hero-content { max-width: 620px; }
.bb-hero h1 { font-size: var(--ds-text-4xl); color: var(--ds-color-on-ink); margin-bottom: var(--ds-space-sm); }
.bb-hero-lede { font-size: var(--ds-text-lg); line-height: 1.55; color: var(--ds-color-on-ink-70); max-width: 52ch; }

.bb-section { padding: var(--ds-space-section) 0; }
.bb-section--panel { background: var(--ds-color-panel); }
.bb-section--petal { background: var(--ds-color-petal); }
.bb-lead-measure { max-width: 60ch; }
.bb-section__intro { max-width: 60ch; }
.bb-section__intro p { color: var(--ds-color-text-55); margin-top: var(--ds-space-sm); }

.bb-grid { display: grid; gap: var(--ds-space-md); }
.bb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bb-grid--4 { grid-template-columns: repeat(4, 1fr); }
.bb-grid--2 { grid-template-columns: repeat(2, 1fr); }

.bb-card {
  background: var(--ds-color-elevated);
  border: 1px solid var(--ds-color-text-12);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-lg);
  transition: border-color var(--ds-transition-base);
}
.bb-card:hover { border-color: var(--ds-color-accent); }

.bb-stars { display: inline-flex; gap: 0.18rem; color: var(--ds-color-accent); }
.bb-stars svg { width: 1.05rem; height: 1.05rem; }

.bb-quote {
  position: relative;
  background: var(--ds-color-elevated);
  border: 1px solid var(--ds-color-text-12);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-lg);
  transition: border-color var(--ds-transition-base);
}
.bb-quote:hover { border-color: var(--ds-color-accent); }
.bb-quote__mark { font-family: var(--ds-font-heading); font-size: 3.4rem; line-height: 0.5; color: var(--ds-color-accent); opacity: 0.26; display: block; height: 1.4rem; }
.bb-quote__text { margin-top: var(--ds-space-sm); color: var(--ds-color-text-80); }
.bb-quote__author { font-size: var(--ds-text-sm); color: var(--ds-color-text-55); margin-top: var(--ds-space-md); }
.bb-quote__author strong { color: var(--ds-color-text); font-weight: var(--ds-weight-medium); }

.bb-teacher {
  background: var(--ds-color-elevated);
  border: 1px solid var(--ds-color-text-12);
  border-radius: var(--ds-radius-md);
  overflow: hidden;
  transition: border-color var(--ds-transition-base);
}
.bb-teacher:hover { border-color: var(--ds-color-accent); }
.bb-teacher__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
.bb-teacher__body { padding: var(--ds-space-md); }
.bb-teacher__role { font-size: var(--ds-text-sm); color: var(--ds-color-accent-deep); font-weight: var(--ds-weight-medium); margin-top: 0.25rem; }
.bb-teacher__bio { color: var(--ds-color-text-55); margin-top: var(--ds-space-sm); font-size: var(--ds-text-sm); }

.bb-tier {
  position: relative;
  background: var(--ds-color-elevated);
  border: 1px solid var(--ds-color-text-12);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-lg);
  display: flex;
  flex-direction: column;
  transition: border-color var(--ds-transition-base);
}
.bb-tier:hover { border-color: var(--ds-color-accent); }
.bb-tier--featured { border: 2px solid var(--ds-color-accent); background: var(--ds-color-petal); }
.bb-tier__badge { align-self: flex-start; background: var(--ds-color-accent); color: var(--ds-color-on-accent); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-medium); letter-spacing: 0.01em; padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: var(--ds-space-sm); }
.bb-tier__price { font-family: var(--ds-font-body); display: flex; align-items: baseline; gap: 0.3rem; margin-top: var(--ds-space-xs); }
.bb-tier__amt { font-size: var(--ds-text-3xl); color: var(--ds-color-accent-deep); font-weight: var(--ds-weight-medium); line-height: 1; }
.bb-tier__per { font-size: var(--ds-text-sm); color: var(--ds-color-text-55); }
.bb-tier__list { margin-top: var(--ds-space-md); margin-bottom: var(--ds-space-lg); }
.bb-tier__list li { padding: 0.4rem 0; color: var(--ds-color-text-80); display: flex; gap: 0.55rem; align-items: flex-start; border-top: 1px solid var(--ds-color-text-12); }
.bb-tier__list li:first-child { border-top: none; }
.bb-tier__list svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--ds-color-accent); margin-top: 0.2rem; }
.bb-tier__cta { margin-top: auto; }

.bb-tearsheet {
  background: var(--ds-color-elevated);
  border: 1px solid var(--ds-color-text-12);
  border-radius: var(--ds-radius-md);
  overflow: hidden;
  transition: border-color var(--ds-transition-base);
}
.bb-tearsheet:hover { border-color: var(--ds-color-accent); }
.bb-tearsheet__cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bb-tearsheet__body { padding: var(--ds-space-md); }
.bb-tearsheet__pub { font-family: var(--ds-font-heading); font-size: var(--ds-text-lg); line-height: var(--ds-line-snug); color: var(--ds-color-text); }
.bb-tearsheet__issue { display: inline-block; font-size: var(--ds-text-xs); color: var(--ds-color-text-55); font-weight: var(--ds-weight-medium); margin-top: 0.35rem; }

.bb-datarow { display: flex; align-items: baseline; gap: var(--ds-space-md); padding: var(--ds-space-md) 0; border-top: 1px solid var(--ds-color-text-12); }
.bb-datarow__time { font-family: var(--ds-font-body); font-weight: var(--ds-weight-medium); color: var(--ds-color-accent-deep); min-width: 9.5rem; }
.bb-datarow__title { font-family: var(--ds-font-heading); font-size: var(--ds-text-xl); line-height: var(--ds-line-snug); }
.bb-datarow__meta { color: var(--ds-color-text-55); font-size: var(--ds-text-sm); margin-top: 0.15rem; }

.bb-stack { position: relative; }
.bb-stack__back img { width: 100%; border-radius: var(--ds-radius-md); }
.bb-stack__front { position: absolute; right: -1.5rem; bottom: -1.5rem; width: 42%; padding: 0.5rem; background: var(--ds-color-elevated); border-radius: var(--ds-radius-md); box-shadow: inset 0 0 0 1px var(--ds-color-text-12); }
.bb-stack__front img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--ds-radius-sm); }

.bb-cta-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ds-color-accent-deep); font-weight: var(--ds-weight-medium); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; transition: color var(--ds-transition-base); }
.bb-cta-link:hover { color: var(--ds-color-accent); }
.bb-cta-link svg { width: 1em; height: 1em; flex: none; }

.bb-carousel { position: relative; }
.bb-carousel__slide[hidden] { display: none; }
.bb-carousel__controls { display: flex; align-items: center; gap: var(--ds-space-sm); margin-top: var(--ds-space-md); }
.bb-carousel__btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ds-color-text); border: 1px solid var(--ds-color-text-25); transition: color var(--ds-transition-base), border-color var(--ds-transition-base); }
.bb-carousel__btn:hover { color: var(--ds-color-accent); border-color: var(--ds-color-accent); }
.bb-carousel__btn svg { width: 1.1em; height: 1.1em; }
.bb-carousel__dots { display: flex; gap: 0.5rem; margin-left: auto; }
.bb-carousel__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ds-color-text-25); transition: background var(--ds-transition-base); }
.bb-carousel__dot[aria-current="true"] { background: var(--ds-color-accent); }

.bb-wordmark { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--ds-color-text); }
.bb-wordmark__icon { width: 2.6rem; height: 2.6rem; flex: none; color: var(--ds-color-accent); }
.bb-wordmark__name { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-2xl); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.bb-wordmark__sub { font-family: var(--ds-font-body); font-weight: var(--ds-weight-medium); font-size: var(--ds-text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ds-color-text-55); margin-top: 0.35rem; }

.bb-masthead { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ds-space-md); flex-wrap: wrap; border-top: 1px solid var(--ds-color-text-25); border-bottom: 1px solid var(--ds-color-text-12); padding: var(--ds-space-sm) 0; }
.bb-masthead__title { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-2xl); margin-bottom: 0; }
.bb-masthead__edition { font-family: var(--ds-font-body); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); letter-spacing: 0.01em; color: var(--ds-color-accent-deep); }

.bb-dropcap::first-letter { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: 3.4em; line-height: 0.72; float: left; margin: 0.04em 0.1em 0 0; color: var(--ds-color-text); }

.bb-pagehead { background: var(--ds-color-panel); padding: var(--ds-space-xl) 0 var(--ds-space-2xl); }
.bb-pagehead__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-space-md); flex-wrap: wrap; padding-bottom: var(--ds-space-md); border-bottom: 1px solid var(--ds-color-text-12); }
.bb-pagehead__edition { font-family: var(--ds-font-body); font-weight: var(--ds-weight-medium); font-size: var(--ds-text-sm); color: var(--ds-color-accent-deep); letter-spacing: 0.01em; }
.bb-pagehead__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--ds-space-2xl); align-items: end; margin: var(--ds-space-2xl) 0 var(--ds-space-xl); }
.bb-pagehead h1 { font-size: var(--ds-text-4xl); }
.bb-pagehead--lead h1 { font-size: var(--ds-text-5xl); }
.bb-pagehead__lede { font-size: var(--ds-text-lg); line-height: 1.5; color: var(--ds-color-text-80); }
.bb-pagehead__actions { display: flex; gap: var(--ds-space-sm); flex-wrap: wrap; margin-top: var(--ds-space-lg); }
.bb-pagehead__media img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--ds-radius-md); }

.cta-band { background: var(--ds-color-ink-deep); color: var(--ds-color-on-ink); border-top: 1px solid var(--ds-color-on-ink-18); padding: var(--ds-space-2xl) 0; }
.cta-band__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--ds-space-xl); align-items: center; }
.cta-band h2 { color: var(--ds-color-on-ink); margin-top: var(--ds-space-md); }
.cta-band__lede { color: var(--ds-color-on-ink-70); margin-top: var(--ds-space-sm); max-width: 46ch; }
.cta-band__meta { color: var(--ds-color-on-ink-70); font-size: var(--ds-text-sm); margin-top: var(--ds-space-md); }
.cta-band__actions { display: flex; gap: var(--ds-space-sm); flex-wrap: wrap; align-items: center; }
.cta-band .bb-wordmark { color: var(--ds-color-on-ink); }
.cta-band .bb-wordmark__icon { color: var(--ds-color-accent-light); }
.cta-band .bb-wordmark__sub { color: var(--ds-color-on-ink-70); }
.cta-band .bb-btn-primary { background: var(--ds-color-accent-light); color: var(--ds-color-ink-deep); }
.cta-band .bb-btn-primary:hover { background: var(--ds-color-on-ink); }
.cta-band .bb-btn-outline { color: var(--ds-color-on-ink); border-color: var(--ds-color-on-ink-18); }
.cta-band .bb-btn-outline:hover { border-color: var(--ds-color-on-ink); color: var(--ds-color-on-ink); }

.bb-band--ink { background-color: var(--ds-color-ink-deep); color: var(--ds-color-on-ink); }
.bb-band--ink h2, .bb-band--ink h3 { color: var(--ds-color-on-ink); }
.bb-band--ink p { color: var(--ds-color-on-ink-70); }
.bb-band--ink .bb-quote__text { color: var(--ds-color-on-ink); }
.bb-band--ink .bb-quote__author { color: var(--ds-color-on-ink-70); }
.bb-band--ink .bb-quote__author strong { color: var(--ds-color-on-ink); }
.bb-band--ink .bb-stars { color: var(--ds-color-accent-light); }
.bb-band--ink .bb-cta-link { color: var(--ds-color-accent-light); }
.bb-band--ink .bb-btn-primary { background: var(--ds-color-accent-light); color: var(--ds-color-ink-deep); }
.bb-band--ink .bb-btn-primary:hover { background: var(--ds-color-on-ink); }
.bb-band--ink .bb-btn-outline { color: var(--ds-color-on-ink); border-color: var(--ds-color-on-ink-18); }

@media (max-width: 980px) {
  .bb-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .bb-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root {
    --ds-space-section: 4.5rem;
    --ds-space-2xl: 3.25rem;
    --ds-space-xl: 3rem;
  }
  .bb-container { padding-inline: var(--ds-space-md); }
  .cta-band__inner { grid-template-columns: 1fr; gap: var(--ds-space-lg); }
  .bb-pagehead__top { grid-template-columns: 1fr; gap: var(--ds-space-md); align-items: start; }
  .bb-pagehead--lead h1 { font-size: var(--ds-text-4xl); }
  .bb-pagehead__media img { aspect-ratio: 4 / 3; }
  .bb-datarow { flex-direction: column; gap: 0.25rem; }
}
@media (max-width: 600px) {
  .bb-grid--4, .bb-grid--3, .bb-grid--2 { grid-template-columns: 1fr; }
  .bb-stack__front { position: static; width: 70%; margin: -2rem 0 0 auto; }
}
@media (max-width: 480px) {
  :root {
    --ds-space-section: 3.5rem;
    --ds-space-2xl: 2.75rem;
  }
  .bb-container { padding-inline: 1.25rem; }
}
