/* =========================================================
   Ridge Rank — business site (sandbox rebuild)
   Bootstrap 5.3 + custom theme layer.
   Palette lifted from EvalApp-Angular/src/styles.scss:
     primary  #09b850   secondary #444442   info    #09D9F5
     success  #2986E6   warning   #ffcb24   danger  #fa190f
   Expanded tints (soft/deep/dark) derived from those.
   ========================================================= */

:root {
  --rr-primary: #09b850;
  --rr-primary-dark: #078a3c;       /* ~25% shade, matches app $primary-dark */
  --rr-primary-deep: #065f2b;
  --rr-primary-soft: #e7f8ee;
  --rr-secondary: #444442;
  --rr-ink: #232322;
  --rr-blue: #2986e6;               /* app "success" */
  --rr-blue-soft: #e9f2fd;
  --rr-cyan: #09d9f5;               /* app "info" */
  --rr-cyan-soft: #e5fbfe;
  --rr-warning: #ffcb24;
  --rr-danger: #fa190f;
  --rr-surface: #f6faf7;            /* faint green section background */
  --rr-border: #e4ece7;

  /* Re-point Bootstrap's theme vars at the app palette */
  --bs-primary: var(--rr-primary);
  --bs-primary-rgb: 9, 184, 80;
  --bs-secondary: var(--rr-secondary);
  --bs-secondary-rgb: 68, 68, 66;
  --bs-success: var(--rr-blue);
  --bs-success-rgb: 41, 134, 230;
  --bs-info: var(--rr-cyan);
  --bs-info-rgb: 9, 217, 245;
  --bs-warning: var(--rr-warning);
  --bs-warning-rgb: 255, 203, 36;
  --bs-danger: var(--rr-danger);
  --bs-danger-rgb: 250, 25, 15;
  --bs-body-color: #47504a;
  --bs-body-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-link-color: var(--rr-primary-dark);
  --bs-link-hover-color: var(--rr-primary-deep);
  --bs-link-color-rgb: 7, 138, 60;
  --bs-link-hover-color-rgb: 6, 95, 43;
}

html {
  /* Base font: 125% of the browser default = a crisp 20px (whole-pixel sizes
     avoid ClearType blur on Windows, which 120% -> 19.2px suffers from).
     Everything sized in rem (Bootstrap headings, buttons, spacing) scales
     from this one value. If 20px feels too big, 112.5% -> 18px is the other
     whole-pixel option. */
  font-size: 125%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keep anchored sections clear of the fixed navbar */
}

body {
  font-family: var(--bs-body-font-family);
  color: var(--bs-body-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn, .rr-eyebrow {
  font-family: 'Poppins', 'Roboto', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--rr-ink);
  font-weight: 600;
}

.text-primary { color: var(--rr-primary-dark) !important; }

strong, b {
  letter-spacing: 1px; /* Roboto Bold sets tight at 20px; open it up slightly */
}

/* ---------- Buttons ---------- */

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--rr-primary);
  --bs-btn-border-color: var(--rr-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--rr-primary-dark);
  --bs-btn-hover-border-color: var(--rr-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--rr-primary-deep);
  --bs-btn-active-border-color: var(--rr-primary-deep);
  --bs-btn-disabled-bg: var(--rr-primary);
  --bs-btn-disabled-border-color: var(--rr-primary);
  --bs-btn-focus-shadow-rgb: 9, 184, 80;
  font-weight: 500;
}

.btn-outline-primary {
  --bs-btn-color: var(--rr-primary-dark);
  --bs-btn-border-color: var(--rr-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--rr-primary);
  --bs-btn-hover-border-color: var(--rr-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--rr-primary-dark);
  --bs-btn-active-border-color: var(--rr-primary-dark);
  --bs-btn-focus-shadow-rgb: 9, 184, 80;
  font-weight: 500;
}

.btn-light-on-dark {
  --bs-btn-color: var(--rr-primary-deep);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: var(--rr-primary-deep);
  --bs-btn-hover-bg: var(--rr-primary-soft);
  --bs-btn-hover-border-color: var(--rr-primary-soft);
  --bs-btn-active-color: var(--rr-primary-deep);
  --bs-btn-active-bg: var(--rr-primary-soft);
  --bs-btn-active-border-color: var(--rr-primary-soft);
  font-weight: 500;
}

.btn-lg { padding: 0.8rem 1.6rem; border-radius: 0.75rem; }
.btn { border-radius: 0.6rem; }

/* ---------- Navbar ---------- */

.rr-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease, padding 0.25s ease, background 0.25s ease;
}

.rr-navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.25rem 1.25rem rgba(15, 40, 25, 0.08);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.rr-navbar .navbar-brand img { height: 44px; width: auto; }
.rr-navbar .navbar-brand .brand-name {
  color: var(--rr-secondary);
  font-weight: 600;
  font-size: 1.45rem;
}

.rr-navbar .nav-link {
  font-weight: 500;
  color: var(--rr-secondary);
  margin: 0 0.35rem;
  position: relative;
}

.rr-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--rr-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.rr-navbar .nav-link:hover { color: var(--rr-primary-dark); }
.rr-navbar .nav-link.active { color: var(--rr-primary-dark); }
.rr-navbar .nav-link.active::after,
.rr-navbar .nav-link:hover::after { transform: scaleX(1); }

/* ---------- Section scaffolding ---------- */

.rr-section { padding: 5rem 0; }
.rr-section-alt { background: var(--rr-surface); }

.rr-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rr-primary-dark);
  background: var(--rr-primary-soft);
  border: 1px solid #cdeeda;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.rr-section-title { max-width: 720px; }
.rr-section-title.text-center { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */

.rr-hero {
  position: relative;
  /* Same gradient as the Common Scenarios band */
  background: linear-gradient(135deg, var(--rr-primary-deep) 0%, var(--rr-primary-dark) 100%);
  color: #fff;
  overflow: hidden;
}

.rr-hero::before,
.rr-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.rr-hero::before {
  width: 560px;
  height: 560px;
  top: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 68%);
}

.rr-hero::after {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(9, 217, 245, 0.14) 0%, rgba(9, 217, 245, 0) 68%);
}

.rr-hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.rr-hero strong { color: #fff; }

.rr-hero .hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: #b8ecca;
  font-weight: 500;
}

.rr-hero .rr-eyebrow {
  color: #eafcf1;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.rr-hero .rr-checklist li { color: #fff; }
.rr-hero .rr-checklist li .fa-circle-check { color: #8fe6b2; }

.rr-hero-img img {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, 0.35);
}

.rr-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rr-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  color: var(--rr-secondary);
}

.rr-checklist li .fa-circle-check { color: var(--rr-primary); margin-top: 0.2rem; }

@media (max-width: 575.98px) {
  .rr-checklist { grid-template-columns: 1fr; }
}

/* ---------- Cards & icons ---------- */

.rr-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--rr-border);
  border-radius: 1rem;
  box-shadow: 0 0.35rem 1.25rem rgba(15, 40, 25, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.9rem 2rem rgba(15, 40, 25, 0.10);
}

.rr-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: var(--rr-primary-soft);
  color: var(--rr-primary-dark);
}

.rr-icon-blue { background: var(--rr-blue-soft); color: var(--rr-blue); }
.rr-icon-cyan { background: var(--rr-cyan-soft); color: #0797ab; }

.rr-bullets { list-style: none; padding: 0; margin: 0; }
.rr-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}
.rr-bullets li:last-child { margin-bottom: 0; }
.rr-bullets .fa-check { color: var(--rr-primary); margin-top: 0.25rem; }
.rr-bullets .rr-li-icon { color: var(--rr-primary-dark); margin-top: 0.25rem; width: 1.1rem; text-align: center; }

/* ---------- Feature cards (image on top) ---------- */

.rr-feature-card { overflow: hidden; }

.rr-shot-wrap {
  background: var(--rr-surface);
  border-bottom: 1px solid var(--rr-border);
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}

.rr-shot {
  width: 100%;
  aspect-ratio: 500 / 290;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ---------- Scenario band ---------- */

.rr-band {
  background: linear-gradient(135deg, var(--rr-primary-deep) 0%, var(--rr-primary-dark) 100%);
  color: #eafcf1;
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2.5rem rgba(6, 95, 43, 0.28);
}

.rr-band h5 { color: #fff; }
.rr-band strong { color: #fff; }
.rr-band .fa-circle-arrow-right { color: #8fe6b2; margin-top: 0.25rem; }

/* ---------- Big screenshot frames ---------- */

.rr-frame img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--rr-border);
  box-shadow: 0 1rem 2.5rem rgba(15, 40, 25, 0.12);
}

/* ---------- About ---------- */

.rr-portrait {
  width: min(260px, 70%);
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 0.75rem 2rem rgba(15, 40, 25, 0.15);
}

.rr-signature { color: var(--rr-ink); }

/* ---------- Contact ---------- */

.rr-form .form-control {
  border-radius: 0.6rem;
  border-color: var(--rr-border);
  padding: 0.7rem 0.9rem;
}

.rr-form .form-control:focus {
  border-color: var(--rr-primary);
  box-shadow: 0 0 0 0.2rem rgba(9, 184, 80, 0.15);
}

.rr-form label { font-weight: 500; color: var(--rr-secondary); margin-bottom: 0.3rem; }

/* ---------- Footer ---------- */

.rr-footer {
  background: var(--rr-ink);
  color: #b9c2bc;
  border-top: 4px solid var(--rr-primary);
}

.rr-footer h6 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.rr-footer .brand-name { color: #f0f0f0; font-weight: 600; font-size: 1.3rem; }
.rr-footer a { color: #b9c2bc; text-decoration: none; transition: color 0.15s ease; }
.rr-footer a:hover { color: #6fe09c; }
.rr-footer .footer-links { list-style: none; padding: 0; margin: 0; }
.rr-footer .footer-links li { margin-bottom: 0.5rem; }
.rr-footer .copyright {
  border-top: 1px solid #3a3a38;
  color: #8f978f;
  font-size: 0.85rem;
}

/* ---------- Scroll-top button ---------- */

.rr-scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: var(--rr-primary);
  color: #fff;
  border: none;
  box-shadow: 0 0.5rem 1.25rem rgba(6, 95, 43, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1030;
}

.rr-scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.rr-scroll-top:hover { background: var(--rr-primary-dark); color: #fff; }

/* ---------- Reveal-on-scroll ---------- */
/* Gated behind html.js (set inline in <head>) so content is never hidden if JS fails */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible { opacity: 1; transform: none; }

.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-d1, .js .reveal-d2, .js .reveal-d3 {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Subpages (guide, privacy policy, 404) ---------- */

.rr-subpage { padding: 7.5rem 0 4rem; }

/* Guide sidebar: clear the fixed navbar when sticky */
.rr-guide-nav { top: 6rem; }

/* Guide hub cards are links — keep body text muted, not link-colored */
a.rr-card { color: var(--bs-body-color); }
a.rr-card h5 { color: var(--rr-ink); }

/* Honeypot field — visually removed but still present in the form for bots */
.rr-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Guide sidebar accordion ---------- */

.rr-nav-sub {
  padding-left: 2rem;
  font-size: 0.85rem;
}

.rr-nav-caret {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.5rem 0.85rem;
  align-self: stretch;
}

.rr-nav-caret .fa-chevron-down {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.rr-nav-caret.collapsed .fa-chevron-down { transform: rotate(-90deg); }
