/* ============================================================
   RYLSTONE CLASSIC — BASE LAYER
   Light reset + brand helper classes shared by cards & kits.
   Tokens come from the files imported ahead of this one.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--role-body-size);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Type helpers ---- */
.rc-display { font-family: var(--font-display); font-weight: 400; line-height: var(--leading-flat); letter-spacing: var(--tracking-display); text-transform: uppercase; }
.rc-condensed { font-family: var(--font-condensed); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.rc-script { font-family: var(--font-script); font-weight: 400; text-transform: none; letter-spacing: 0; line-height: 1; }
.rc-overline { font-family: var(--font-condensed); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); font-size: var(--role-overline-size); }
.rc-emboss { text-shadow: var(--emboss-on-red); }

/* ---- Field backgrounds ---- */
.rc-field-red  { background: var(--gradient-red-field);  color: var(--text-on-red); }
.rc-field-ink  { background: var(--gradient-ink-field);  color: var(--text-inverse); }
.rc-gold-plate { background: var(--gradient-gold-plate); color: var(--rc-black); }

/* The fixed gold base stripe used across social tiles */
.rc-gold-bar { height: 14px; background: var(--rc-gold); }
.rc-red-bar  { height: 14px; background: var(--rc-red-bar); }
.rc-field-cream { background: var(--rc-cream); color: var(--rc-red); }

/* ---- Decorative laurel-style rules ("— text —") ---- */
.rc-rule-label {
  display: flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-condensed); text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.rc-rule-label::before, .rc-rule-label::after {
  content: ""; flex: 1 1 auto; height: 2px; background: currentColor;
}

/* ---- Focus visibility ---- */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Buttons: never break a label inside a fixed-height button ----
   Buttons and button-style links across the site set a fixed height. When a label wrapped, its
   second line spilled outside the button. On wider screens labels stay on one line; on phones a
   label that cannot fit grows the button instead, centred, with even padding. */
:where(a, button, label)[style^="height:"],
:where(a, button, label)[style*=" height:"],
:where(a, button, label)[style*=";height:"] {
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
}
@media (max-width: 560px) {
  :where(a, button, label)[style^="height:"],
  :where(a, button, label)[style*=" height:"],
  :where(a, button, label)[style*=";height:"] {
    white-space: normal;
    height: auto !important;
    min-height: 44px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.15 !important;
    text-align: center;
    text-wrap: balance;
  }
}
