/*
Theme Name: Research & Statistics Consulting
Theme URI: https://example.com/
Author: [Your Name]
Author URI: https://example.com/
Description: A clean, editorial one-page theme for a research and statistics consulting service. Activate it and the landing page becomes your homepage.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: research-stats-consulting
*/

/* Scoped under .rsc-page so styles stay self-contained */
.rsc-page {
  --ink:      #16202e;
  --ink-soft: #3a4858;
  --paper:    #faf6ef;
  --paper-2:  #f2ebdf;
  --line:     #ddd2c0;
  --accent:   #7c2d3a;
  --accent-2: #a8475a;
  --white:    #ffffff;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1140px;

  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.rsc-page * { box-sizing: border-box; }
.rsc-page img { max-width: 100%; display: block; }
.rsc-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Typography */
.rsc-page h1, .rsc-page h2, .rsc-page h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.rsc-page h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.rsc-page h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.rsc-page h3 { font-size: 1.2rem; }
.rsc-page p  { margin: 0 0 1em; color: var(--ink-soft); }

.rsc-eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Buttons */
.rsc-btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  border: 1.5px solid var(--ink);
}
.rsc-btn--primary { background: var(--ink); color: var(--paper); }
.rsc-btn--primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.rsc-btn--ghost { background: transparent; color: var(--ink); }
.rsc-btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* Nav */
.rsc-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,239,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.rsc-nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.rsc-logo { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.rsc-logo span { color: var(--accent); }
.rsc-nav__links { display: flex; gap: 28px; align-items: center; }
.rsc-nav__links a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.rsc-nav__links a:hover { color: var(--accent); }
.rsc-nav__cta { font-size: 0.85rem; padding: 9px 18px; }

/* Section spacing */
.rsc-section { padding: 96px 0; }
.rsc-section--tint { background: var(--paper-2); }
.rsc-section__head { max-width: 640px; margin-bottom: 56px; }

/* Hero */
.rsc-hero {
  position: relative;
  padding: 110px 0 96px;
  background:
    radial-gradient(circle at 85% 15%, rgba(124,45,58,0.06), transparent 45%),
    var(--paper);
  overflow: hidden;
}
.rsc-hero::after {
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .35; pointer-events:none;
}
.rsc-hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.rsc-hero__lede { font-size: 1.2rem; max-width: 30ch; }
.rsc-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.rsc-hero__card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 4px; padding: 32px;
  box-shadow: 0 24px 48px -28px rgba(22,32,46,0.4);
}
.rsc-hero__card h3 { font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.rsc-stat { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--paper-2); }
.rsc-stat:last-child { border-bottom: none; }
.rsc-stat b { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); line-height: 1; }
.rsc-stat span { font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 880px) { .rsc-hero__grid { grid-template-columns: 1fr; } .rsc-hero__card { order: -1; } }

.rsc-fade { opacity: 0; transform: translateY(16px); animation: rscIn .7s ease forwards; }
.rsc-fade.d1 { animation-delay: .1s; }
.rsc-fade.d2 { animation-delay: .25s; }
.rsc-fade.d3 { animation-delay: .4s; }
@keyframes rscIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rsc-fade { animation: none; opacity: 1; transform: none; } }

/* Services grid */
.rsc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .rsc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rsc-grid { grid-template-columns: 1fr; } }
.rsc-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  padding: 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.rsc-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(22,32,46,0.5); border-color: var(--accent); }
.rsc-card__num { font-family: var(--serif); font-size: 0.9rem; color: var(--accent); margin-bottom: 14px; }
.rsc-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.rsc-card p { font-size: 0.95rem; margin: 0; }

/* Audience pills */
.rsc-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.rsc-pill { background: var(--white); border: 1px solid var(--line); border-radius: 100px; padding: 10px 22px; font-weight: 500; font-size: 0.95rem; }

/* Process */
.rsc-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 820px) { .rsc-steps { grid-template-columns: repeat(2, 1fr); } }
.rsc-step { position: relative; padding-top: 56px; }
.rsc-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-size: 2.2rem; color: var(--accent);
}
.rsc-step h3 { font-size: 1.05rem; }
.rsc-step p { font-size: 0.92rem; margin: 0; }

/* About */
.rsc-about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .rsc-about { grid-template-columns: 1fr; } }
.rsc-about__portrait { aspect-ratio: 4/5; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; display:flex; align-items:center; justify-content:center; color: var(--ink-soft); font-size:.9rem; }
.rsc-creds { list-style: none; padding: 0; margin: 18px 0 0; }
.rsc-creds li { padding: 8px 0 8px 26px; position: relative; color: var(--ink-soft); }
.rsc-creds li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* Integrity note */
.rsc-note { border-left: 3px solid var(--accent); padding: 8px 0 8px 28px; max-width: 760px; }
.rsc-note p { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); font-style: italic; margin: 0; }

/* Testimonials */
.rsc-quotes { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 820px) { .rsc-quotes { grid-template-columns: 1fr; } }
.rsc-quote { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.rsc-quote p { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.rsc-quote cite { font-style: normal; font-size: 0.88rem; color: var(--accent); font-weight: 600; }

/* FAQ */
.rsc-faq { max-width: 760px; }
.rsc-faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.rsc-faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.rsc-faq summary::-webkit-details-marker { display: none; }
.rsc-faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.rsc-faq details[open] summary::after { content: "–"; }
.rsc-faq details p { margin: 14px 0 0; font-size: 0.96rem; }

/* Contact */
.rsc-contact { background: var(--ink); color: var(--paper); border-radius: 6px; padding: 56px; text-align: center; }
.rsc-contact h2, .rsc-contact .rsc-eyebrow { color: var(--paper); }
.rsc-contact h2 { color: var(--white); }
.rsc-contact p { color: rgba(250,246,239,0.78); max-width: 52ch; margin: 0 auto 28px; }
.rsc-contact .rsc-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.rsc-contact .rsc-btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.rsc-formslot { max-width: 560px; margin: 32px auto 0; }

/* Footer */
.rsc-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 40px 0; text-align: center; }
.rsc-footer p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ============================================================
   v1.1 additions — mobile menu, blog, single/page, polish
   ============================================================ */

/* Smooth anchor scrolling with offset for the sticky nav */
html { scroll-behavior: smooth; }
.rsc-page section[id], .rsc-page header[id] { scroll-margin-top: 84px; }

/* Skip link (accessibility) */
.rsc-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 0 0 4px 0;
  text-decoration: none; font-weight: 600;
}
.rsc-skip:focus { left: 0; }

/* Hamburger toggle */
.rsc-nav__toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0;
  background: none; border: none; cursor: pointer;
}
.rsc-nav__toggle span {
  display: block; width: 24px; height: 2px; background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.rsc-nav.is-open .rsc-nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rsc-nav.is-open .rsc-nav__toggle span:nth-child(2) { opacity: 0; }
.rsc-nav.is-open .rsc-nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .rsc-nav__toggle { display: flex; }
  .rsc-nav__links {
    position: absolute; left: 0; right: 0; top: 70px;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    box-shadow: 0 18px 30px -20px rgba(22,32,46,.5);
    display: none;
  }
  .rsc-nav.is-open .rsc-nav__links { display: flex; }
  .rsc-nav__links a { width: 100%; padding: 13px 0; font-size: 1rem; border-bottom: 1px solid var(--paper-2); }
  .rsc-nav__links a:last-child { border-bottom: none; }
  .rsc-nav__cta { margin-top: 12px; text-align: center; }
  .rsc-nav__links a.rsc-nav__cta { border-bottom: none; }
}

/* About portrait image fills the frame */
.rsc-about__portrait { overflow: hidden; }
.rsc-about__portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Blog cards (homepage section + archive) ---- */
.rsc-postgrid { align-items: stretch; }
.rsc-postcard {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.rsc-postcard:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(22,32,46,.5); border-color: var(--accent); }
.rsc-postcard__link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.rsc-postcard__thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.rsc-postcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rsc-postcard__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.rsc-postcard__date { font-size: 0.78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.rsc-postcard h3 { font-size: 1.15rem; margin: 8px 0 10px; }
.rsc-postcard p { font-size: 0.95rem; flex: 1; }
.rsc-readmore { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.rsc-postcard:hover .rsc-readmore { color: var(--accent); }

/* ---- Pagination ---- */
.rsc-pagination { margin-top: 48px; }
.rsc-pagination .page-numbers {
  display: inline-block; padding: 8px 14px; margin: 0 3px;
  border: 1px solid var(--line); border-radius: 3px;
  text-decoration: none; color: var(--ink-soft); font-weight: 500;
}
.rsc-pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rsc-pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Single post / page ---- */
.rsc-article { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.rsc-single h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 8px 0 24px; }
.rsc-backlink { display: inline-block; margin-bottom: 24px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.rsc-backlink:hover { text-decoration: underline; }
.rsc-single__thumb { margin: 0 0 32px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.rsc-single__thumb img { width: 100%; height: auto; display: block; }

/* Readable prose for post/page content */
.rsc-prose { font-size: 1.08rem; line-height: 1.75; color: var(--ink-soft); }
.rsc-prose p { margin: 0 0 1.3em; }
.rsc-prose h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.rsc-prose h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; }
.rsc-prose a { color: var(--accent); }
.rsc-prose ul, .rsc-prose ol { margin: 0 0 1.3em 1.3em; }
.rsc-prose li { margin: .4em 0; }
.rsc-prose blockquote {
  border-left: 3px solid var(--accent); margin: 1.5em 0; padding: .2em 0 .2em 24px;
  font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink);
}
.rsc-prose img { border-radius: 4px; margin: 1em 0; }
.rsc-prose code { background: var(--paper-2); padding: 2px 6px; border-radius: 3px; font-size: .9em; }
.rsc-prose pre { background: var(--ink); color: var(--paper); padding: 20px; border-radius: 6px; overflow-x: auto; }
.rsc-prose pre code { background: none; color: inherit; }

/* Post navigation */
.post-navigation { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; }
.post-navigation a { color: var(--ink); text-decoration: none; font-weight: 600; }
.post-navigation a:hover { color: var(--accent); }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---- Custom logo image in the nav ---- */
.rsc-logo--img { display: inline-flex; align-items: center; }
.rsc-nav .custom-logo-link { display: inline-flex; align-items: center; line-height: 0; }
.rsc-nav .custom-logo { height: 44px; width: auto; display: block; }
@media (max-width: 820px) { .rsc-nav .custom-logo { height: 38px; } }
