/* Homepage hero */
.rwb-hero__tag {
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 0 1rem;
  background: var(--surface-color);
}
.rwb-hero__tag--active {
  background-color: var(--primary-color);
  color: var(--primary-color-inverse);

  border-radius: 1.5rem;
}
.rwb-hero__tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.rwb-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 3rem;
  align-items: center;
  padding: 3rem;
  background: #ffffff;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.rwb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: inherit;
  pointer-events: none;
}

.rwb-hero__content {
  max-width: 42rem;
}

.rwb-hero__eyebrow {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color-muted);
}

.rwb-hero__title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-color-strong);
}

.rwb-hero__text {
  margin: 1.25rem 0 0;
  max-width: 60ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-color-muted);
}

.rwb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.75rem;
}

.rwb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform var(--transition-duration),
    box-shadow var(--transition-duration),
    background-color var(--transition-duration);
}

.rwb-button:hover {
  transform: translateY(-1px);
}

.rwb-button:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.rwb-button--primary {
  background: var(--text-color-strong);
  color: var(--surface-color);
  border-color: var(--text-color-strong);
}
.rwb-button--primary:hover {
  background: var(--text-color-strong-hover);
  border-color: var(--text-color-strong-hover);
}

.rwb-button--secondary {
  background: var(--surface-color);
  color: var(--text-color-strong);
}

.rwb-hero__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.rwb-hero__highlights li {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-color);
  color: var(--text-color-muted);
  font-size: 0.9375rem;
}

.rwb-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.rwb-hero-visual {
  position: relative;
  width: min(100%, 540px);
  min-height: 360px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #fbfbfc 0%, #f4f4f6 100%);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
}

.rwb-hero-visual__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 92%);
  pointer-events: none;
}

.rwb-hero-visual__card {
  position: relative;
  border: 1px solid #cfcfd4;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.03);
}

.rwb-hero-visual__card--top {
  width: 74%;
  min-height: 92px;
  padding: 1.25rem;
  margin-bottom: 1.2rem;
}

.rwb-hero-visual__card--floating {
  position: absolute;
  top: 2rem;
  right: 1.5rem;
  width: 92px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
}

.rwb-hero-visual__card--bottom {
  min-height: 180px;
  padding: 1.25rem;
  margin-top: 0.35rem;
}

.rwb-hero-visual__chip {
  width: 110px;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
}

.rwb-hero-visual__line {
  height: 12px;
  margin-top: 1rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
}

.rwb-hero-visual__line--short {
  width: 48%;
}

.rwb-hero-visual__line--medium {
  width: 68%;
}

.rwb-hero-visual__focus {
  width: 44px;
  height: 84px;
  border-radius: 1.5rem;
  background: rgba(37, 99, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rwb-hero-visual__bar {
  width: 8px;
  height: 58px;
  border-radius: 999px;
  background: #1f2937;
}

.rwb-hero-visual__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.rwb-hero-visual__tag {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Hero accessibility diagram */
.hero-diagram {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
}

.diagram-stroke {
  stroke: rgba(0, 0, 0, 0.14);
  stroke-width: 1.5;
  fill: none;
}

.diagram-frame {
  stroke: rgba(0, 0, 0, 0.07);
  stroke-width: 1;
}

.diagram-soft-fill {
  fill: rgba(0, 0, 0, 0.025);
}

.diagram-focus {
  stroke: rgba(0, 0, 0, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}

.diagram-line {
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 1;
  fill: none;
}

.diagram-arrow-fill {
  fill: rgba(0, 0, 0, 0.12);
}

.diagram-number {
  font-size: 11px;
  font-family: system-ui, sans-serif;
  fill: rgba(0, 0, 0, 0.28);
  font-weight: 600;
}

@media (max-width: 960px) {
  .rwb-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 2rem 3rem;
  }

  .rwb-hero__title {
    max-width: none;
  }

  .rwb-hero__visual {
    display: none;
  }

  .rwb-hero-visual {
    width: 100%;
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .rwb-hero-visual {
    min-height: 290px;
    padding: 1rem;
    border-radius: 1.5rem;
  }

  .rwb-hero-visual__card--top {
    width: 72%;
    min-height: 82px;
    padding: 1rem;
  }

  .rwb-hero-visual__card--floating {
    top: 1.4rem;
    right: 1rem;
    width: 78px;
    min-height: 78px;
  }

  .rwb-hero-visual__card--bottom {
    min-height: 150px;
    padding: 1rem;
  }

  .rwb-hero-visual__chip {
    width: 88px;
    height: 2.35rem;
  }

  .rwb-hero-visual__tag {
    font-size: 0.875rem;
    padding: 0.45rem 0.8rem;
  }

  .rwb-hero__highlights {
    gap: 0.5rem;
  }

  .rwb-hero__highlights li {
    font-size: 0.875rem;
  }
}

.rwb-info-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin: 4rem 0 0 0;
}

.rwb-info-section {
  padding: 2rem;
  max-width: 75ch;
  border-radius: 1.5rem;
  background: var(--primary-color);
  color: var(--primary-color-inverse);
}

@media (max-width: 640px) {
  .rwb-info-pair {
    grid-template-columns: 1fr;
  }
}

.rwb-info-section__title {
  margin-top: 0;
}

.rwb-info-section__desc {
  margin-bottom: 0.75rem;
}

.rwb-info-section__list {
  padding-left: 1.25rem;
}

.rwb-featured {
  padding: 1rem 0 0.5rem;
}

.rwb-featured__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.rwb-featured__title {
  margin-bottom: 0;
}

.rwb-featured__text {
  margin: 0;
  max-width: 60ch;
  color: var(--text-color-muted);
}

.rwb-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rwb-feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  background: var(--surface-color);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition-duration),
    box-shadow var(--transition-duration);
}

.rwb-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rwb-feature-card__eyebrow {
  font-size: var(--font-size-xsmall);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
}

.rwb-feature-card__title {
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-color-strong);
}

.rwb-feature-card__desc {
  margin: 0;
  color: var(--text-color-muted);
  line-height: 1.6;
}

/* Framework / what every page covers */
.rwb-framework {
  padding: 2.5rem;
  background: var(--primary-color);
  color: var(--primary-color-inverse);
  border-radius: 1.5rem;
}

.rwb-framework__header {
  margin-bottom: 2rem;
}

.rwb-framework__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
}

.rwb-framework__lead {
  margin: 0;
  max-width: 60ch;
  opacity: 0.8;
  line-height: 1.6;
}

.rwb-framework__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rwb-framework__item {
  padding: 1.5rem 1.25rem 1rem 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.rwb-framework__item:last-child {
  border-right: none;
}

.rwb-framework__item + .rwb-framework__item {
  padding-left: 1.25rem;
}

.rwb-framework__step {
  display: block;
  font-size: var(--font-size-xsmall);
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.45;
  margin-bottom: 0.625rem;
}

.rwb-framework__label {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: var(--font-weight-semibold);
}

.rwb-framework__desc {
  margin: 0;
  font-size: var(--font-size-small);
  line-height: 1.55;
  opacity: 0.72;
}

.rwb-framework__note {
  margin: 1.5rem 0 0;
  font-size: var(--font-size-small);
  opacity: 0.55;
}

/* Component catalog */
.rwb-component-group {
  margin-top: 3rem;
}

.rwb-section-title {
  margin-bottom: 0.25rem;
}

.rwb-component-group__desc {
  margin-bottom: 1.5rem;
  color: var(--text-color-muted);
}

.rwb-component-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.rwb-component-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 1rem;
  background: var(--surface-color);
  transition:
    box-shadow var(--transition-duration),
    transform var(--transition-duration);
}

.rwb-component-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.rwb-component-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.rwb-component-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rwb-component-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.rwb-component-card__desc {
  font-size: var(--font-size-small);
  color: var(--text-color-subtle);
  line-height: 1.4;
}

.rwb-component-card__compliance-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: var(--font-size-xsmall);
  line-height: 1.2;
  color: var(--text-color-muted);
  background: var(--surface-muted);
}

.rwb-component-card__compliance-badge--fallback {
  color: var(--text-color-faint);
  background: var(--surface-color);
}

.rwb-component-card__compliance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

@media (max-width: 960px) {
  .rwb-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 2rem 3rem;
  }

  .rwb-hero__title {
    max-width: none;
  }

  .rwb-featured__grid,
  .rwb-component-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rwb-framework__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rwb-framework__item:nth-child(3) {
    border-right: none;
  }

  .rwb-framework__item:nth-child(4) {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .rwb-hero {
    padding: 1.75rem 1.25rem 2rem;
  }

  .hero-diagram {
    display: none;
  }

  .rwb-hero__highlights {
    gap: 0.5rem;
  }

  .rwb-hero__highlights li {
    font-size: 0.875rem;
  }

  .rwb-featured__grid,
  .rwb-component-grid {
    grid-template-columns: 1fr;
  }

  .rwb-framework {
    padding: 1.5rem;
  }

  .rwb-framework__list {
    grid-template-columns: 1fr;
  }

  .rwb-framework__item,
  .rwb-framework__item + .rwb-framework__item {
    padding: 1.25rem 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .rwb-framework__item:last-child {
    border-bottom: none;
  }

  .rwb-framework__item:nth-child(3) {
    border-right: none;
  }

  .rwb-framework__item:nth-child(4) {
    padding-left: 0;
  }
}
