/*
 * Run Fit Well V2 — reset + shared primitives
 * ---------------------------------------------------------------------------
 * Owns: the reset, typography, .rfw-wrap, .rfw-eyebrow, .rfw-section-title,
 * .rfw-section-lead, .rfw-btn, the <details> accordion, and the skip link.
 *
 * Every value traces to design-reference/Corporate Wellness-Final-Design.html.
 * Colours come from tokens.css only — no raw hex below.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--rfw-text);
  background: var(--rfw-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.rfw-menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: Manrope, sans-serif;
}

/* ------------------------------------------------------------------ *
 * Layout primitive
 * ------------------------------------------------------------------ */
.rfw-wrap {
  width: min(var(--rfw-max), calc(100% - 48px));
  margin-inline: auto;
}

/* ------------------------------------------------------------------ *
 * Skip link — keyboard affordance, invisible until focused.
 * ------------------------------------------------------------------ */
.rfw-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  background: var(--rfw-accent);
  color: var(--rfw-btn-primary-text);
  font-weight: 800;
}

.rfw-skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ *
 * Screen-reader-only text
 * ------------------------------------------------------------------ */
.rfw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ *
 * Eyebrow
 * ------------------------------------------------------------------ */
.rfw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rfw-section-eyebrow);
}

.rfw-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--rfw-accent), var(--rfw-accent-2));
}

/* A cleared eyebrow field must leave no orphan dash and no gap. */
.rfw-eyebrow:empty {
  display: none;
}

/* ------------------------------------------------------------------ *
 * Section headings
 * ------------------------------------------------------------------ */
.rfw-section-title {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2.15rem, 4.4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -.055em;
}

.rfw-section-lead {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--rfw-section-muted);
  font-size: 1.04rem;
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.rfw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: .22s ease;
}

.rfw-btn--primary {
  background: var(--rfw-btn-primary-bg);
  color: var(--rfw-btn-primary-text);
}

.rfw-btn--primary:hover {
  background: var(--rfw-btn-primary-hover);
  transform: translateY(-2px);
}

.rfw-btn--dark {
  background: var(--rfw-btn-dark-bg);
  color: var(--rfw-on-dark);
}

.rfw-btn--dark:hover {
  background: var(--rfw-btn-dark-hover);
  transform: translateY(-2px);
}

.rfw-btn--light {
  background: var(--rfw-white);
  color: var(--rfw-ink);
  border-color: var(--rfw-btn-light-border);
}

.rfw-btn--light:hover {
  transform: translateY(-2px);
  box-shadow: var(--rfw-btn-light-shadow);
}

/* ------------------------------------------------------------------ *
 * Accordion — native <details>, zero JavaScript.
 * ------------------------------------------------------------------ */
.rfw-accordion {
  border-top: 1px solid var(--rfw-line-faq);
}

.rfw-accordion details {
  border-bottom: 1px solid var(--rfw-line-faq);
  padding: 20px 0;
}

.rfw-accordion summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}

.rfw-accordion summary::-webkit-details-marker {
  display: none;
}

.rfw-accordion summary::after {
  content: "+";
  color: var(--rfw-accent-deep);
  font-size: 1.25rem;
}

.rfw-accordion details[open] summary::after {
  content: "\2212";
}

.rfw-accordion details p {
  margin: 11px 0 0;
  color: var(--rfw-muted);
}

/* ------------------------------------------------------------------ *
 * Focus visibility — applies everywhere, adds no layout.
 * ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--rfw-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * Motion preference
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------------ *
 * Responsive — the reference's two breakpoints.
 * ------------------------------------------------------------------ */
@media (max-width: 650px) {
  .rfw-wrap {
    width: min(100% - 32px, var(--rfw-max));
  }
}
