/* ReBorn — Typography & spacing scale (SEO / readability)
========================================================= */

:root {
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.125rem;
  --fs-h3: clamp(1.05rem, 1.5vw, 1.25rem);
  --fs-h2: clamp(1.45rem, 2.6vw, 2.05rem);
  --fs-h1: clamp(1.65rem, 3.2vw, 2.45rem);
  --fs-display: clamp(1.35rem, 3vw, 2.1rem);
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-body: 1.65;
  --lh-loose: 1.75;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.5rem;
  --space-section: clamp(2.5rem, 5vw, 4.25rem);
}

body.rb-ui {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.rb-section__title,
.rb-product__name,
.rb-catalog-card__title,
.rb-blog-card__title,
.rb-card__title,
.rb-aside__title,
.rb-widget__title {
  font-family: var(--display);
  font-weight: 750;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

/* Hero titles keep their own colors (white on dark media) */
.rb-page-hero__title,
.rb-hero__title {
  font-family: var(--display);
  font-weight: 750;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); margin: 0 0 var(--space-3); }
.rb-page-hero__title {
  font-size: var(--fs-h1);
  margin: 0 0 var(--space-3);
  color: #fff !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
h2, .rb-section__title { font-size: var(--fs-h2); margin: 0 0 var(--space-3); }
h3, .rb-aside__title, .rb-widget__title, .rb-catalog-card__title,
.rb-blog-card__title, .rb-card__title { font-size: var(--fs-h3); margin: 0 0 var(--space-2); }

p, .rb-section__desc, .rb-hero__text, .rb-prose p, .rb-card__text,
.rb-blog-card__body p, .rb-widget__text {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  margin: 0 0 var(--space-4);
}

.rb-eyebrow,
.rb-page-hero__eyebrow,
.rb-hero__brand {
  font-family: var(--display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
  line-height: 1.3;
}

.rb-section,
.rb-section--tight,
.rb-blog-area,
.rb-faq-page,
.rb-svc-detail,
.rb-product,
.rb-project-detail,
.rb-contact-page,
.rb-catalog,
.rb-article-area,
.rb-about-page,
.rb-faq {
  padding-top: var(--space-section) !important;
  padding-bottom: var(--space-section) !important;
}

.rb-section__head {
  margin-bottom: var(--space-6) !important;
  display: grid;
  gap: var(--space-2);
}
.rb-section__head--center { text-align: center; justify-items: center; }
.rb-section__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}

.rb-prose {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
}
.rb-prose h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin-top: 1.4em; }
.rb-prose h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); margin-top: 1.25em; }
.rb-prose p + p { margin-top: 0.85em; }
.rb-prose ul, .rb-prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.rb-prose li { margin-bottom: 0.4em; line-height: var(--lh-body); }

.rb-nav > ul > li > a {
  font-size: 0.78rem !important;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.rb-footer h3 {
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4) !important;
}
.rb-footer__links a,
.rb-footer__hours p,
.rb-footer__news-item {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

.rb-btn {
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 699px) {
  :root {
    --fs-base: 0.97rem;
    --fs-md: 1rem;
    --space-section: 2.25rem;
  }
  .rb-hero__title { font-size: clamp(1.2rem, 5.5vw, 1.55rem) !important; }
}
