/* =========================================================================
   RCSF — Global stylesheet
   Sections:
     1. Design tokens
     2. Reset + base
     3. Layout primitives
     4. Accessibility: skip link
     5. Header + primary navigation
     5b. Mobile nav drawer
     6. Buttons
     7. Shared components (eyebrow, lede)
     8. Footer
     9. Motion: respect user preference
   ========================================================================= */


/* ---------- 1. Design tokens (CSS custom properties) -------------------- */

:root {
  /* Colours - charcoal + cream + neon green palette */
  --rcsf-bg:             #f6f1e8;   /* Cream - primary calm surface */
  --rcsf-surface:        #ffffff;   /* Pure white - cards, form fields */
  --rcsf-charcoal:       #1a1d22;   /* Primary dark surface */
  --rcsf-charcoal-deep:  #0e1014;   /* Deepest, used for footer / CTAs */
  --rcsf-green:          #2cff05;   /* Brand neon - DARK surfaces + tiny accents only */
  --rcsf-green-deep:     #0e7c20;   /* Deep green - used on LIGHT surfaces (now closer to neon) */
  --rcsf-green-soft:     rgba(14, 124, 32, 0.10);  /* Soft deep-green tint for light surface hovers */
  --rcsf-green-glow:     rgba(44, 255, 5, 0.22);  /* Neon glow - dark surfaces only */

  /* Text */
  --rcsf-text:           #1a1d22;   /* Body */
  --rcsf-text-muted:     #5a6478;   /* Secondary */
  --rcsf-text-soft:      #2c333d;   /* In-between, slightly less than full charcoal */
  --rcsf-text-light:     #ffffff;   /* On dark surfaces */
  --rcsf-text-dim:       rgba(255, 255, 255, 0.78); /* Secondary on dark */

  /* Borders */
  --rcsf-border:         #e7dfce;   /* Soft warm border on cream */
  --rcsf-border-dark:    rgba(255, 255, 255, 0.12); /* On dark surfaces */

  /* Typography */
  --rcsf-font-body:      'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rcsf-font-display:   'Plus Jakarta Sans', system-ui, sans-serif;

  --rcsf-fs-300: 0.8125rem;   /* 13px */
  --rcsf-fs-400: 1rem;        /* 16px */
  --rcsf-fs-500: 1.125rem;    /* 18px */
  --rcsf-fs-600: 1.375rem;    /* 22px */
  --rcsf-fs-700: 1.75rem;     /* 28px */
  --rcsf-fs-800: 2.25rem;     /* 36px */
  --rcsf-fs-900: clamp(2.5rem, 5vw, 3.75rem);

  /* Spacing scale */
  --rcsf-space-1: 0.5rem;
  --rcsf-space-2: 1rem;
  --rcsf-space-3: 1.5rem;
  --rcsf-space-4: 2rem;
  --rcsf-space-5: 3rem;
  --rcsf-space-6: 4.5rem;
  --rcsf-space-7: 6rem;

  /* Layout */
  --rcsf-content-max:  1100px;
  --rcsf-wide-max:     1280px;

  /* Visual treatment */
  --rcsf-radius-sm: 6px;
  --rcsf-radius:    10px;
  --rcsf-radius-lg: 18px;

  --rcsf-shadow:    0 1px 2px rgba(14, 16, 20, 0.04), 0 6px 24px rgba(14, 16, 20, 0.07);
  --rcsf-shadow-lg: 0 2px 4px rgba(14, 16, 20, 0.06), 0 24px 48px rgba(14, 16, 20, 0.10);

  --rcsf-transition: 220ms cubic-bezier(0.4, 0.0, 0.2, 1);

  /* Container side padding - scales by breakpoint */
  --rcsf-gutter: 20px;
}

@media (min-width: 769px) {
  :root { --rcsf-gutter: 32px; }
}

@media (min-width: 1024px) {
  :root { --rcsf-gutter: 40px; }
}

/* Mobile-only type scale adjustments for legibility */
@media (max-width: 768px) {
  :root {
    --rcsf-fs-500: 1.0625rem;
    --rcsf-fs-600: 1.25rem;
    --rcsf-fs-700: 1.5rem;
    --rcsf-fs-800: 1.75rem;
    --rcsf-fs-900: 2rem;
    --rcsf-space-5: 2.25rem;
    --rcsf-space-6: 3rem;
    --rcsf-space-7: 4rem;
  }
}


/* ---------- 2. Reset + base ---------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--rcsf-bg);
  color: var(--rcsf-text);
  font-family: var(--rcsf-font-body);
  font-size: var(--rcsf-fs-400);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--rcsf-font-display);
  color: var(--rcsf-charcoal);
  margin: 0 0 var(--rcsf-space-2);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--rcsf-fs-900); }
h2 { font-size: var(--rcsf-fs-800); }
h3 { font-size: var(--rcsf-fs-600); }
h4 { font-size: var(--rcsf-fs-500); }

p { margin: 0 0 var(--rcsf-space-2); }

a {
  color: var(--rcsf-text);
  text-underline-offset: 3px;
}
a:hover { color: var(--rcsf-charcoal-deep); }

img { max-width: 100%; height: auto; display: block; }

::selection {
  background: var(--rcsf-green);
  color: var(--rcsf-charcoal);
}


/* ---------- 3. Layout primitives ---------------------------------------- */

.rcsf-container {
  width: 100%;
  max-width: var(--rcsf-content-max);
  margin-inline: auto;
  padding-inline: var(--rcsf-gutter);
}

.rcsf-container--wide {
  max-width: var(--rcsf-wide-max);
}


/* ---------- 4. Accessibility: skip link --------------------------------- */

.rcsf-skip-link {
  position: absolute;
  top: -100px;
  left: var(--rcsf-space-2);
  background: var(--rcsf-charcoal);
  color: var(--rcsf-green);
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: var(--rcsf-radius-sm);
  z-index: 1100;
  font-weight: 600;
}

.rcsf-skip-link:focus { top: var(--rcsf-space-2); }


/* ---------- 5. Header + primary navigation ------------------------------ */

.rcsf-site-header {
  background: var(--rcsf-charcoal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
}

/* Sticky only on mobile where small-screen ergonomics benefit from constant nav access */
@media (max-width: 768px) {
  .rcsf-site-header {
    position: sticky;
    top: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  }
}

.rcsf-site-header__inner {
  width: 100%;
  max-width: var(--rcsf-wide-max);
  margin-inline: auto;
  padding: var(--rcsf-space-2) var(--rcsf-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rcsf-space-3);
}

.rcsf-site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.rcsf-site-header__logo {
  height: 44px;
  width: auto;
  border-radius: var(--rcsf-radius-sm);
}

@media (min-width: 1024px) {
  .rcsf-site-header__logo { height: 56px; }
}


/* Desktop nav */

.rcsf-nav { display: none; }

.rcsf-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.rcsf-nav__link {
  position: relative;
  font-family: var(--rcsf-font-body);
  font-weight: 500;
  font-size: var(--rcsf-fs-400);
  color: var(--rcsf-text-light);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color var(--rcsf-transition);
}

.rcsf-nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rcsf-green);
  transition: width var(--rcsf-transition);
}

.rcsf-nav__link:hover,
.rcsf-nav__link:focus-visible {
  color: var(--rcsf-green);
  outline: none;
}

.rcsf-nav__link:hover::after,
.rcsf-nav__link:focus-visible::after,
.rcsf-nav__link--active::after {
  width: 100%;
}

.rcsf-nav__link--cta {
  background: var(--rcsf-green);
  color: var(--rcsf-charcoal);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  transition: background var(--rcsf-transition), color var(--rcsf-transition);
}

.rcsf-nav__link--cta::after { display: none; }

.rcsf-nav__link--cta:hover,
.rcsf-nav__link--cta:focus-visible {
  background: var(--rcsf-text-light);
  color: var(--rcsf-charcoal);
}


/* Mobile menu trigger button */

.rcsf-mnav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--rcsf-radius-sm);
  padding: 0;
  cursor: pointer;
  width: 48px;
  height: 48px;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  transition: border-color var(--rcsf-transition), background var(--rcsf-transition);
}

.rcsf-mnav-toggle:hover,
.rcsf-mnav-toggle:focus-visible {
  border-color: var(--rcsf-green);
  background: rgba(44, 255, 5, 0.08);
  outline: none;
}

.rcsf-mnav-toggle__bar {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--rcsf-text-light);
  border-radius: 2px;
}

@media (min-width: 1024px) {
  .rcsf-nav { display: block; }
  .rcsf-mnav-toggle { display: none; }
}


/* ---------- 5b. Mobile nav drawer (slide-out, full-screen) -------------- */

html.rcsf-mnav-open,
body.rcsf-mnav-open {
  overflow: hidden;
  height: 100%;
}

.rcsf-mnav {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 100% 0%, rgba(44, 255, 5, 0.08), transparent 60%),
    linear-gradient(180deg, var(--rcsf-charcoal) 0%, var(--rcsf-charcoal-deep) 100%);
  color: var(--rcsf-text-light);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 320ms cubic-bezier(0.4, 0.0, 0.2, 1),
    opacity 240ms cubic-bezier(0.4, 0.0, 0.2, 1),
    visibility 0s linear 320ms;
  overscroll-behavior: contain;
}

.rcsf-mnav.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 320ms cubic-bezier(0.4, 0.0, 0.2, 1),
    opacity 200ms cubic-bezier(0.4, 0.0, 0.2, 1),
    visibility 0s linear 0s;
}

.rcsf-mnav__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--rcsf-space-2) var(--rcsf-gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rcsf-mnav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.rcsf-mnav__logo {
  height: 40px;
  width: auto;
  border-radius: var(--rcsf-radius-sm);
}

.rcsf-mnav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--rcsf-text-light);
  border-radius: var(--rcsf-radius-sm);
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--rcsf-transition), border-color var(--rcsf-transition);
}

.rcsf-mnav__close:hover,
.rcsf-mnav__close:focus-visible {
  background: rgba(44, 255, 5, 0.1);
  border-color: var(--rcsf-green);
  outline: none;
}

.rcsf-mnav__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-block: var(--rcsf-space-2);
  display: flex;
  flex-direction: column;
}

.rcsf-mnav__list {
  list-style: none;
  margin: 0;
  padding: 0 var(--rcsf-gutter);
  display: flex;
  flex-direction: column;
  counter-reset: rcsf-mnav-counter;
}

.rcsf-mnav__list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rcsf-mnav__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0.25rem;
  font-family: var(--rcsf-font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  position: relative;
  transition: color var(--rcsf-transition), padding-left var(--rcsf-transition);
}

.rcsf-mnav__link::before {
  counter-increment: rcsf-mnav-counter;
  content: counter(rcsf-mnav-counter, decimal-leading-zero);
  font-family: var(--rcsf-font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--rcsf-green);
  opacity: 0.5;
  min-width: 24px;
  transition: opacity var(--rcsf-transition), color var(--rcsf-transition);
}

.rcsf-mnav__link:hover,
.rcsf-mnav__link:focus-visible {
  color: var(--rcsf-green);
  padding-left: 0.5rem;
  outline: none;
}

.rcsf-mnav__link:hover::before,
.rcsf-mnav__link:focus-visible::before {
  opacity: 1;
}

.rcsf-mnav__link--active {
  color: var(--rcsf-green);
  font-weight: 600;
}

.rcsf-mnav__link--active::before {
  opacity: 1;
}

.rcsf-mnav__contact {
  margin-top: auto;
  padding: var(--rcsf-space-3) var(--rcsf-gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rcsf-mnav__contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcsf-green);
  margin: 0 0 var(--rcsf-space-1);
}

.rcsf-mnav__contact-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--rcsf-text-light);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
  transition: color var(--rcsf-transition);
  padding-block: 0.35rem;
}

.rcsf-mnav__contact-link i {
  color: var(--rcsf-green);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.rcsf-mnav__contact-link:hover,
.rcsf-mnav__contact-link:focus-visible {
  color: var(--rcsf-green);
}

@media (min-width: 1024px) {
  .rcsf-mnav { display: none; }
}


/* ---------- 6. Buttons --------------------------------------------------- */

.rcsf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--rcsf-font-body);
  font-weight: 500;
  font-size: var(--rcsf-fs-400);
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--rcsf-transition), color var(--rcsf-transition), border-color var(--rcsf-transition), transform var(--rcsf-transition);
  line-height: 1.2;
  min-height: 48px;
  text-align: center;
  white-space: nowrap;
}

.rcsf-btn i {
  flex-shrink: 0;
  font-size: 0.95em;
  line-height: 1;
}

@media (max-width: 768px) {
  .rcsf-btn {
    white-space: normal;
    padding: 0.9rem 1.35rem;
  }
}

.rcsf-btn--primary {
  background: var(--rcsf-charcoal);
  color: var(--rcsf-text-light);
}

.rcsf-btn--primary:hover,
.rcsf-btn--primary:focus-visible {
  background: var(--rcsf-green-deep);
  color: var(--rcsf-text-light);
  transform: translateY(-1px);
}

.rcsf-btn--accent {
  background: var(--rcsf-green-deep);
  color: var(--rcsf-text-light);
}

.rcsf-btn--accent:hover,
.rcsf-btn--accent:focus-visible {
  background: var(--rcsf-charcoal);
  color: var(--rcsf-text-light);
  transform: translateY(-1px);
}

.rcsf-btn--ghost {
  background: transparent;
  color: var(--rcsf-charcoal);
  border-color: var(--rcsf-charcoal);
}

.rcsf-btn--ghost:hover,
.rcsf-btn--ghost:focus-visible {
  background: var(--rcsf-charcoal);
  color: var(--rcsf-text-light);
  transform: translateY(-1px);
}

/* Small button variant for inline / list-item use */
.rcsf-btn--small {
  padding: 0.55rem 1.1rem;
  font-size: var(--rcsf-fs-300);
  min-height: 40px;
  letter-spacing: 0.02em;
}

.rcsf-btn__arrow {
  transition: transform var(--rcsf-transition);
}

.rcsf-btn:hover .rcsf-btn__arrow,
.rcsf-btn:focus-visible .rcsf-btn__arrow {
  transform: translateX(3px);
}


/* ---------- 7. Shared components ---------------------------------------- */

/* Eyebrow label (small uppercase tag above headings) */
.rcsf-eyebrow {
  display: inline-block;
  font-family: var(--rcsf-font-body);
  font-size: var(--rcsf-fs-300);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcsf-charcoal);
  margin-bottom: var(--rcsf-space-2);
  padding: 0.25rem 0.7rem 0.25rem 0;
  position: relative;
}

.rcsf-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 8px;
  background: var(--rcsf-green-deep);
  margin-right: 0.6rem;
  vertical-align: middle;
  border-radius: 2px;
}

/* Lede paragraph - larger intro text */
.rcsf-lede {
  font-size: var(--rcsf-fs-500);
  color: var(--rcsf-text-soft);
  max-width: 65ch;
  line-height: 1.7;
}


/* ---------- 8. Footer --------------------------------------------------- */

.rcsf-site-footer {
  background: var(--rcsf-charcoal-deep);
  color: var(--rcsf-text-light);
  border-top: 8px solid var(--rcsf-green-deep);
}

.rcsf-site-footer__inner {
  width: 100%;
  max-width: var(--rcsf-wide-max);
  margin-inline: auto;
  padding: var(--rcsf-space-6) var(--rcsf-gutter) var(--rcsf-space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rcsf-space-4);
}

@media (min-width: 769px) {
  .rcsf-site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--rcsf-space-5);
  }
}

@media (min-width: 1024px) {
  .rcsf-site-footer__inner { gap: var(--rcsf-space-6); }
}

.rcsf-site-footer__brand {
  font-family: var(--rcsf-font-display);
  font-size: var(--rcsf-fs-500);
  font-weight: 700;
  color: var(--rcsf-text-light);
  margin: 0 0 var(--rcsf-space-2);
}

.rcsf-site-footer__lede {
  color: var(--rcsf-text-dim);
  font-size: var(--rcsf-fs-400);
  max-width: 38ch;
}

.rcsf-site-footer__heading {
  font-size: var(--rcsf-fs-300);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rcsf-green);
  margin-bottom: var(--rcsf-space-2);
}

.rcsf-site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.rcsf-site-footer__list a {
  color: var(--rcsf-text-dim);
  text-decoration: none;
  transition: color var(--rcsf-transition);
}

.rcsf-site-footer__list a:hover,
.rcsf-site-footer__list a:focus-visible {
  color: var(--rcsf-green);
  outline: none;
}

.rcsf-site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: var(--rcsf-space-3) var(--rcsf-gutter);
}

.rcsf-site-footer__bottom p {
  margin: 0;
  font-size: var(--rcsf-fs-300);
  color: rgba(255, 255, 255, 0.55);
}


/* ---------- 8b. Page hero (shared by inner pages) ----------------------- */

.rcsf-page-hero {
  background:
    radial-gradient(700px 400px at 90% 100%, var(--rcsf-green-glow), transparent 60%),
    linear-gradient(180deg, var(--rcsf-charcoal) 0%, var(--rcsf-charcoal-deep) 100%);
  color: var(--rcsf-text-light);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}

.rcsf-page-hero::before {
  /* Thin neon accent rule at the very top of the hero strip,
     creating a clear visual signal beneath the nav. */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rcsf-green);
}

.rcsf-page-hero__heading {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--rcsf-text-light);
  margin: var(--rcsf-space-2) 0 var(--rcsf-space-3);
  max-width: 22ch;
}

.rcsf-page-hero__lede {
  font-size: var(--rcsf-fs-500);
  color: var(--rcsf-text-dim);
  line-height: 1.7;
  max-width: 60ch;
  margin: 0;
}


/* ---------- 9. Motion: respect user preference --------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
