/* =========================================================
   RINCON STRATEGIES — DESIGN TOKENS + BASE STYLES
   Classical transitional serif + small caps, editorial grid
   ========================================================= */

:root {
  /* Palette — burgundy + ivory + charcoal (editable via Tweaks) */
  --burgundy: #6b1e2a;
  --burgundy-deep: #4d141e;
  --burgundy-muted: #8a3a46;
  --ivory: #f5efe4;
  --ivory-warm: #ece3d2;
  --paper: #faf6ee;
  --charcoal: #1a1915;
  --ink: #0f0e0b;
  --slate: #3a3833;
  --warm-gray: #6c6957;
  --rule: rgba(26, 25, 21, 0.14);
  --rule-dark: rgba(245, 239, 228, 0.18);
  --gold: #c08a3e;

  /* Type */
  --serif: 'Crimson Pro', 'EB Garamond', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --serif-display: 'Crimson Pro', 'EB Garamond', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --tracking-caps: 0.22em;
  --tracking-caps-tight: 0.14em;

  /* Spacing */
  --gutter: clamp(18px, 4vw, 72px);
  --section-y: clamp(48px, 5.5vw, 75px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ========= GRID ========= */
.rs-page { min-height: 100vh; }
.rs-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.rs-wide { max-width: 1600px; }

/* ========= TYPE ========= */
.caps {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: 11px;
  font-weight: 500;
}
.caps-sm { font-size: 10px; letter-spacing: var(--tracking-caps); }
.caps-lg { font-size: 13px; letter-spacing: var(--tracking-caps-tight); font-weight: 500; }

.display {
  font-family: var(--serif-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-feature-settings: "onum", "kern";
}
.display-xxl { font-size: clamp(48px, 6.8vw, 108px); }
.display-xl  { font-size: clamp(40px, 5.4vw, 84px); }
.display-lg  { font-size: clamp(34px, 4.2vw, 68px); }
.display-md  { font-size: clamp(28px, 3.2vw, 50px); }
.display-sm  { font-size: clamp(22px, 2.4vw, 36px); }

.italic { font-style: italic; }

.lede {
  font-family: var(--serif);
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--slate);
}

.body { font-size: 18px; line-height: 1.55; color: var(--slate); }
.body-sm { font-size: 15px; line-height: 1.5; color: var(--slate); }

/* ========= SURFACES ========= */
.surface-ivory { background: var(--ivory); color: var(--ink); }
.surface-paper { background: var(--paper); color: var(--ink); }
.surface-dark  { background: var(--charcoal); color: var(--ivory); }
.surface-burgundy { background: var(--burgundy); color: var(--ivory); }

.surface-dark .caps, .surface-burgundy .caps { color: rgba(245,239,228,0.7); }
.surface-dark a, .surface-burgundy a { color: var(--ivory); }

/* Gold stands in for burgundy accents on dark grounds. */
.surface-dark em,
.surface-dark i { color: var(--gold); }

/* ========= RULES ========= */
.rule-top { border-top: 1px solid var(--rule); }
.rule-bot { border-bottom: 1px solid var(--rule); }
.surface-dark.rule-top, .surface-dark .rule-top { border-top-color: var(--rule-dark); }
.surface-dark .rule-bot { border-bottom-color: var(--rule-dark); }

/* ========= NAV ========= */
.rs-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 240ms ease;
}
.rs-nav.scrolled { box-shadow: 0 1px 0 rgba(47,44,38,0.06); }
.rs-nav.over-dark {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.rs-nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px 0;
}
/* Brand lockup slot — just an anchor that hosts <BrandLockup>. */
.rs-nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.rs-nav-brand:hover { opacity: 0.78; }
.rs-nav-links {
  justify-self: center;
  display: flex; gap: clamp(20px, 3vw, 44px);
}
.rs-nav-links a {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  color: var(--ink);
}
.rs-nav.over-dark .rs-nav-links a { color: var(--ink); }
.rs-nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -20px;
  height: 1px; background: var(--burgundy);
}
.rs-nav.over-dark .rs-nav-links a.active::after { background: var(--burgundy); }
.rs-nav-links a:hover { color: var(--burgundy); }
.rs-nav.over-dark .rs-nav-links a:hover { color: var(--burgundy); opacity: 1; }

.rs-nav-cta {
  font-family: var(--sans);
  text-transform: uppercase;
  margin-right: 20px;
  letter-spacing: var(--tracking-caps-tight);
  font-size: 11px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: all 200ms ease;
}
.rs-nav-cta:hover {
  background: var(--burgundy); color: var(--ivory);
  border-color: var(--burgundy);
}
.rs-nav.over-dark .rs-nav-cta:hover { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }

/* ========= HERO ========= */
.rs-hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  color: var(--ivory);
  background: var(--charcoal);
}
.rs-hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(0.65);
}
.rs-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,14,11,0.35) 0%, rgba(15,14,11,0.15) 30%, rgba(15,14,11,0.85) 95%),
    linear-gradient(120deg, rgba(107,30,42,0.25) 0%, transparent 60%);
}
.rs-hero-content {
  position: relative; z-index: 2;
  width: 100%;
  padding-bottom: clamp(48px, 7vw, 110px);
  padding-top: clamp(100px, 12vw, 180px);
}
.rs-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.rs-hero-eyebrow::before {
  content: ''; width: 40px; height: 1px; background: currentColor; opacity: 0.6;
}
.rs-hero-headline {
  max-width: 18ch;
  margin: 0 0 52px 0;
  font-weight: 400;
}
.rs-hero-sub {
  max-width: 42ch;
  color: rgba(245,239,228,0.85);
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.4;
  font-style: italic;
  font-weight: 400;
}

.rs-hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  border-top: 1px solid rgba(245,239,228,0.22);
  padding: 16px 0;
  display: flex; align-items: center;
}
.rs-hero-foot .rs-container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
}

/* ========= BUTTONS ========= */
.rs-btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  font-size: 12px;
  font-weight: 500;
  padding: 16px 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 200ms ease;
}
.rs-btn:hover { background: var(--ink); color: var(--ivory); }
.rs-btn.primary { background: var(--burgundy); border-color: var(--burgundy); color: var(--ivory); }
.rs-btn.primary:hover { background: var(--burgundy-deep); border-color: var(--burgundy-deep); }
.rs-btn.ghost-light { border-color: var(--ivory); color: var(--ivory); }
.rs-btn.ghost-light:hover { background: var(--ivory); color: var(--charcoal); }
.rs-btn .rs-arr {
  width: 18px; height: 1px; background: currentColor; position: relative;
}
.rs-btn .rs-arr::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ========= SECTION HEADER ========= */
.rs-section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.rs-section-head {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: baseline;
  margin-bottom: 64px;
}
@media (max-width: 820px) {
  .rs-section-head { grid-template-columns: 1fr; gap: 16px; }
}
.rs-section-head .rs-eyebrow {
  display: flex; align-items: center; gap: 12px;
}
.rs-section-head .rs-eyebrow .rs-num {
  font-family: var(--serif-display);
  font-size: 15px;
  letter-spacing: 0;
  color: var(--burgundy);
}

/* ========= CARDS / PRACTICE ========= */
.rs-practice-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: 60px;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.rs-practice-row:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 900px) {
  .rs-practice-row { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
}
.rs-practice-num {
  font-family: var(--serif-display);
  font-size: clamp(36px, 4vw, 60px);
  color: var(--burgundy);
  font-weight: 400;
  line-height: 1;
  position: relative; top: -4px;
}
.rs-practice-title {
  font-family: var(--serif-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  font-weight: 400;
  margin: 0 0 18px 0;
}
/* Capabilities — vertical list with numbered prefix.
   Styling is mostly applied inline on the <li>; this sheet just
   sets the column rhythm and the first/last borders. */
.rs-practice-caps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

/* ========= DIFFERENTIATOR BLOCK ========= */
.rs-diff {
  background: var(--charcoal);
  color: var(--ivory);
  padding: clamp(90px, 12vw, 180px) 0;
  position: relative;
}
.rs-diff-inner {
  max-width: 1000px; margin: 0 auto;
  text-align: left;
}
.rs-diff blockquote {
  margin: 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 42px);
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.rs-diff blockquote::first-letter { color: var(--ivory) !important; font-size: inherit; font-weight: inherit; }

/* ========= FOOTER ========= */
.rs-footer {
  background: var(--ink);
  color: var(--ivory);
  padding: 80px 0 36px;
  font-family: var(--sans);
}
.rs-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(245,239,228,0.18);
}
@media (max-width: 820px) { .rs-footer-grid { grid-template-columns: 1fr 1fr; } }
.rs-footer h4 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: 10px;
  font-weight: 500;
  color: rgba(245,239,228,0.55);
  margin: 0 0 20px 0;
}
.rs-footer ul { list-style: none; margin: 0; padding: 0; }
.rs-footer li { margin-bottom: 10px; font-size: 14px; }
.rs-footer li a:hover { color: var(--burgundy-muted); }
.rs-footer-brand .rs-footer-mark {
  margin-bottom: 20px;
  display: block;
}
/* Footer logo: protect from global img{max-width:100%} squish.
   The lockup is set with fixed height + width:auto; if its parent is
   narrower than the natural width, max-width:100% would clamp width
   while height stays — flattening the aspect ratio. Force aspect
   preservation and shrink the logo on small screens so it fits. */
.rs-footer-brand .rs-brandlockup img {
  max-width: none;
  width: auto;
  height: auto;
}
.rs-footer-brand p {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(245,239,228,0.7);
  max-width: 32ch;
  font-size: 15px;
  margin: 0;
}
.rs-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  color: rgba(245,239,228,0.55);
}
@media (max-width: 640px) { .rs-footer-bottom { flex-direction: column; gap: 14px; text-align: center; } }

/* ========= TAG / CHIP ========= */
.rs-tag {
  display: inline-block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  font-size: 10px;
  font-weight: 500;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--slate);
}
.surface-dark .rs-tag { border-color: var(--rule-dark); color: rgba(245,239,228,0.8); }

/* ========= MISC ========= */
.rs-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}

/* Scroll reveal */
.rs-reveal { opacity: 0; transform: translateY(18px); transition: opacity 900ms ease, transform 900ms ease; }
.rs-reveal.in { opacity: 1; transform: none; }

/* Tweaks panel */
.rs-tweaks {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 9999;
  background: var(--ink);
  color: var(--ivory);
  border: 1px solid rgba(245,239,228,0.18);
  border-radius: 4px;
  padding: 20px 22px;
  width: 320px;
  font-family: var(--sans);
  font-size: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  display: none;
}
.rs-tweaks.on { display: block; }
.rs-tweaks h3 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: 10px;
  font-weight: 500;
  margin: 0 0 16px 0;
  color: rgba(245,239,228,0.6);
}
.rs-tweaks label {
  display: block;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  font-size: 10px;
  color: rgba(245,239,228,0.55);
  margin: 16px 0 8px;
}
.rs-tweaks .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-tweaks .opt {
  padding: 6px 10px;
  border: 1px solid rgba(245,239,228,0.25);
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  background: transparent;
  color: var(--ivory);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rs-tweaks .opt.sel {
  background: var(--ivory); color: var(--ink);
}
.rs-tweaks .swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(245,239,228,0.3);
  cursor: pointer; padding: 0;
}
.rs-tweaks .swatch.sel { outline: 2px solid var(--ivory); outline-offset: 2px; }

/* ========= ESSAY (article body) ========= */
.rs-essay {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 38rem;
  margin: 0 auto;
}
.rs-essay > p {
  margin: 0 0 1.4em 0;
  text-wrap: pretty;
}
.rs-essay > p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-size: 4.6em;
  float: left;
  line-height: 0.86;
  padding: 0.06em 0.1em 0 0;
  color: var(--burgundy);
  font-weight: 400;
}
.rs-essay > p:first-of-type {
  font-size: 22px;
  line-height: 1.55;
}
.rs-essay h3.rs-essay-h3 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.4em 0 0.6em;
  letter-spacing: -0.005em;
}
.rs-essay em { font-style: italic; }
.rs-essay strong { font-weight: 600; }

.rs-essay figure { max-width: none; }

/* Figures break out of the column on desktop */
@media (min-width: 980px) {
  .rs-essay figure {
    margin-left: calc(50% - 50vw + 64px);
    margin-right: calc(50% - 50vw + 64px);
    max-width: none;
  }
  /* Pull-quotes stay column-width for elegance */
  .rs-essay figure[data-pq] {
    margin-left: 0;
    margin-right: 0;
    max-width: 32rem;
  }
}

/* =========================================================
   MOBILE — single source of truth for narrow viewports
   ========================================================= */

/* Hamburger + drawer (desktop hides) */
.rs-nav-burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.rs-nav-burger span {
  display: block;
  height: 1.5px;
  background: currentColor;
  width: 22px;
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: center;
}
.rs-nav.menu-open .rs-nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.rs-nav.menu-open .rs-nav-burger span:nth-child(2) { opacity: 0; }
.rs-nav.menu-open .rs-nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.rs-nav-drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 0;
  background: var(--paper);
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--gutter) 40px;
}
.rs-nav.menu-open .rs-nav-drawer {
  pointer-events: auto;
  opacity: 1;
}
.rs-nav-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rs-nav-drawer-link {
  font-family: var(--serif-display);
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.1;
  font-weight: 400;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.015em;
}
.rs-nav-drawer-link.active { color: var(--burgundy); font-style: italic; }

@media (max-width: 880px) {
  .rs-nav-links { display: none; }
  .rs-nav-cta { display: none; }
  .rs-nav-burger { display: flex; }
  .rs-nav-inner { grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; }
  /* Burger always reads dark over the paper background, even when over-dark hero is loading */
  .rs-nav .rs-nav-burger { color: var(--ink); }
}

/* Hide desktop hero footer location strip on mobile (busy + cramped) */
@media (max-width: 720px) {
  .rs-hero-foot .rs-container > span:last-child { display: none; }
  .rs-hero { min-height: 78vh; }
  .rs-hero-headline { margin-bottom: 32px; }
}

/* ========= GRID COLLAPSES ========= */
@media (max-width: 880px) {
  /* Home: practice, team, intro */
  .rs-home-practice-grid { grid-template-columns: 1fr !important; }
  .rs-home-team-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .rs-home-intro-grid { gap: 32px !important; }

  /* Work */
  .rs-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .rs-case-row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 32px 0 !important;
  }
  .rs-races-grid { grid-template-columns: 1fr 1fr !important; }

  /* Perspectives */
  .rs-feat-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .rs-sub-grid { grid-template-columns: 1fr !important; gap: 32px !important; align-items: start !important; }
  .rs-article-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 24px 0 !important;
  }

  /* Leadership: 5-up → 2-up */
  .rs-team-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 32px 20px !important; }
  .rs-chris-grid { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Contact */
  .rs-contact-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
  .rs-form-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .rs-loc-grid { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }

  /* CTA / footer-ish */
  .rs-cta-grid { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Big inline grids inside articles */
  .rs-oil-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
}

/* Even smaller — single column for the team grid */
@media (max-width: 540px) {
  .rs-team-grid { grid-template-columns: 1fr !important; max-width: 360px; margin: 0 auto !important; }
  .rs-stats-grid { grid-template-columns: 1fr !important; }
  .rs-loc-grid { grid-template-columns: 1fr !important; }
  .rs-races-grid { grid-template-columns: 1fr !important; }
}

/* Tweaks panel — push out of the way on mobile */
@media (max-width: 640px) {
  .rs-tweaks {
    right: 12px; bottom: 12px;
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}

/* Tighten section padding on small screens */
@media (max-width: 720px) {
  .rs-section { padding-top: 56px; padding-bottom: 56px; }
  .rs-section-head { margin-bottom: 36px; }
  .rs-diff { padding: 64px 0 !important; }
  .rs-footer { padding: 56px 0 28px; }
  .rs-footer-grid { padding-bottom: 36px; gap: 28px; }
  /* Scale down footer logo on mobile so it fits without squishing.
     Inline style sets height:62px; override via !important + width:auto
     to preserve aspect ratio. */
  .rs-footer-brand .rs-brandlockup img {
    height: 44px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Keep horizontal scroll from sneaking in due to inline 80-100px gaps */
html, body { overflow-x: hidden; }
