/* ReadRankAI action buttons: one pill style any page can load (<link rel="stylesheet" href="/buttons.css">).
   Used on the homepage and the pricing page (branch button-style). On a page:
     <a class="rrbtn rrbtn-primary">Start free</a>          solid green pill, 48px high
     <a class="rrbtn rrbtn-secondary">Log in</a>            transparent pill with a light outline, 48px high
   Add rrbtn-sm for a 40px button (top bar, small rows), rrbtn-block for full width, rrbtn-arrow for the trailing
   arrow that moves 3px right on hover (drawn by CSS with empty alternative text, so screen readers skip it).
   Dark is the default; html[data-theme="light"] (theme.js) switches to the light colours. The colour rules use two
   classes (.rrbtn.rrbtn-primary), so a page rule like ".hp a { color: inherit }" cannot change a button text colour.
   A shared file: after changing it, flush the Hostinger CDN cache (see CLAUDE.md, Upload method). */

.rrbtn {
  --rrbtn-h: 48px;
  --rrbtn-green: #4fd18b; --rrbtn-green-hover: #6adc9e; --rrbtn-on-green: #06130c;
  --rrbtn-ring: rgba(79, 209, 139, .35); --rrbtn-glow: rgba(79, 209, 139, .30);
  --rrbtn-ring-hover: rgba(79, 209, 139, .55); --rrbtn-glow-hover: rgba(79, 209, 139, .45);
  --rrbtn-text: #ffffff; --rrbtn-line: rgba(255, 255, 255, .28); --rrbtn-line-hover: rgba(255, 255, 255, .5);
  --rrbtn-fill-hover: rgba(255, 255, 255, .07); --rrbtn-focus: #4fd18b;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-sizing: border-box; height: var(--rrbtn-h); padding: 0 28px; margin: 0;
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: 0;
  white-space: nowrap; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, color .15s ease;
}
.rrbtn-sm { --rrbtn-h: 40px; padding: 0 20px; font-size: 14px; }
.rrbtn-block { display: flex; width: 100%; }

/* Primary: solid green, near-black text, a soft glow; hover a little brighter, 1px up, a stronger glow */
.rrbtn.rrbtn-primary { background: var(--rrbtn-green); border-color: var(--rrbtn-green); color: var(--rrbtn-on-green);
  box-shadow: 0 0 0 1px var(--rrbtn-ring), 0 8px 28px var(--rrbtn-glow); }
.rrbtn.rrbtn-primary:hover { background: var(--rrbtn-green-hover); border-color: var(--rrbtn-green-hover); color: var(--rrbtn-on-green);
  transform: translateY(-1px); box-shadow: 0 0 0 1px var(--rrbtn-ring-hover), 0 12px 36px var(--rrbtn-glow-hover); }
.rrbtn.rrbtn-primary:active { transform: translateY(0); }

/* Secondary: transparent with a 1px light outline; hover fills faintly */
.rrbtn.rrbtn-secondary { background: transparent; border-color: var(--rrbtn-line); color: var(--rrbtn-text); box-shadow: none; }
.rrbtn.rrbtn-secondary:hover { background: var(--rrbtn-fill-hover); border-color: var(--rrbtn-line-hover); color: var(--rrbtn-text); }

/* Keyboard focus: a clear ring outside the pill (not shown for mouse clicks) */
.rrbtn:focus { outline: none; }
.rrbtn:focus-visible { outline: 2px solid var(--rrbtn-focus); outline-offset: 3px; }

/* The trailing arrow */
.rrbtn-arrow::after { content: "→"; content: "→" / ""; display: inline-block; transition: transform .15s ease; }
.rrbtn-arrow:hover::after { transform: translateX(3px); }

/* Light theme: the same green with near-black text (9.7:1); a deeper green ring and glow so the pill stands out on
   white; secondary buttons with dark text and a dark outline */
html[data-theme="light"] .rrbtn {
  --rrbtn-green-hover: #5fd897;
  --rrbtn-ring: rgba(31, 154, 94, .45); --rrbtn-glow: rgba(31, 154, 94, .22);
  --rrbtn-ring-hover: rgba(31, 154, 94, .65); --rrbtn-glow-hover: rgba(31, 154, 94, .32);
  --rrbtn-text: #12201a; --rrbtn-line: rgba(18, 32, 26, .28); --rrbtn-line-hover: rgba(18, 32, 26, .5);
  --rrbtn-fill-hover: rgba(18, 32, 26, .05); --rrbtn-focus: #13764a;
}
/* Dark bands in the light theme (the site's top bar and phone menu stay dark there, theme.css; or any element with
   the class rrbtn-dark): the dark colours, so secondary buttons keep their white text and outline */
html[data-theme="light"] :is(.rr-nav, .rr-mnav, .rrbtn-dark) .rrbtn {
  --rrbtn-green-hover: #6adc9e;
  --rrbtn-ring: rgba(79, 209, 139, .35); --rrbtn-glow: rgba(79, 209, 139, .30);
  --rrbtn-ring-hover: rgba(79, 209, 139, .55); --rrbtn-glow-hover: rgba(79, 209, 139, .45);
  --rrbtn-text: #ffffff; --rrbtn-line: rgba(255, 255, 255, .28); --rrbtn-line-hover: rgba(255, 255, 255, .5);
  --rrbtn-fill-hover: rgba(255, 255, 255, .07); --rrbtn-focus: #4fd18b;
}

@media (prefers-reduced-motion: reduce) {
  .rrbtn, .rrbtn-arrow::after { transition: none; }
  .rrbtn.rrbtn-primary:hover, .rrbtn.rrbtn-secondary:hover, .rrbtn-arrow:hover::after { transform: none; }
}
