/* ============================================================
   RightNow Pastors+ — Global Styles
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overscroll-behavior: none; }

body {
  margin: 0; padding: 0;
  font-family: 'aktiv-grotesk', 'Aktiv Grotesk', -apple-system, BlinkMacSystemFont,
               'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #fff;
  color: #151515;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote {
  margin: 0; padding: 0; font-weight: inherit;
}

ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── Brand Tokens ───────────────────────────────────────────── */
:root {
  /* gradient stops */
  --grad-1: #8e7bff;
  --grad-2: #6f60ff;
  --grad-3: #5a4ed1;
  --grad-4: #45b3f8;
  --accent: #6764FF;
  --blurple: #3b3580;

  /* brand gradient shorthand */
  --brand-gradient: linear-gradient(120deg, #8e7bff 0%, #6f60ff 30%, #5a4ed1 65%, #45b3f8 100%);

  /* ink scale */
  --ink-100: #f7f6f3;
  --ink-200: #eceff1;
  --ink-300: #b4afa6;
  --ink-400: #a7a094;
  --ink-500: #9c958a;
  --ink-600: #3d464d;
  --ink-700: #2b2929;
  --ink-800: #191e21;
  --ink-900: #151515;
  --ink-1000: #000;

  /* spacing rhythm */
  --space-section: 140px;
  --space-section-sm: 120px;
  --space-page-h: 56px;
}

/* ── Typography utilities ───────────────────────────────────── */
.serif {
  font-family: 'big-caslon-fb', 'Big Caslon', 'Big Caslon FB', Georgia, 'Times New Roman', serif;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* Eyebrow / label caps */
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ── Gradient utilities ─────────────────────────────────────── */
.bg-brand-grad {
  background: linear-gradient(110deg, var(--grad-1) 0%, var(--grad-2) 28%, var(--grad-3) 58%, var(--grad-4) 100%);
}
.text-brand-grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Grain overlay ──────────────────────────────────────────── */
.grain { position: relative; }
.grain::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.18;
  mix-blend-mode: overlay;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  padding-right: 30px;
  padding-left: 30px;
  justify-content: center;
  align-items: center;
  gap: 17px;
  color: #fff;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-shape {
  position: absolute;
  inset: 0% 0% 0% auto;
  width: 100%;
  height: 100%;
  min-width: 50px;
  border-radius: 50px;
  background-color: rgb(103, 100, 255);
}

.btn-backing {
  position: absolute;
  inset: 0%;
  width: 100%;
  height: 100%;
  background-color: rgba(56, 152, 236, 0);
}

.btn-txt {
  position: relative;
  font-family: 'aktiv-grotesk', 'Aktiv Grotesk', sans-serif;
  line-height: 1.3;
}

.btn-arrow {
  position: relative;
  width: 14px;
  margin-top: 3px;
}

@media screen and (max-width: 767px) {
  .btn-arrow { width: 10px; margin-top: 0; margin-right: 1px; }
}

/* Transitions */
.btn, .btn-arrow, .btn-backing, .btn-shape {
  transition: transform 175ms cubic-bezier(.215, .61, .355, 1);
  transform: translate(0px, 0px);
}
.btn-shape { transition-property: width; }
.btn-txt { transition: color 175ms cubic-bezier(.215, .61, .355, 1); }

/* Default hover: slide left + shape shrinks */
.btn:hover { transform: translate(-30px, 0px); }
.btn:hover .btn-shape { width: 0%; }
.btn:hover .btn-arrow { transform: translate(12px, 0px); }
.btn:hover .btn-backing { transform: translate(30px, 0px); }
.btn:hover .btn-txt.to-black { color: black; }
.btn:hover .btn-txt.to-white { color: white; }

/* Nav button variant */
.btn.nav-btn {
  min-height: 40px;
  padding-right: 20px;
  padding-left: 20px;
  gap: 10px;
}
.btn.nav-btn .btn-shape { min-width: 40px; }
.btn.nav-btn:hover,
.btn.nav-btn:hover .btn-backing { transform: translate(0px, 0px); }
.btn.nav-btn:hover .btn-arrow { transform: translate(7px, 0px); }

.nav-btn-txt {
  font-size: 14px;
  font-weight: 500;
}

/* When nav background is white, turn text black on hover so it stays readable */
.site-nav.scrolled .btn.nav-btn:hover .btn-txt {
  color: #000;
}

@media screen and (max-width: 479px) {
  .btn.nav-btn { padding-right: 12px; padding-left: 12px; }
}

/* Right-aligned variant */
.btn.right-aligned:hover,
.btn.right-aligned:hover .btn-backing { transform: translate(0px, 0px); }

/* Outline variant (ghost on dark backgrounds) */
.btn-shape.outline {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn:has(.btn-shape.outline) {
  transition: opacity 175ms cubic-bezier(.215, .61, .355, 1);
}
.btn:has(.btn-shape.outline):hover { transform: translate(0px, 0px); opacity: .75; }
.btn:has(.btn-shape.outline):hover .btn-shape { width: 100%; }
.btn:has(.btn-shape.outline):hover .btn-backing { transform: translate(0px, 0px); }

/* Black outline variant (ghost on light backgrounds) */
.btn.black-outline { color: black; }
.btn.black-outline .btn-shape { border: 1px solid #6764ff; background-color: transparent; }
.btn.black-outline .btn-arrow { filter: invert(100%); }

/* Dark variant */
.btn.dark .btn-shape { background-color: #000; }

/* White variant (on dark/gradient backgrounds) */
.btn.white .btn-shape { background-color: #fff; }
.btn.white .btn-txt { color: #151515; }

@media screen and (max-width: 479px) {
  .btn.nav-btn:hover .btn-shape { width: 100%; }
}

/* ── Container system ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1440px;
  padding-inline: var(--space-page-h);
  margin-inline: auto;
}
.container--1280 { max-width: 1280px; }
.container--1200 { max-width: 1200px; }
.container--1100 { max-width: 1100px; }
.container--1000 { max-width: 1000px; }

/* ── Site Nav ───────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--space-page-h);
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.0);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(20,20,20,0.08);
}
.site-nav.site-nav--hidden {
  transform: translateY(-110%);
}

.site-nav__logo img {
  height: 29px; width: auto; display: block;
}
/* Invert logo to dark when nav is scrolled */
.site-nav.scrolled .site-nav__logo img {
  filter: invert(1) brightness(0.05);
}

.site-nav__links {
  display: flex; align-items: center; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.site-nav__links a {
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.site-nav__links a:hover { color: #fff; }
.site-nav.scrolled .site-nav__links a {
  color: var(--ink-700);
}
.site-nav.scrolled .site-nav__links a:hover { color: var(--ink-900); }

.nav-cta {
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.nav-cta:hover {
  background: rgba(255,255,255,0.22);
}
.site-nav.scrolled .nav-cta {
  background: #6F60FF;
  color: #fff;
  border-color: #6F60FF;
  box-shadow: 0 4px 16px rgba(111,96,255,0.3);
}
.site-nav.scrolled .nav-cta:hover {
  background: #5a4ed1;
}

.site-nav__right {
  display: flex; align-items: center; gap: 20px;
}

/* Hamburger */
.site-nav__hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 6px; cursor: pointer;
}
.site-nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.2s, transform 0.25s, opacity 0.2s;
}
.site-nav.scrolled .site-nav__hamburger span { background: var(--ink-900); }
.site-nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__hamburger.open span:nth-child(2) { opacity: 0; }
.site-nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed; top: 72px; left: 0; right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20,20,20,0.08);
  padding: 24px var(--space-page-h);
  z-index: 99;
  flex-direction: column; gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav__links { list-style: none; padding: 0; margin: 0; }
.mobile-nav__links li a {
  display: block;
  padding: 14px 0;
  font-size: 17px; font-weight: 500;
  color: var(--ink-800);
  border-bottom: 1px solid rgba(20,20,20,0.07);
}
.mobile-nav__cta {
  margin-top: 20px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: #000;
  color: rgba(255,255,255,0.6);
  padding: 40px var(--space-page-h) 32px;
}
.site-footer__top {
  display: flex;
  justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px;
}
.site-footer__logo img {
  height: 22px; width: auto; display: block;
}
.site-footer__social {
  display: flex; gap: 10px; align-items: center;
}
.site-footer__social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: grid; place-items: center;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.site-footer__social a:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}
.site-footer__divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 24px 0 20px;
}
.site-footer__bottom {
  display: flex; align-items: center; gap: 32px;
  font-size: 12px; color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}
.site-footer__bottom a:hover { color: rgba(255,255,255,0.8); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --space-page-h: 40px; }
}

@media (max-width: 991px) {
  .site-nav__logo img { height: 22px; }
}

@media (max-width: 768px) {
  :root {
    --space-page-h: 24px;
    --space-section: 80px;
    --space-section-sm: 64px;
  }
  .site-nav__links { display: none; }
}

@media (max-width: 480px) {
  :root { --space-page-h: 20px; }
}
