/* RevPerfect Revenue Blog — shared stylesheet
 * Mobile-first, dark-mode aware, serif headings, generous line-height.
 */

:root {
  --rp-navy: #0a1428;
  --rp-cream: #f5efe1;
  --rp-amber: #e8a93a;
  --rp-ink: #14202e;
  --rp-muted: #4a5a6e;
  --rp-rule: #d9d2c2;
  --rp-bg: #fbf8f1;
  --rp-card-bg: #ffffff;
  --rp-link: #b07a14;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--rp-bg);
  color: var(--rp-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.rp-site-header {
  border-bottom: 1px solid var(--rp-rule);
  background: var(--rp-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
}

.rp-site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rp-wordmark {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.rp-wordmark .rev { color: var(--rp-ink); }
.rp-wordmark .perfect { color: var(--rp-amber); }

.rp-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.rp-nav a {
  color: var(--rp-muted);
  text-decoration: none;
  font-weight: 500;
}
.rp-nav a:hover { color: var(--rp-ink); }

main.rp-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.rp-eyebrow {
  font-size: 13px;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 8px 0 14px;
}

h1.rp-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  color: var(--rp-ink);
}

.rp-byline {
  font-size: 14px;
  color: var(--rp-muted);
  margin: 0 0 28px;
}
.rp-byline strong { color: var(--rp-ink); font-weight: 600; }

.rp-hero {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0 0 28px;
  display: block;
  background: var(--rp-navy);
}

.rp-article h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  color: var(--rp-ink);
}

.rp-article h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  margin: 28px 0 10px;
  color: var(--rp-ink);
}

.rp-article p {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--rp-ink);
}

.rp-article a {
  color: var(--rp-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.rp-article a:hover { color: var(--rp-amber); }

.rp-article ul,
.rp-article ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.rp-article li {
  margin-bottom: 8px;
  font-size: 17px;
}

blockquote.rp-pullquote {
  border-left: 3px solid var(--rp-amber);
  padding: 6px 0 6px 20px;
  margin: 28px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--rp-ink);
}

.rp-table-wrap { overflow-x: auto; margin: 18px 0 24px; }
table.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.rp-table th,
table.rp-table td {
  border-bottom: 1px solid var(--rp-rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
table.rp-table th {
  background: rgba(232, 169, 58, 0.08);
  font-weight: 600;
}

aside.rp-newsletter-cta {
  background: linear-gradient(135deg, #fffaee 0%, #fff3d8 100%);
  border: 1px solid rgba(232, 169, 58, 0.35);
  border-radius: 14px;
  padding: 22px 22px;
  margin: 32px 0;
}
aside.rp-newsletter-cta strong {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  display: block;
  margin-bottom: 6px;
}
aside.rp-newsletter-cta p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--rp-muted);
}
.rp-newsletter-cta__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rp-newsletter-cta__form input[type="email"] {
  flex: 1 1 220px;
  padding: 11px 14px;
  border: 1px solid var(--rp-rule);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
.rp-newsletter-cta__form button {
  padding: 11px 18px;
  background: var(--rp-ink);
  color: var(--rp-cream);
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.rp-newsletter-cta__form button:hover { background: var(--rp-amber); color: var(--rp-ink); }

.rp-faq h3 {
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 6px;
}
.rp-faq p { margin-bottom: 12px; }

.rp-author {
  margin-top: 56px;
  padding: 22px;
  border: 1px solid var(--rp-rule);
  border-radius: 12px;
  background: var(--rp-card-bg);
}
.rp-author strong { font-family: 'Fraunces', serif; font-size: 18px; }

.rp-cta-inline {
  display: inline-block;
  background: var(--rp-ink);
  color: var(--rp-cream);
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  margin: 8px 0;
}
.rp-cta-inline:hover { background: var(--rp-amber); color: var(--rp-ink); }

.rp-site-footer {
  border-top: 1px solid var(--rp-rule);
  margin-top: 48px;
  padding: 28px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--rp-muted);
}
.rp-site-footer a { color: var(--rp-muted); }

@media (prefers-color-scheme: dark) {
  :root {
    --rp-bg: #0d1623;
    --rp-card-bg: #131f30;
    --rp-ink: #f0ece1;
    --rp-muted: #9aa9bb;
    --rp-rule: #233346;
    --rp-link: #f0c168;
  }
  .rp-site-header { background: var(--rp-bg); }
  aside.rp-newsletter-cta {
    background: linear-gradient(135deg, #1c2638 0%, #2a2014 100%);
    border-color: rgba(232, 169, 58, 0.25);
  }
  .rp-newsletter-cta__form input[type="email"] {
    background: var(--rp-card-bg);
    color: var(--rp-ink);
    border-color: var(--rp-rule);
  }
  .rp-newsletter-cta__form button { background: var(--rp-amber); color: var(--rp-navy); }
  table.rp-table th { background: rgba(232, 169, 58, 0.12); }
}

/* ============================================================
 * BLOG-FX — premium interaction layer (paired with blog-fx.js)
 * Editorial restraint, GPU-only transforms, motion-reduce safe.
 * ============================================================ */
html { scroll-behavior: smooth; }

/* Reading progress bar */
.rp-fx-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9999;
  background: linear-gradient(90deg, #e8a93a 0%, #f5b945 100%);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 80ms linear;
  pointer-events: none;
}

/* Hero image entrance */
.rp-fx-hero-img {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.rp-fx-hero-img--in { opacity: 1; transform: translateY(0); }

/* Universal fade-in-on-scroll */
.rp-fx-fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.rp-fx-fade--in { opacity: 1; transform: translateY(0); }
.rp-fx-fade--card { transition-duration: 600ms; }

/* Animated underline on body links */
main p a, main li a, .rp-article p a, .rp-article li a {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 300ms ease-out;
}
main p a:hover, main li a:hover, .rp-article p a:hover, .rp-article li a:hover {
  background-size: 100% 1px;
}

/* Pull-quote: animated left border + italic fade */
main blockquote, blockquote.rp-pullquote {
  position: relative;
}
main blockquote::before, blockquote.rp-pullquote::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--rp-amber, #e8a93a);
  transition: height 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
main blockquote.rp-fx-fade--in::before,
blockquote.rp-pullquote.rp-fx-fade--in::before {
  height: 100%;
}
/* Mute the original solid border for the animated treatment to take over */
main blockquote, blockquote.rp-pullquote { border-left-color: transparent; }

/* Newsletter aside hover lift */
aside.rp-newsletter-cta {
  transition: box-shadow 320ms ease-out, transform 320ms ease-out;
  will-change: transform;
}
aside.rp-newsletter-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(10, 20, 40, 0.10);
}
.rp-newsletter-cta__form button {
  position: relative;
  transition: background 200ms ease-out, color 200ms ease-out, padding 220ms ease-out;
}
.rp-newsletter-cta__form button::after {
  content: " \2192";
  display: inline-block;
  margin-left: 6px;
  transform: translateX(0);
  transition: transform 260ms ease-out;
}
.rp-newsletter-cta__form button:hover::after { transform: translateX(4px); }
.rp-newsletter-cta__form input:focus {
  outline: none;
  border-color: var(--rp-amber, #e8a93a);
  box-shadow: 0 0 0 4px rgba(232, 169, 58, 0.15);
}

/* FAQ accordion */
details.rp-fx-faq {
  border-top: 1px solid var(--rp-rule, #e6e1d5);
  padding: 6px 0;
}
details.rp-fx-faq:last-of-type { border-bottom: 1px solid var(--rp-rule, #e6e1d5); }
details.rp-fx-faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 36px 14px 0;
  position: relative;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  color: var(--rp-ink, #14202e);
  transition: color 200ms ease-out;
}
details.rp-fx-faq > summary::-webkit-details-marker { display: none; }
details.rp-fx-faq > summary:hover { color: var(--rp-amber, #b07a14); }
details.rp-fx-faq .rp-fx-faq__icon {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
details.rp-fx-faq .rp-fx-faq__icon::before,
details.rp-fx-faq .rp-fx-faq__icon::after {
  content: "";
  position: absolute;
  background: var(--rp-amber, #e8a93a);
  border-radius: 1px;
}
details.rp-fx-faq .rp-fx-faq__icon::before {
  left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
}
details.rp-fx-faq .rp-fx-faq__icon::after {
  top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
details.rp-fx-faq[open] .rp-fx-faq__icon::after { transform: scaleY(0); }
details.rp-fx-faq > *:not(summary) {
  animation: rpFxFaqOpen 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rpFxFaqOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sticky TOC (desktop only) */
.rp-fx-toc {
  display: none;
  position: fixed;
  top: 120px;
  left: max(24px, calc((100vw - 1080px) / 2 - 220px));
  width: 220px;
  font-size: 13px;
  line-height: 1.45;
  z-index: 20;
}
.rp-fx-toc__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rp-muted, #6c7689);
  font-weight: 700;
  margin-bottom: 10px;
}
.rp-fx-toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rp-rule, #e6e1d5); }
.rp-fx-toc li { margin: 0; }
.rp-fx-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  color: var(--rp-muted, #6c7689);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 200ms ease-out, border-color 200ms ease-out, padding-left 200ms ease-out;
}
.rp-fx-toc a:hover { color: var(--rp-ink, #14202e); }
.rp-fx-toc a.rp-fx-toc__on {
  color: var(--rp-ink, #14202e);
  border-left-color: var(--rp-amber, #e8a93a);
  font-weight: 600;
}

/* Floating share buttons (desktop only) */
.rp-fx-share {
  display: none;
  position: fixed;
  top: 200px;
  right: max(24px, calc((100vw - 1080px) / 2 - 56px));
  flex-direction: column;
  gap: 10px;
  z-index: 20;
}
.rp-fx-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--rp-rule, #d9d2c2);
  color: var(--rp-muted, #6c7689);
  cursor: pointer;
  text-decoration: none;
  transition: background 220ms ease-out, color 220ms ease-out, border-color 220ms ease-out, transform 220ms ease-out;
  padding: 0;
}
.rp-fx-share__btn:hover {
  background: var(--rp-amber, #e8a93a);
  color: var(--rp-ink, #14202e);
  border-color: var(--rp-amber, #e8a93a);
  transform: translateY(-1px);
}
.rp-fx-share__btn--ok {
  background: var(--rp-amber, #e8a93a);
  color: var(--rp-ink, #14202e);
  border-color: var(--rp-amber, #e8a93a);
}

/* Time-remaining pill */
.rp-fx-timepill {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 20, 40, 0.92);
  color: #f5efe0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  z-index: 30;
  box-shadow: 0 6px 22px rgba(10, 20, 40, 0.18);
  transition: opacity 280ms ease-out, transform 280ms ease-out;
}
.rp-fx-timepill--hide { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* Hub hero word-stagger */
.rp-fx-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.rp-fx-hero-ready .rp-fx-word { opacity: 1; transform: translateY(0); }

/* Subtle hero parallax (hub) */
.rp-hero {
  background-attachment: fixed;
}

/* Card hover lift (hub) */
.rp-card { transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.rp-card__media { overflow: hidden; }
.rp-card__media img { transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.rp-card:hover .rp-card__media img { transform: scale(1.04); }
.rp-feat__card { transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 360ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.rp-feat__media { overflow: hidden; }
.rp-feat__card:hover { transform: translateY(-6px); box-shadow: 0 30px 80px rgba(10, 20, 40, 0.22); }
.rp-feat__card:hover .rp-feat__media img { transform: scale(1.02); }
.rp-feat__media img { transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Newsletter (hub) — submit arrow + focus glow */
.rp-news__form button {
  transition: background 200ms ease-out, transform 200ms ease-out;
}
.rp-news__form button::after {
  content: " \2192";
  display: inline-block;
  margin-left: 6px;
  transform: translateX(0);
  transition: transform 260ms ease-out;
}
.rp-news__form button:hover::after { transform: translateX(4px); }
.rp-news__form input:focus {
  outline: none;
  border-color: #f5b945;
  box-shadow: 0 0 0 4px rgba(245, 185, 69, 0.18);
}

/* Desktop-only floating widgets */
@media (min-width: 1100px) {
  .rp-fx-toc { display: block; }
  .rp-fx-share { display: flex; }
  .rp-fx-timepill { display: block; }
}

/* Reduced motion: turn everything to instant */
@media (prefers-reduced-motion: reduce) {
  .rp-fx-progress { transition: none; }
  .rp-fx-fade, .rp-fx-hero-img, .rp-fx-word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  details.rp-fx-faq > *:not(summary) { animation: none; }
  .rp-card, .rp-card__media img, .rp-feat__card, .rp-feat__media img,
  aside.rp-newsletter-cta, .rp-fx-share__btn,
  .rp-newsletter-cta__form button::after, .rp-news__form button::after {
    transition: none !important;
  }
  .rp-hero { background-attachment: scroll; }
  html { scroll-behavior: auto; }
}

