/* =========================================================
   Rare Form — Marketing site
   Bold · Cream + Rust · v1.0
   ========================================================= */

:root {
  /* ---- Locked palette ---- */
  --rf-cream:      #ECE7DF;
  --rf-paper:      #F6F2EA;
  --rf-ink:        #161513;
  --rf-rust:       #C8451F;
  --rf-rust-deep:  #9A3417;
  --rf-warm-gray:  #7A716A;
  --rf-line:       rgba(22, 21, 19, 0.12);
  --rf-line-strong: rgba(22, 21, 19, 0.25);
  --rf-body-text:  #2c2925;

  /* ---- Type ---- */
  --rf-display: 'Archivo Black', 'Inter Tight', sans-serif;
  --rf-body:    'Inter Tight', system-ui, sans-serif;
  --rf-mono:    'DM Mono', ui-monospace, monospace;

  /* ---- Layout ---- */
  --rf-container: 1280px;
  --rf-pad-x: 64px;
  --rf-section-y: 96px;

  /* ---- Motion ---- */
  --rf-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 880px) {
  :root {
    --rf-pad-x: 28px;
    --rf-section-y: 64px;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--rf-cream);
  color: var(--rf-ink);
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Anchor scroll offset to clear the sticky nav */
section[id] { scroll-margin-top: 72px; }

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

body { overflow-x: hidden; }

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

::selection { background: var(--rf-rust); color: var(--rf-paper); }

/* ---------- Typography primitives ---------- */
.rf-display {
  font-family: var(--rf-display);
  font-size: clamp(56px, 12vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0;
  text-wrap: balance;
}
.rf-display em, .rf-h1 em, .rf-h2 em { font-style: normal; color: var(--rf-rust); }
.ink .rf-display em, .ink .rf-h1 em, .ink .rf-h2 em,
.rust .rf-display em, .rust .rf-h1 em, .rust .rf-h2 em { color: var(--rf-cream); }

.rf-h1 {
  font-family: var(--rf-display);
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

.rf-h2 {
  font-family: var(--rf-display);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

.rf-h3 {
  font-family: var(--rf-display);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}

.rf-lead {
  font-family: var(--rf-body);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 400;
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
}

.rf-body {
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  max-width: 64ch;
  text-wrap: pretty;
  color: var(--rf-body-text);
}
.ink .rf-body, .rust .rf-body { color: inherit; opacity: 0.85; }

.rf-eyebrow {
  display: inline-block;
  font-family: var(--rf-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-rust);
  margin: 0;
}
.ink .rf-eyebrow, .rust .rf-eyebrow { color: currentColor; opacity: 0.7; }

.rf-caption {
  font-family: var(--rf-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}

.rf-rule {
  width: 64px;
  height: 2px;
  background: var(--rf-rust);
  border: 0;
  margin: 0 0 24px;
}
.ink .rf-rule, .rust .rf-rule { background: currentColor; opacity: 0.85; }

/* ---------- Logo ---------- */
.rf-logo {
  font-family: var(--rf-display);
  font-size: 22px;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--rf-ink);
  white-space: nowrap;
  user-select: none;
}
.ink .rf-logo, .rust .rf-logo, .on-ink .rf-logo { color: var(--rf-cream); }

.rf-dot {
  color: var(--rf-rust);
  font-size: 0.55em;
  line-height: 1;
  margin-left: 0.04em;
  vertical-align: 0.04em;
}
.rust .rf-dot, .on-rust .rf-dot { color: var(--rf-ink); }

.rf-logo.rf-logo-stacked {
  display: inline-block;
  white-space: pre-line;
  line-height: 0.88;
}

/* ---------- Container + sections ---------- */
.rf-container {
  width: 100%;
  max-width: var(--rf-container);
  margin: 0 auto;
  padding-left: var(--rf-pad-x);
  padding-right: var(--rf-pad-x);
}

.rf-section {
  padding-top: var(--rf-section-y);
  padding-bottom: var(--rf-section-y);
}

.rf-section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rf-line);
  margin-bottom: 48px;
}
.rf-section-head .rf-section-num {
  font-family: var(--rf-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}
.rf-section-head .rf-section-title { grid-column: 2; }
.rf-section-head .rf-section-sub {
  grid-column: 2;
  margin-top: 12px;
  font-size: 16px;
  color: var(--rf-body-text);
  max-width: 70ch;
}

/* Sub-section head — used for grouping related content inside a parent section */
.rf-subsection-head {
  padding-top: 56px;
  padding-bottom: 18px;
  border-top: 1px solid var(--rf-line);
  margin-top: 96px;
  margin-bottom: 40px;
}
.rf-subsection-head .rf-section-title { margin: 0; }
.rf-subsection-head .rf-section-sub {
  margin-top: 16px;
  font-size: 16px;
  color: var(--rf-body-text);
  max-width: 70ch;
}
@media (max-width: 880px) {
  .rf-subsection-head {
    margin-top: 64px;
    padding-top: 40px;
  }
}

/* Section background variants */
.rf-section.ink   { background: var(--rf-ink);   color: var(--rf-cream); }
.rf-section.rust  { background: var(--rf-rust);  color: var(--rf-paper); }
.rf-section.paper { background: var(--rf-paper); color: var(--rf-ink); }

/* ---------- Nav ---------- */
.rf-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--rf-cream);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--rf-ease), background-color 0.2s var(--rf-ease);
}
.rf-nav-wrap.is-scrolled {
  border-bottom-color: var(--rf-line);
}

.rf-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.rf-nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-family: var(--rf-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.rf-nav-links a {
  position: relative;
  color: var(--rf-ink);
  padding: 6px 0;
  transition: color 0.15s var(--rf-ease);
}
.rf-nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--rf-rust);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--rf-ease);
}
.rf-nav-links a:hover::after { transform: scaleX(1); }
.rf-nav-links a.is-active::after { transform: scaleX(1); }

.rf-nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Mobile hamburger */
.rf-nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  position: relative;
}
.rf-nav-burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: var(--rf-ink);
  transition: transform 0.2s var(--rf-ease), opacity 0.15s var(--rf-ease);
}
.rf-nav-burger span:nth-child(1) { top: 14px; }
.rf-nav-burger span:nth-child(2) { top: 20px; }
.rf-nav-burger span:nth-child(3) { top: 26px; }
.rf-nav-wrap.is-open .rf-nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--rf-cream); }
.rf-nav-wrap.is-open .rf-nav-burger span:nth-child(2) { opacity: 0; }
.rf-nav-wrap.is-open .rf-nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--rf-cream); }

/* Mobile overlay menu */
.rf-mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--rf-ink);
  color: var(--rf-cream);
  z-index: 40;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 88px var(--rf-pad-x) 48px;
}
.rf-nav-wrap.is-open + .rf-mobile-menu,
.rf-nav-wrap.is-open ~ .rf-mobile-menu { display: flex; }

.rf-mobile-menu .rf-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rf-mobile-menu .rf-mobile-links a {
  font-family: var(--rf-display);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--rf-cream);
}
.rf-mobile-menu .rf-mobile-links a em { font-style: normal; color: var(--rf-rust); }
.rf-mobile-menu .rf-mobile-foot {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
  display: flex;
  justify-content: space-between;
}

/* ---------- CTAs ---------- */
.rf-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rf-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--rf-ink);
  color: var(--rf-cream);
  padding: 10px 20px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s var(--rf-ease), transform 0.15s var(--rf-ease);
  white-space: nowrap;
}
.rf-cta:hover { background: #000; }
.rf-cta:active { transform: translateY(1px); }

.rf-cta-large {
  font-size: 14px;
  padding: 14px 26px;
}

.rf-cta-ghost {
  background: transparent;
  color: var(--rf-ink);
  border: 1px solid var(--rf-line-strong);
}
.rf-cta-ghost:hover { background: var(--rf-ink); color: var(--rf-cream); border-color: var(--rf-ink); }

.ink .rf-cta {
  background: var(--rf-cream);
  color: var(--rf-ink);
}
.ink .rf-cta:hover { background: #fff; }

.ink .rf-cta-ghost {
  background: transparent;
  color: var(--rf-cream);
  border-color: rgba(236, 231, 223, 0.35);
}
.ink .rf-cta-ghost:hover { background: var(--rf-cream); color: var(--rf-ink); border-color: var(--rf-cream); }

/* Inline rust link */
.rf-link {
  color: inherit;
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background 0.18s var(--rf-ease), color 0.18s var(--rf-ease);
  padding-bottom: 1px;
}
.rf-link:hover {
  color: var(--rf-rust);
  background-image: linear-gradient(var(--rf-rust), var(--rf-rust));
  background-size: 100% 1.5px;
}
.ink .rf-link:hover, .rust .rf-link:hover { color: var(--rf-cream); background-image: linear-gradient(var(--rf-cream), var(--rf-cream)); }

/* ---------- Hero ---------- */
.rf-hero {
  min-height: calc(100vh - 68px); /* fill viewport minus nav height */
  display: flex;
  flex-direction: column;
}
.rf-hero-wrap {
  position: relative;
  overflow: hidden;
}
.rf-hero-inner {
  position: relative;
  padding-top: calc(35vh - 105px); /* places the headline at ~35% of the viewport */
  padding-bottom: 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.rf-hero-single {
  position: relative;
  z-index: 1;
  max-width: 900px;   /* left-aligned, not centred */
}

/* Large rust dot — top right corner of hero */
.rf-hero-bg-dot {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: var(--rf-rust);
  right: -240px;
  top: -260px;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 880px) {
  .rf-hero-bg-dot { width: 360px; height: 360px; right: -160px; top: -180px; }
}

/* Giant "RF" watermark — fully visible behind hero content */
.rf-watermark {
  position: absolute;
  z-index: 0;
  font-family: var(--rf-display);
  font-size: clamp(320px, 48vw, 680px);
  line-height: 0.72;
  letter-spacing: -0.06em;
  color: var(--rf-ink);
  opacity: 0.07;
  user-select: none;
  pointer-events: none;
  right: 2vw;
  bottom: 4vh;
  white-space: nowrap;
}
@media (max-width: 880px) {
  .rf-watermark {
    font-size: clamp(240px, 70vw, 440px);
    right: -2vw;
    bottom: 2vh;
    opacity: 0.08;
  }
}

/* Italic display (used for one-word emphasis like "Future.") — Archivo Black
   has no true italic, so the browser synthesizes the slant. High-specificity
   selectors are needed to beat the various `em { font-style: normal }` resets. */
.rf-italic,
em.rf-italic,
.rf-hero h1 em.rf-italic,
.rf-h1 em.rf-italic,
.rf-h2 em.rf-italic,
.rf-display em.rf-italic {
  font-style: italic;
}
/* Hero title — DM Serif Display */
.rf-hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 20px 0 0;
  font-weight: 400;
}
.rf-hero-title em {
  font-style: italic;
  color: var(--rf-rust);
}

/* ---------- Hero subtitle (DM Serif Text — locked in) ---------- */
.rf-hero-subtitle {
  font-family: 'DM Serif Text', serif;
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.35;
  color: var(--rf-body-text);
  margin: 48px 0 0;       /* gap between headline and subtitle */
  white-space: nowrap;    /* keep on a single line on desktop */
}
@media (max-width: 880px) {
  /* wrap on small screens so it never overflows */
  .rf-hero-subtitle { font-size: 18px; white-space: normal; max-width: 30ch; margin-top: 48px; }
}

/* Horizontal divider — sits just below the subtitle */
.rf-hero-divider {
  width: 100%;
  max-width: 1100px;
  height: 1px;
  background: var(--rf-line);
  border: 0;
  margin: 18px 0 0;
}

/* ---------- Hero dot (Pixelated / Glitch — locked in) ---------- */
.rf-hero-dot {
  display: inline-block;
  color: var(--rf-rust);
  font-size: 0.35em;
  vertical-align: 0.35em;
  margin-left: 0.08em;
  position: relative;
  animation: rf-dot-pixel 8s steps(1) infinite;
}
@keyframes rf-dot-pixel {
  0%   { opacity: 0;   text-shadow: none; transform: none; }
  3%   { opacity: 1;   text-shadow: 2px 1px 0 var(--rf-rust), -1px -2px 0 rgba(200,69,31,0.4); transform: translate(1px, -1px); }
  5%   { opacity: 0;   text-shadow: none; transform: none; }
  8%   { opacity: 0.7; text-shadow: -2px 0 0 var(--rf-rust); transform: translate(-1px, 0); }
  10%  { opacity: 0;   text-shadow: none; transform: translate(2px, 1px); }
  13%  { opacity: 1;   text-shadow: 1px 2px 0 rgba(200,69,31,0.5); transform: none; }
  15%  { opacity: 0.3; text-shadow: -1px -1px 0 var(--rf-rust), 2px 2px 0 rgba(200,69,31,0.3); transform: translate(-1px, 1px); }
  17%  { opacity: 0;   text-shadow: none; transform: none; }
  20%  { opacity: 0.9; text-shadow: 0 -2px 0 var(--rf-rust); transform: translate(0, -1px); }
  22%  { opacity: 0;   text-shadow: none; transform: none; }
  25%  { opacity: 0.5; text-shadow: 3px 0 0 rgba(200,69,31,0.6); transform: translate(1px, 0); }
  27%  { opacity: 1;   text-shadow: -1px 1px 0 var(--rf-rust); transform: translate(-1px, 1px); }
  29%  { opacity: 0.2; text-shadow: 2px -1px 0 rgba(200,69,31,0.3); transform: translate(2px, -1px); }
  31%  { opacity: 0;   text-shadow: none; transform: none; }
  34%  { opacity: 0.8; text-shadow: 1px 0 0 var(--rf-rust); transform: translate(0, 1px); }
  36%  { opacity: 1;   text-shadow: none; transform: none; }
  38%  { opacity: 0.6; text-shadow: -2px 1px 0 rgba(200,69,31,0.4); transform: translate(-1px, 0); }
  40%  { opacity: 1;   text-shadow: 1px -1px 0 rgba(200,69,31,0.2); transform: translate(1px, 0); }
  42%  { opacity: 0.9; text-shadow: none; transform: none; }
  44%  { opacity: 1;   text-shadow: none; transform: none; }
  100% { opacity: 1;   text-shadow: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-hero-dot { animation: none; opacity: 1; text-shadow: none; transform: none; }
}

/* ---------- Full-width thesis above the pie layout ---------- */
.rf-services-thesis-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rf-line);
}
.rf-services-thesis-paragraph {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(18px, 1.6vw, 24px); /* matches the services lead */
  line-height: 1.4;
  color: var(--rf-ink);
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 880px) {
  .rf-services-thesis-wide {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 40px;
    padding-bottom: 32px;
  }
}

/* Small rust rule between the thesis and the services intro */
.rf-intro-rule {
  width: 56px;
  height: 2px;
  background: var(--rf-rust);
  border: 0;
  margin: 28px 0 24px;
}

#services {
  padding-top: 40px;
  padding-bottom: 56px;
}

/* ---------- Services intro (now lives inside .rf-pie-layout) ---------- */
.rf-services-intro {
  transition: opacity 0.3s var(--rf-ease);
}
.rf-pie-layout.is-focused .rf-services-intro {
  opacity: 0;
  pointer-events: none;
}
/* Slightly smaller so "Three services." fits on a single line in the column */
.rf-pie-layout .rf-services-title {
  font-size: clamp(36px, 5.5vw, 72px);
}
.rf-services-intro .rf-eyebrow { color: var(--rf-rust); }
.rf-services-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 16px 0 0;
  font-weight: 400;
}
.rf-services-title em {
  font-style: italic;
  color: var(--rf-rust);
}
.rf-services-lead {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.4;
  margin: 28px 0 0;
  max-width: 48ch;
  color: var(--rf-body-text);
  text-wrap: pretty;
}

/* Pie chart hint label (sits under the chart) */
.rf-pie-hint {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}

/* Bulleted list of what's included in each service */
.rf-service-bullets {
  list-style: none;
  padding: 0;
  margin: 20px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rf-service-bullets li {
  font-family: var(--rf-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--rf-body-text);
  padding-left: 18px;
  position: relative;
  transition: color 0.3s var(--rf-ease);
}
.rf-service-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--rf-rust);
  border-radius: 50%;
}
.rf-pie-layout.is-focused .rf-service-bullets li {
  color: rgba(236, 231, 223, 0.85);
}

/* ---------- "Did you know?" stat callout ---------- */
.rf-did-you-know {
  margin-top: 88px;
  padding: 44px 56px;
  background: var(--rf-paper);
  border-left: 3px solid var(--rf-rust);
  border-radius: 0 8px 8px 0;
}
.rf-did-you-know .rf-eyebrow {
  display: block;
  color: var(--rf-rust);
  margin-bottom: 20px;
}
/* Rotator: slides stack in the same grid cell and cross-fade */
.rf-dyk-rotator {
  display: grid;
  align-items: start;
}
.rf-dyk-slide {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--rf-ease);
}
.rf-dyk-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.rf-dyk-text {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.8vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--rf-ink);
  margin: 0 0 22px;
  max-width: 52ch;
  text-wrap: balance;
  font-weight: 400;
}
.rf-dyk-text em {
  font-style: normal;
  color: var(--rf-rust);
}
.rf-dyk-source {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}

/* Dot indicators */
.rf-dyk-dots {
  display: flex;
  gap: 9px;
  margin-top: 28px;
}
.rf-dyk-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--rf-line-strong);
  cursor: pointer;
  transition: background 0.2s var(--rf-ease), transform 0.2s var(--rf-ease);
}
.rf-dyk-dot:hover { background: var(--rf-warm-gray); }
.rf-dyk-dot.is-active {
  background: var(--rf-rust);
  transform: scale(1.2);
}

@media (max-width: 880px) {
  .rf-did-you-know { margin-top: 56px; padding: 32px 28px; }
}

/* ---------- Interactive pie chart ---------- */

/* Dark overlay — covers viewport, fades in when a slice is active */
.rf-pie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 19, 0.88);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.4s var(--rf-ease);
}
.rf-pie-overlay.is-active {
  opacity: 1;
}

.rf-pie-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 11; /* above the overlay when active */
  transition: color 0.3s var(--rf-ease);
}
/* On the services page the intro is shorter than the pie — top-align so the
   intro sits right under the thesis divider instead of being pushed down */
#services .rf-pie-layout { align-items: start; }
.rf-pie-layout > .rf-services-intro { grid-column: 1; grid-row: 1; }
.rf-pie-layout > .rf-pie-wrap       { grid-column: 2; grid-row: 1; }
.rf-pie-layout.is-focused {
  color: var(--rf-cream);
}
.rf-pie-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.rf-pie {
  width: 100%;
  max-width: 460px;
  overflow: visible;
  filter: drop-shadow(0 14px 36px rgba(22, 21, 19, 0.18));
}

/* Decorative outer ring */
.rf-pie-ring {
  stroke: var(--rf-rust);
  opacity: 0.4;
  transition: opacity 0.3s var(--rf-ease);
}
.rf-pie-layout.is-focused .rf-pie-ring { opacity: 0.25; }

/* Orbiting rust dot — slow rotation around the chart */
.rf-pie-orbit {
  transform-origin: 240px 240px;
  animation: rf-pie-orbit 28s linear infinite;
}
.rf-pie-orbit circle {
  fill: var(--rf-rust);
  filter: drop-shadow(0 0 6px rgba(200, 69, 31, 0.55));
}
@keyframes rf-pie-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rf-pie-orbit { animation: none; }
}

/* Slice paths */
.rf-pie-slice path {
  stroke: var(--rf-cream);
  stroke-width: 3;
  cursor: pointer;
  transition: transform 0.3s var(--rf-ease), filter 0.3s var(--rf-ease);
  transform-origin: 240px 240px;
}
.rf-pie-slice[data-slice="1"] path { fill: var(--rf-rust); }
.rf-pie-slice[data-slice="2"] path { fill: var(--rf-ink); }
.rf-pie-slice[data-slice="3"] path { fill: var(--rf-warm-gray); }

/* Hover: pop slice outward along its bisector */
.rf-pie-slice[data-slice="1"]:hover path,
.rf-pie-slice[data-slice="1"].is-active path { transform: translate(14px, -8px); filter: brightness(1.15); }
.rf-pie-slice[data-slice="2"]:hover path,
.rf-pie-slice[data-slice="2"].is-active path { transform: translate(0, 16px); filter: brightness(1.15); }
.rf-pie-slice[data-slice="3"]:hover path,
.rf-pie-slice[data-slice="3"].is-active path { transform: translate(-14px, -8px); filter: brightness(1.15); }

/* Slice labels */
.rf-pie-slice text {
  font-family: var(--rf-body);
  font-size: 13px;
  font-weight: 600;
  fill: rgba(255,255,255,0.92);
  pointer-events: none;
  letter-spacing: 0.01em;
}
.rf-pie-slice[data-slice="3"] text { fill: rgba(255,255,255,0.88); }

/* Service number above each slice name */
.rf-pie-slice .rf-slice-num {
  font-family: var(--rf-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  fill: rgba(255, 255, 255, 0.55);
}
.rf-pie-slice[data-slice="3"] .rf-slice-num { fill: rgba(255, 255, 255, 0.55); }

/* Center hub */
.rf-pie-hub {
  fill: var(--rf-ink);
  stroke: var(--rf-cream);
  stroke-width: 2;
  pointer-events: none;
}
.rf-pie-hub-text {
  font-family: var(--rf-display);
  font-size: 16px;
  fill: var(--rf-cream);
  letter-spacing: -0.02em;
  pointer-events: none;
}

/* Info panels overlay the LEFT (intro) column when active */
.rf-pie-info {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(50% - 40px); /* half of grid minus half of 80px gap */
  display: flex;
  align-items: center;
  pointer-events: none;
}
.rf-pie-info-panel {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%) translateY(6px);
  opacity: 0;
  transition: opacity 0.3s var(--rf-ease), transform 0.3s var(--rf-ease);
  pointer-events: none;
}
.rf-pie-info-panel.is-active {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}
.rf-pie-info-panel .rf-service-num {
  font-family: var(--rf-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-rust);
  display: block;
  margin-bottom: 16px;
}
.rf-pie-info-panel h3 {
  font-family: var(--rf-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.rf-pie-info-panel .rf-service-desc {
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 14px;
  color: var(--rf-body-text);
  max-width: 42ch;
  transition: color 0.3s var(--rf-ease);
}
.rf-pie-layout.is-focused .rf-pie-info-panel .rf-service-desc {
  color: rgba(236, 231, 223, 0.8);
}
.rf-pie-info-panel .rf-service-tag {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
  display: block;
  transition: color 0.3s var(--rf-ease);
}
.rf-pie-layout.is-focused .rf-pie-info-panel .rf-service-tag {
  color: rgba(236, 231, 223, 0.5);
}
.rf-pie-layout.is-focused .rf-pie-info-panel .rf-link {
  color: var(--rf-cream);
}
.rf-pie-layout.is-focused .rf-pie-info-panel .rf-link:hover {
  color: var(--rf-rust);
}

/* ---------- About: founder profile ---------- */
#about {
  padding-top: 64px;
  padding-bottom: 64px;
}

/* Full-width section dividers between Hero/Services and Services/About */
#services,
#about {
  position: relative;
}
#services::before,
#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--rf-line);
  pointer-events: none;
}
.rf-about-header {
  margin-bottom: 32px;
}
/* About headline slightly smaller than hero/services for breathing room */
.rf-about-header .rf-services-title {
  font-size: clamp(32px, 5vw, 64px);
  margin-top: 12px;
}

.rf-founder-profile {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

/* Photo column */
.rf-founder-photo-col {
  display: flex;
  flex-direction: column;
}
.rf-founder-photo {
  position: relative;
  max-width: 300px;
}
/* Rust offset rectangle peeking behind the photo */
.rf-founder-photo::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  background: var(--rf-rust);
  border-radius: 4px;
  z-index: 0;
}
.rf-founder-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  filter: drop-shadow(0 12px 32px rgba(22, 21, 19, 0.18));
}
.rf-founder-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 28px; /* enough to clear rust offset */
  max-width: 300px;
}
.rf-founder-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  color: var(--rf-ink);
  line-height: 1;
}
.rf-founder-role {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-rust);
}

/* Bio column */
.rf-founder-bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: center; /* vertically center the bio + practice details against the photo column */
}
.rf-founder-paragraph {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.45;
  color: var(--rf-body-text);
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
}
@media (max-width: 880px) {
  .rf-about-header { margin-bottom: 48px; }
  .rf-founder-profile { grid-template-columns: 1fr; gap: 48px; }
  .rf-founder-photo { max-width: 280px; }
  .rf-founder-caption { margin-top: 36px; }
}

/* ---------- Practice details (compact, lives inside the bio column) ---------- */
.rf-practice-inline {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rf-line);
}
.rf-practice-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.rf-practice-col .rf-eyebrow {
  display: block;
  color: var(--rf-rust);
  margin-bottom: 8px;
}
.rf-practice-col p {
  font-family: var(--rf-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--rf-body-text);
  margin: 0;
  max-width: 28ch;
}

.rf-practice-industries .rf-eyebrow {
  display: block;
  color: var(--rf-rust);
  margin-bottom: 12px;
}
.rf-industry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rf-industry-pill {
  display: inline-block;
  font-family: var(--rf-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--rf-line-strong);
  border-radius: 999px;
  color: var(--rf-ink);
  background: var(--rf-paper);
}

@media (max-width: 880px) {
  .rf-practice-inline-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Legacy class kept in case it's referenced elsewhere */
.rf-about-teaser {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.rf-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.rf-stat {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rf-stat .rf-stat-num {
  font-family: var(--rf-display);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--rf-rust);
}
.rf-stat .rf-stat-num .unit { font-size: 0.4em; vertical-align: 0.6em; opacity: 0.75; margin-left: 0.08em; }
.rf-stat .rf-stat-label {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
  line-height: 1.55;
}

/* ---------- Method (4-step) ---------- */
.rf-method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.rf-method-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 2px solid var(--rf-ink);
  padding-top: 20px;
}
.rf-section.ink .rf-method-step,
.rf-section.paper .rf-method-step { border-top-color: currentColor; }

.rf-method-step .rf-method-num {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-rust);
}
.rf-method-step h3 {
  font-family: var(--rf-display);
  font-size: 24px;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0;
}
.rf-method-step p {
  font-family: var(--rf-body);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  color: var(--rf-body-text);
  opacity: 0.85;
}
.ink .rf-method-step p, .rust .rf-method-step p { color: inherit; }

/* ---------- Full contact section (cream + ink, matches the rest of the site) ---------- */
.rf-contact-section {
  background: var(--rf-cream);
  color: var(--rf-ink);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--rf-line);
  /* Fill the viewport so the footer sits below the fold on landing */
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rf-contact-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}
.rf-contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 96px;
  align-items: start;
}

/* Headline: DM Serif Display (matches hero / services / about) */
.rf-contact-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 3.4vw, 48px); /* sized so each line fits in the column */
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 400;
}

/* "RARE FORM●" — matches the nav logo design (Archivo Black, ink text + rust dot) */
.rf-contact-brand {
  font-family: var(--rf-display); /* Archivo Black */
  color: var(--rf-ink);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
}
.rf-contact-brand .rf-dot {
  color: var(--rf-rust);
}

/* Contact list rows */
.rf-contact-section .rf-contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
}
.rf-contact-section .rf-contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--rf-line);
}
.rf-contact-section .rf-contact-label {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}
.rf-contact-section .rf-contact-value {
  font-family: var(--rf-display);
  font-size: clamp(20px, 2.1vw, 28px); /* sized to fit info@rareformconsulting.ca on one line */
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--rf-ink);
  word-break: keep-all;
  transition: color 0.18s var(--rf-ease);
}
.rf-contact-section .rf-contact-value:hover { color: var(--rf-rust); }

/* Form card on the cream section */
.rf-contact-form-card {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 8px;
  padding: 36px;
  position: relative;
  z-index: 1;
}
.rf-contact-form-card .rf-caption {
  color: var(--rf-rust);
  display: block;
  margin-bottom: 24px;
}
.rf-contact-form-card .rf-caption-large {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: none;
  color: var(--rf-ink);
  font-weight: 400;
}

/* Form success / error states */
.rf-form-success {
  text-align: center;
  padding: 32px 0 8px;
}
.rf-form-success h3 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  color: var(--rf-ink);
  margin: 0 0 12px;
  font-weight: 400;
  line-height: 1.1;
}
.rf-form-success p {
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--rf-body-text);
  margin: 0;
}
.rf-form-error {
  background: rgba(200, 69, 31, 0.08);
  border: 1px solid rgba(200, 69, 31, 0.25);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: var(--rf-body);
  font-size: 14px;
  color: var(--rf-body-text);
}
.rf-form-error a {
  color: var(--rf-rust);
  text-decoration: underline;
}
.rf-contact-form-card .rf-h3 { margin: 0 0 8px; }
.rf-contact-form-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--rf-body-text);
}
.rf-contact-form-card .rf-form { margin-top: 28px; }

/* Form fields on the contact card (light theme overrides for the base form) */
.rf-contact-form-card .rf-form label {
  color: var(--rf-warm-gray);
  opacity: 1;
}
.rf-contact-form-card .rf-form input,
.rf-contact-form-card .rf-form textarea {
  color: var(--rf-ink);
  border-bottom: 1px solid var(--rf-line-strong);
}
.rf-contact-form-card .rf-form input::placeholder,
.rf-contact-form-card .rf-form textarea::placeholder {
  color: var(--rf-warm-gray);
  opacity: 0.6;
}
.rf-contact-form-card .rf-form input:focus,
.rf-contact-form-card .rf-form textarea:focus {
  border-bottom-color: var(--rf-rust);
}
/* CTA reverts to default ink-on-cream */

/* Large rust dot, kept as a visual anchor */
.rf-contact-bg-dot {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: var(--rf-rust);
  left: -300px;
  bottom: -360px;
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 880px) {
  .rf-contact-bg-dot { width: 420px; height: 420px; left: -200px; bottom: -260px; }
  /* Revert to normal flow on mobile so the stacked form never clips */
  .rf-contact-section { padding: 64px 0; min-height: 0; display: block; }
  .rf-contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- Footer ---------- */
.rf-footer {
  background: var(--rf-cream);
  border-top: 1px solid var(--rf-line);
  padding: 64px var(--rf-pad-x) 48px;
}
.rf-footer-inner {
  max-width: var(--rf-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 64px;
}
.rf-footer .rf-footer-col h4 {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
  margin: 0 0 18px;
  font-weight: 400;
}
.rf-footer .rf-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rf-footer .rf-footer-col a {
  font-family: var(--rf-body);
  font-size: 15px;
  font-weight: 500;
}
.rf-footer .rf-footer-col a:hover { color: var(--rf-rust); }

.rf-footer-tagline {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 14px 0 24px;
  font-weight: 400;
}
.rf-footer-tagline em {
  font-style: italic;
  color: var(--rf-rust);
}

.rf-footer-base {
  max-width: var(--rf-container);
  margin: 64px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--rf-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
}

/* ---------- Pillar detail layout (services / about) ---------- */
.rf-pillar {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--rf-line);
}
.rf-pillar:last-of-type { border-bottom: 0; }
.rf-pillar.ink   { background: var(--rf-ink);   color: var(--rf-cream); border-bottom: 0; }
.rf-pillar.paper { background: var(--rf-paper); }

.rf-pillar-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 96px;
  align-items: start;
}
.rf-pillar .rf-eyebrow { margin-bottom: 24px; }
.rf-pillar h2 {
  margin: 0 0 32px;
}
.rf-pillar-body {
  font-family: var(--rf-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--rf-body-text);
  margin: 0;
  max-width: 38ch;
}
.ink .rf-pillar-body { color: inherit; opacity: 0.85; }

.rf-pillar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rf-pillar-list li {
  font-family: var(--rf-body);
  font-size: 17px;
  line-height: 1.45;
  padding-left: 26px;
  position: relative;
  color: var(--rf-body-text);
}
.ink .rf-pillar-list li { color: inherit; }
.rf-pillar-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  background: var(--rf-rust);
  border-radius: 50%;
}
.ink .rf-pillar-list li::before { background: var(--rf-cream); }

/* ---------- About: roles / pills ---------- */
.rf-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.rf-role {
  display: inline-block;
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--rf-line);
  border-radius: 999px;
  color: var(--rf-warm-gray);
  background: var(--rf-paper);
}
.ink .rf-role { color: var(--rf-cream); border-color: rgba(236, 231, 223, 0.25); background: rgba(255,255,255,0.04); }

/* ---------- Bring-us-in / triggers list ---------- */
.rf-menu-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
}
.rf-menu-list li {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--rf-line);
  font-family: var(--rf-display);
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.rf-menu-list li:first-child { border-top: 1px solid var(--rf-line); }
.rf-menu-list li .ix {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rf-rust);
}
.rf-menu-list li .meta {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
  white-space: nowrap;
}

/* ---------- Form ---------- */
.rf-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
}
.rf-form .rf-field { display: flex; flex-direction: column; gap: 6px; }
.rf-form .rf-field-full { grid-column: 1 / -1; }
.rf-form label {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
}
.rf-form input,
.rf-form textarea,
.rf-form select {
  font-family: var(--rf-body);
  font-size: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(236, 231, 223, 0.3);
  color: var(--rf-cream);
  padding: 10px 0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.18s var(--rf-ease);
}
.rf-form input::placeholder,
.rf-form textarea::placeholder {
  color: rgba(236, 231, 223, 0.4);
}
.rf-form input:focus,
.rf-form textarea:focus,
.rf-form select:focus { border-bottom-color: var(--rf-rust); }
.rf-form textarea { resize: vertical; min-height: 120px; }

/* ---------- Future opportunities (Careers) section ---------- */
.rf-careers-section {
  background: var(--rf-paper);
  border-top: 1px solid var(--rf-line);
  padding: 96px 0;
}
.rf-careers-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
.rf-careers-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 16px 0 0;
  font-weight: 400;
}
.rf-careers-title em {
  font-style: italic;
  color: var(--rf-rust);
}
.rf-careers-meta {
  font-family: var(--rf-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--rf-body-text);
  margin: 24px 0 36px;
  max-width: 42ch;
}
.rf-careers-meta-list {
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rf-line);
}

/* Email CTA card (replaces the old form card) */
.rf-careers-email-card {
  background: var(--rf-cream);
  border: 1px solid var(--rf-line);
  border-radius: 8px;
  padding: 36px;
}
.rf-careers-email-card .rf-caption {
  color: var(--rf-rust);
  display: block;
}
.rf-careers-form-sub {
  font-family: var(--rf-body);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 28px;
  color: var(--rf-body-text);
}
.rf-careers-email-address {
  display: inline-block;
  font-family: var(--rf-display);
  font-size: clamp(20px, 2vw, 26px);
  color: var(--rf-ink);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rf-line);
  width: 100%;
  transition: color 0.18s var(--rf-ease);
  overflow-wrap: anywhere;
}
.rf-careers-email-address:hover {
  color: var(--rf-rust);
}

@media (max-width: 880px) {
  .rf-careers-section { padding: 64px 0; }
  .rf-careers-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Privacy / legal body ---------- */
.rf-privacy-body {
  max-width: 720px;
}
.rf-privacy-body h2 {
  font-family: var(--rf-display);
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}
.rf-privacy-body h2:first-child { margin-top: 0; }
.rf-privacy-body p {
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--rf-body-text);
  margin: 0 0 12px;
}
.rf-privacy-body ul {
  padding-left: 24px;
  margin: 0 0 16px;
}
.rf-privacy-body li {
  font-family: var(--rf-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--rf-body-text);
  margin-bottom: 8px;
}

/* ---------- Footer legal ---------- */
.rf-footer-legal {
  font-family: var(--rf-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rf-warm-gray);
  transition: color 0.15s var(--rf-ease);
}
.rf-footer-legal:hover { color: var(--rf-rust); }

/* ---------- Marquee ticker (ink + rust) ---------- */
.rf-marquee {
  background: var(--rf-ink);
  padding: 22px 0;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}
.rf-marquee-track {
  display: inline-flex;
  gap: 0;
  align-items: center;
  animation: rf-scroll 32s linear infinite;
  will-change: transform;
}
.rf-marquee-track span {
  font-family: var(--rf-display);
  font-size: clamp(16px, 1.8vw, 22px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--rf-cream);
  padding: 0 28px;
  flex-shrink: 0;
}
.rf-marquee-dot {
  color: var(--rf-rust) !important; /* rust dot accents the cream text */
  font-size: 0.5em !important;
  padding: 0 10px !important;
  opacity: 1;
}
@keyframes rf-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .rf-marquee-track { animation: none; }
}

/* ---------- Trigger row hover ---------- */
.rf-menu-list li {
  position: relative;
  isolation: isolate;
  transition: color 0.18s var(--rf-ease);
  cursor: default;
}
.rf-menu-list li::before {
  content: '';
  position: absolute;
  inset: 0 calc(-1 * var(--rf-pad-x));
  background: var(--rf-ink);
  border-radius: 4px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.22s var(--rf-ease);
  pointer-events: none;
}
.rf-menu-list li:hover {
  color: var(--rf-cream);
}
.rf-menu-list li:hover::before {
  opacity: 1;
}
.rf-menu-list li:hover .ix {
  color: var(--rf-cream);
}
.rf-menu-list li:hover .meta {
  color: rgba(236, 231, 223, 0.6);
}

/* ---------- Animations ---------- */
.rf-anim {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--rf-ease), transform 0.5s var(--rf-ease);
}
.rf-anim.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .rf-anim { transition: opacity 0.2s linear; transform: none; }
  .rf-anim.is-in { transform: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .rf-method-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .rf-pillar-grid { gap: 56px; }
  .rf-pie-layout { gap: 40px; }
}

@media (max-width: 880px) {
  .rf-nav-links, .rf-nav-right > .rf-cta { display: none; }
  .rf-nav-burger { display: block; }

  .rf-hero { min-height: calc(100vh - 68px); }
  .rf-hero-inner { padding-top: 40px; padding-bottom: 32px; }
  .rf-hero-title { font-size: clamp(40px, 12vw, 72px); }

  .rf-section-head { grid-template-columns: 1fr; gap: 12px; }
  .rf-section-head .rf-section-title { grid-column: 1; }
  .rf-section-head .rf-section-sub { grid-column: 1; }

  .rf-pie-layout { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .rf-pie-layout > .rf-services-intro,
  .rf-pie-layout > .rf-pie-wrap { grid-column: 1; }
  .rf-pie-layout > .rf-pie-wrap { grid-row: 2; }
  .rf-pie { max-width: 320px; }
  .rf-pie-info { position: relative; width: 100%; min-height: 0; }
  .rf-pie-info-panel { position: absolute; transform: translateY(6px); }
  /* When a slice is active, the panel claims its natural height in the flow
     so the layout expands to fit it — otherwise the container collapses
     and there's no empty gap below the pie chart. */
  .rf-pie-info-panel.is-active { position: relative; transform: none; }
  .rf-about-teaser { grid-template-columns: 1fr; gap: 32px; }
  .rf-method-grid { grid-template-columns: 1fr; gap: 24px; }
  .rf-pillar-grid { grid-template-columns: 1fr; gap: 32px; }

  .rf-footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .rf-footer-base { flex-direction: column; gap: 12px; align-items: flex-start; }

  .rf-menu-list li { grid-template-columns: 40px 1fr; }
  .rf-menu-list li .meta { grid-column: 1 / -1; padding-top: 4px; }

  .rf-form { grid-template-columns: 1fr; }
}

/* ============================================================
   Small phones (≤480px) — iPhone-specific tweaks
   ============================================================ */
@media (max-width: 480px) {
  /* Rust corner dot — tucked safely into the top-right corner so it stays
     visible as a brand accent without overlapping the headline */
  .rf-hero-bg-dot {
    width: 250px;
    height: 250px;
    right: -125px;
    top: -130px;
  }

  /* Reduce hero vertical space — removes the big empty gap between
     the headline / subtitle and the next section on phones */
  .rf-hero { min-height: 70vh; }
  .rf-hero-inner { padding-top: calc(20vh - 30px); padding-bottom: 24px; }

  /* Headline can use a touch more breathing room from the right edge */
  .rf-hero-title { font-size: 44px; }

  /* Watermark slightly smaller so it doesn't overpower the layout */
  .rf-watermark { font-size: clamp(200px, 64vw, 380px); right: 0; }

  /* "Did you know?" callout — tighter padding on phones */
  .rf-did-you-know { padding: 28px 22px; }

  /* Pie chart slices need a finger-sized hit target on touch */
  .rf-pie-slice { cursor: pointer; }
}
