/* Shared editorial rhythm for RailWise's public content pages. */
body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact) {
  --rw-page-ink: #14202d;
  --rw-page-muted: #526273;
  --rw-page-line: #dce4eb;
  --rw-page-blue: #0873d1;
  --rw-page-width: 1280px;
  color: var(--rw-page-ink);
}

body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact) main .container {
  max-width: var(--rw-page-width);
}

body:is(.page-products, .page-news, .page-contact) .site-page-hero,
body.page-services .svc-hero.rw-scene-hero,
body.page-help .help-hero.rw-scene-hero,
body.page-cases .case-list-hero.rw-scene-hero {
  min-height: clamp(380px, 38vw, 520px);
  padding-top: clamp(5.5rem, 8vw, 7.25rem);
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

body:is(.page-products, .page-news, .page-contact) .site-page-hero__content,
body.page-services .svc-hero__title,
body.page-help .help-hero__inner,
body.page-cases .case-list-hero__content,
body.page-about .about-story__text {
  max-width: 48rem;
}

body:is(.page-products, .page-news, .page-contact) .site-page-hero h1,
body.page-services .svc-hero__title,
body.page-help .help-hero__title,
body.page-cases .case-list-hero h1,
body.page-about .about-story .about-section__title {
  font-size: 4.5rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

body:is(.page-products, .page-news, .page-contact) .site-page-hero p,
body.page-services .svc-hero__sub,
body.page-help .help-hero__lede,
body.page-cases .case-list-hero__content p,
body.page-about .about-story__body p {
  max-width: 44rem;
  font-size: clamp(1rem, .97rem + .24vw, 1.125rem);
  line-height: 1.75;
}

body.page-services .svc-hero__title-accent,
body.page-help .help-hero__grad {
  color: inherit;
  background: none;
  -webkit-text-fill-color: currentColor;
}

body.page-products .section-heading h2,
body.page-services .svc-sec-title,
body.page-help .help-section__title,
body.page-about .about-section__title,
body.page-contact h2,
body.page-cases .case-cta-panel h2 {
  color: var(--rw-page-ink);
  text-wrap: balance;
}

body.page-products .section-heading p,
body.page-services .svc-sec-sub,
body.page-help .help-section__sub,
body.page-about .about-section__sub {
  color: var(--rw-page-muted);
  line-height: 1.75;
}

body.page-products .product-card.compact,
body.page-services .svc-pillar,
body.page-cases .case-list-card,
body.page-news .card-premium,
body.page-help .help-support-path,
body.page-help .help-card,
body.page-about .about-belief__card,
body.page-about .about-honor,
body.page-contact .contact-intent-card {
  border-radius: 8px;
  border-color: var(--rw-page-line);
}

body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact) :focus-visible {
  outline: 3px solid var(--rw-page-blue);
  outline-offset: 3px;
}

/* One restrained, user-triggered reveal rhythm across content pages. */
body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact)
:is(.reveal, .reveal-left, .reveal-right, .reveal-scale, [data-reveal]) {
  opacity: 1;
  transform: none;
  transition: opacity 700ms cubic-bezier(.22, 1, .36, 1),
    transform 700ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--delay, var(--d, 0s));
}

html.js-reveal-ready body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact)
:is(.reveal, .reveal-left, .reveal-right, .reveal-scale, [data-reveal]):not(.visible) {
  opacity: 0;
  transform: translateY(18px);
}

body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact)
:is(.reveal, .reveal-left, .reveal-right, .reveal-scale, [data-reveal]).visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  body:is(.page-products, .page-news, .page-contact) .site-page-hero,
  body.page-services .svc-hero.rw-scene-hero,
  body.page-help .help-hero.rw-scene-hero,
  body.page-cases .case-list-hero.rw-scene-hero {
    min-height: 0;
    padding: 5.75rem 0 3rem;
  }

  body:is(.page-products, .page-news, .page-contact) .site-page-hero h1,
  body.page-services .svc-hero__title,
  body.page-help .help-hero__title,
  body.page-cases .case-list-hero h1,
  body.page-about .about-story .about-section__title {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body:is(.page-products, .page-news, .page-contact) .site-page-hero h1,
  body.page-services .svc-hero__title,
  body.page-help .help-hero__title,
  body.page-cases .case-list-hero h1,
  body.page-about .about-story .about-section__title {
    font-size: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:is(.page-products, .page-services, .page-cases, .page-news, .page-help, .page-about, .page-contact)
  :is(.reveal, .reveal-left, .reveal-right, .reveal-scale, [data-reveal]) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
