/* ══════════════════════════════════════════
   RCHsites.com — Global Stylesheet
   Aesthetic: Warm editorial / refined craft
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,800;0,9..144,900;1,9..144,400;1,9..144,700&family=Outfit:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f0ea;
  --bg-white: #faf8f5;
  --bg-card: #ffffff;
  --bg-dark: #1c1917;
  --bg-dark-card: #292524;
  --text: #1c1917;
  --text-mid: #44403c;
  --text-muted: #78716c;
  --text-faint: #a8a29e;
  --accent: #c45d3e;
  --accent-light: #f4d3c8;
  --accent-dark: #a14830;
  --accent-bg: rgba(196,93,62,0.06);
  --navy: #1e3a5f;
  --navy-light: #2c5282;
  --border: #e7e0d8;
  --border-light: #f0ebe5;
  --shadow-sm: 0 1px 3px rgba(28,25,23,0.04);
  --shadow-md: 0 4px 20px rgba(28,25,23,0.06);
  --shadow-lg: 0 12px 40px rgba(28,25,23,0.08);
  --shadow-xl: 0 20px 60px rgba(28,25,23,0.1);
  --radius: 12px;
  --radius-lg: 18px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ══════ NOISE TEXTURE OVERLAY ══════ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ══════ NAVIGATION ══════ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 3rem;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(245,240,234,0.85);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border-light);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 0.3rem; align-items: center; }

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(28,25,23,0.04);
}

.nav-links a.active {
  color: var(--text);
  background: rgba(28,25,23,0.05);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.55rem 1.4rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(196,93,62,0.25);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 0.5rem;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}

/* ══════ SHARED LAYOUT ══════ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
section { padding: 7rem 0; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.5rem;
}

.section-eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.section-heading em {
  font-style: italic;
  color: var(--accent);
  font-weight: 700;
}

.section-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-top: 1rem;
}

/* ══════ BUTTONS ══════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border: none; cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.35s ease, background 0.3s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196,93,62,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-dark {
  background: var(--bg-dark);
  color: #fff;
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(28,25,23,0.25);
}

.btn .arrow {
  transition: transform 0.3s ease;
}

.btn:hover .arrow { transform: translateX(3px); }

/* ══════ CARDS ══════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

/* ══════ SCROLL ANIMATIONS ══════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* ══════ TEXT SPLIT ANIMATION ══════ */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-40deg);
  animation: charReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes charReveal {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.split-text .word {
  display: inline-block;
  overflow: hidden;
  margin-right: 0.3em;
  vertical-align: top;
}

/* ══════ FLOATING SHAPES ══════ */
.bg-shapes {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}

.bg-shape:nth-child(1) {
  width: 400px; height: 400px;
  background: var(--accent-light);
  top: -100px; right: -100px;
  animation-delay: 0s;
}

.bg-shape:nth-child(2) {
  width: 300px; height: 300px;
  background: rgba(30,58,95,0.08);
  bottom: -50px; left: -80px;
  animation-delay: -7s;
}

.bg-shape:nth-child(3) {
  width: 200px; height: 200px;
  background: var(--accent-light);
  top: 40%; left: 60%;
  animation-delay: -14s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -40px) rotate(5deg); }
  50% { transform: translate(-20px, 20px) rotate(-3deg); }
  75% { transform: translate(15px, 30px) rotate(4deg); }
}

/* ══════ TILT CARD EFFECT ══════ */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card .tilt-inner {
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}

.tilt-card .tilt-shine {
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
    rgba(255,255,255,0.12) 0%, transparent 60%);
}

.tilt-card:hover .tilt-shine { opacity: 1; }

/* ══════ MAGNETIC BUTTON ══════ */
.magnetic {
  transition: transform 0.2s ease;
}

/* ══════ PAGE TRANSITION ══════ */
.page-content {
  animation: pageIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════ COUNTER ANIMATION ══════ */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ══════ MARQUEE ══════ */
.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ══════ DIVIDER ══════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 auto;
}

/* ══════ FOOTER ══════ */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.8rem;
}

.footer-brand span { color: var(--accent); }

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  padding: 0.3rem 0;
  transition: color 0.2s, transform 0.2s;
}

.footer-col a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* ══════ RESPONSIVE ══════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  nav { padding: 0 1.2rem; }
  .nav-links { 
    display: none; 
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: rgba(245,240,234,0.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 1rem; }
  .nav-cta { margin-left: 0 !important; margin-top: 0.5rem; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }
  section { padding: 4.5rem 0; }
  .container { padding: 0 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
