/* ResearchOne — hand-written design tokens and light theming on top of
   Bootstrap 5. Presentation only. */

:root {
  /* Brand palette */
  --r1-primary: #1b2a4a;
  --r1-primary-dark: #14213a;
  --r1-accent: #1e9e6a;
  --r1-accent-dark: #157a52;
  --r1-ink: #16203a;
  --r1-muted: #5b6577;
  --r1-surface: #f6f8fc;
  --r1-surface-alt: #eef2fb;
  --r1-border: #e2e8f4;

  /* Typography */
  --r1-font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Spacing / shape */
  --r1-radius: 0.85rem;
  --r1-radius-sm: 0.5rem;
  --r1-shadow: 0 10px 30px rgba(22, 32, 58, 0.08);
  --r1-shadow-sm: 0 4px 14px rgba(22, 32, 58, 0.06);

  /* Map Bootstrap theme colour to the brand primary */
  --bs-primary: var(--r1-primary);
  --bs-primary-rgb: 27, 42, 74;
  --bs-link-color: var(--r1-primary);
  --bs-link-hover-color: var(--r1-primary-dark);

  /* Remap Bootstrap success to brand money-green so money elements
     (text-bg-success / text-success) render exactly #1e9e6a */
  --bs-success: var(--r1-accent);
  --bs-success-rgb: 30, 158, 106;

  /* Remap Bootstrap info to brand navy so info surfaces (text-bg-info,
     alert-info) follow the brand instead of Bootstrap's teal/cyan */
  --bs-info: var(--r1-primary);
  --bs-info-rgb: 27, 42, 74;
  --bs-info-text-emphasis: var(--r1-primary-dark);
  --bs-info-bg-subtle: var(--r1-surface-alt);
  --bs-info-border-subtle: var(--r1-border);
}

body {
  font-family: var(--r1-font-sans);
  color: var(--r1-ink);
  background-color: var(--r1-surface);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

/* ---- Accessibility: skip link + visible focus ---- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1080;
  background: var(--r1-ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r1-radius-sm);
  transition: top 0.15s ease-in-out;
}
.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid rgba(27, 42, 74, 0.45);
  outline-offset: 2px;
}

/* ---- Buttons / brand colours ---- */
.btn-primary {
  --bs-btn-bg: var(--r1-primary);
  --bs-btn-border-color: var(--r1-primary);
  --bs-btn-hover-bg: var(--r1-primary-dark);
  --bs-btn-hover-border-color: var(--r1-primary-dark);
  --bs-btn-active-bg: var(--r1-primary-dark);
  --bs-btn-active-border-color: var(--r1-primary-dark);
}
.btn-accent {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--r1-accent);
  --bs-btn-border-color: var(--r1-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--r1-accent-dark);
  --bs-btn-hover-border-color: var(--r1-accent-dark);
  --bs-btn-active-bg: var(--r1-accent-dark);
  color: #fff;
}
.text-brand { color: var(--r1-primary) !important; }
.bg-brand { background-color: var(--r1-primary) !important; }
.bg-brand-soft { background-color: var(--r1-surface-alt) !important; }

/* Remote / info badges follow navy instead of Bootstrap teal */
.text-bg-info {
  color: #fff !important;
  background-color: var(--r1-primary) !important;
}

/* ---- Navbar ---- */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.navbar-brand .brand-mark-img {
  display: block;
}
.navbar-brand .brand-lockup {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.navbar-brand .brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.navbar-brand .brand-tagline {
  font-weight: 500;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.01em;
}

/* ---- Cards ---- */
.card {
  border: 1px solid var(--r1-border);
  border-radius: var(--r1-radius);
  box-shadow: var(--r1-shadow-sm);
}
.card.study-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card.study-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--r1-shadow);
}

.comp-badge {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--r1-surface-alt) 0%, #ffffff 60%);
  border-bottom: 1px solid var(--r1-border);
}
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---- How-it-works icon cards ---- */
.step-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--r1-surface-alt);
  color: var(--r1-primary);
  font-size: 1.5rem;
}

/* ---- Stats strip ---- */
.stats-strip {
  background: var(--r1-ink);
  color: #fff;
}
.stats-strip .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.stats-strip .stat-label {
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Application pipeline / stepper ---- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pipeline li {
  flex: 1 1 0;
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.5rem 0.25rem;
  border-radius: var(--r1-radius-sm);
  background: var(--r1-surface-alt);
  color: var(--r1-muted);
}
.pipeline li.is-done {
  background: var(--r1-primary);
  color: #fff;
}
.pipeline li.is-current {
  background: var(--r1-primary);
  color: #fff;
  font-weight: 700;
}
.pipeline li.is-terminal-bad {
  background: var(--bs-danger, #dc3545);
  color: #fff;
}

/* ---- Footer ---- */
footer.site-footer {
  flex-shrink: 0;
  background: var(--r1-primary);
  border-top: none;
  color: rgba(255, 255, 255, 0.85);
}
footer.site-footer a {
  color: #fff;
  text-decoration: none;
}
footer.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
/* Keep footer text legible (light on navy); scoped to the footer only */
footer.site-footer .text-brand,
footer.site-footer .text-muted {
  color: #fff !important;
}
footer.site-footer .dev-note {
  color: rgba(255, 255, 255, 0.75);
}
.dev-note {
  font-size: 0.8rem;
}

/* ---- Forms ---- */
.form-section {
  border: 1px solid var(--r1-border);
  border-radius: var(--r1-radius);
  background: #fff;
  box-shadow: var(--r1-shadow-sm);
}
.form-section > legend,
.form-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--r1-ink);
}

/* ============================================================
   Bold refresh (Nov 2026) — approved preview direction.
   Dark hero, glow gradients, display type, borderless vivid cards.
   Scoped additions only: staff/admin tables, forms and the
   application pipeline keep their existing styling.
   ============================================================ */

:root {
  --r1-display: 'Space Grotesk', var(--r1-font-sans);
  --r1-ink-dark: #0d1524;
  --r1-violet: #7c5cff;
  --r1-blue: #4f7cff;
  --r1-cyan: #38d6ff;
  --r1-mint: #3ddc97;
  --r1-mint-bright: #4ade80;
}

.r1-display {
  font-family: var(--r1-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Pill buttons everywhere public + staff; shape only, colours untouched
   except the explicit gradient CTA below. */
.btn-primary,
.btn-accent,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-light {
  --bs-btn-border-radius: 999px;
}

/* Gradient CTA (nav Register, hero, closing). Plain .btn-primary stays
   navy so staff/form buttons are unaffected. */
.btn-gradient {
  --bs-btn-border-radius: 999px;
  background-image: linear-gradient(92deg, var(--r1-violet), var(--r1-blue) 55%, var(--r1-cyan));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.45);
}
.btn-gradient:hover,
.btn-gradient:focus-visible {
  background-image: linear-gradient(92deg, #8b6fff, #5f8bff 55%, #4ddcff);
  border-color: transparent;
  color: #fff;
  filter: brightness(1.08);
}

/* Navbar brand mark glow */
.navbar-brand .brand-mark-img {
  filter: drop-shadow(0 0 12px rgba(124, 92, 255, 0.5));
}

/* ---- Bold hero ---- */
.hero-bold {
  position: relative;
  overflow: hidden;
  background: var(--r1-ink-dark);
  color: #fff;
}
.hero-bold .hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 420px at 12% -6%, rgba(124, 92, 255, 0.5), transparent 60%),
    radial-gradient(560px 400px at 88% 8%, rgba(56, 214, 255, 0.34), transparent 60%),
    radial-gradient(700px 480px at 55% 115%, rgba(61, 220, 151, 0.22), transparent 60%);
}
.hero-bold .hero-photo {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-size: cover;
  background-position: center 30%;
  -webkit-mask-image: linear-gradient(100deg, #000 30%, transparent 82%);
  mask-image: linear-gradient(100deg, #000 30%, transparent 82%);
}
.hero-bold .hero-in {
  position: relative;
  padding: 7rem 0 6rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d8e6ff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  margin-bottom: 1.6rem;
}
.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--r1-mint);
  box-shadow: 0 0 12px var(--r1-mint);
}
.hero-bold h1 {
  font-family: var(--r1-display);
  font-weight: 700;
  font-size: clamp(3rem, 6.4vw, 5.1rem);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 780px;
}
.hero-bold h1 .grad-text {
  background: linear-gradient(92deg, #b7a6ff, var(--r1-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-bold .lead {
  color: #c6d2e2;
  max-width: 600px;
}
.hero-stats b {
  font-family: var(--r1-display);
  font-size: 1.9rem;
  line-height: 1.1;
}
.hero-stats span {
  font-size: 0.85rem;
  color: #aab6c8;
}

/* ---- Ticker ---- */
.r1-ticker {
  background: linear-gradient(90deg, var(--r1-violet), var(--r1-blue), var(--r1-cyan));
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
}
.r1-ticker-inner {
  display: inline-block;
  font-family: var(--r1-display);
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: 0.06em;
  padding: 0.8rem 0;
  animation: r1-ticker-slide 26s linear infinite;
}
@keyframes r1-ticker-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Trust row (hairlines, no boxes) ---- */
.trust-row {
  border-bottom: 1px solid var(--r1-border);
}
@media (min-width: 768px) {
  .trust-row > div + div {
    border-left: 1px solid var(--r1-border);
  }
}

/* ---- How-it-works steps ---- */
.r1-step {
  border-top: 5px solid var(--r1-violet);
  border-radius: 1.6rem;
  background: #fff;
  box-shadow: 0 14px 34px rgba(13, 21, 36, 0.07);
  padding: 2rem 1.9rem;
  height: 100%;
}
.r1-step--blue { border-top-color: var(--r1-blue); }
.r1-step--mint { border-top-color: var(--r1-mint); }
.r1-step-num {
  font-family: var(--r1-display);
  font-weight: 700;
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}

/* ---- Image band ---- */
.r1-band {
  height: 420px;
  position: relative;
  overflow: hidden;
}
.r1-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.r1-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 21, 36, 0) 55%, rgba(13, 21, 36, 0.55));
}
@media (max-width: 767px) {
  .r1-band { height: 260px; }
  .hero-bold .hero-in { padding: 5.25rem 0 4.5rem; }
}

/* ---- Dark sections (study list) ---- */
.r1-dark {
  background: var(--r1-ink-dark);
  color: #fff;
  /* Lighten Bootstrap's muted text inside dark sections via its own token */
  --bs-secondary-color: #aab6c8;
}
.r1-dark :focus-visible {
  outline-color: rgba(255, 255, 255, 0.85);
}
.r1-dark .page-link {
  background: transparent;
  color: #dbe4ef;
  border-color: rgba(255, 255, 255, 0.22);
}
.r1-dark .page-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.r1-dark .page-item.disabled .page-link {
  color: #7d8ca3;
  background: transparent;
}

/* Dark study cards: vivid, borderless feel, same markup + behaviour */
.study-card--dark {
  background: linear-gradient(160deg, #1a2a47, #101c31);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.study-card--dark:hover {
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}
.study-card--dark .comp-badge {
  font-size: 1.35rem;
}
.study-card--dark .text-bg-info {
  background-color: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}
.study-card--dark .go {
  font-weight: 700;
  color: #fff;
}
.study-card--dark .go span {
  color: var(--r1-cyan);
}

/* Open-studies chips (homepage): links that filter the homepage cards */
.r1-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2.1rem 0 1.9rem;
}
.r1-chip {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  color: #dbe4ef;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
  text-decoration: none;
}
.r1-chip:hover { color: #fff; }
.r1-chip.on {
  background: #fff;
  color: var(--r1-ink-dark);
  box-shadow: none;
}

/* ---- Study detail pay box (reskin only; no sticky — Kiro launch fix owns it) ---- */
.pay-box {
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(22, 32, 58, 0.12);
}
.pay-box .display-6 {
  font-family: var(--r1-display);
  letter-spacing: -0.02em;
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  .r1-ticker-inner { animation: none; }
  .card.study-card:hover,
  .study-card--dark:hover { transform: none; }
}
