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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--rv-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--rv-text);
  background: var(--rv-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

::selection {
  background: var(--rv-accent-soft);
  color: var(--rv-primary);
}

/* Site wrapper */
.rv-site { min-height: 100vh; overflow-x: hidden; }
.rv-site--home { background: var(--rv-white); }
.rv-site--inner { background: var(--rv-surface); }

.rv-page-offset {
  padding-top: var(--rv-header-stack-h, calc(var(--rv-topbar-h) + var(--rv-header-h)));
}

.rv-container {
  width: 100%;
  max-width: var(--rv-container);
  margin: 0 auto;
  padding: 0 var(--rv-space-lg);
}

@media (min-width: 768px) {
  .rv-container { padding: 0 var(--rv-space-xl); }
}

/* Typography */
.rv-heading {
  font-family: var(--rv-font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--rv-primary);
  letter-spacing: -0.02em;
}

.rv-h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.rv-h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
.rv-h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.rv-text-lg { font-size: 1.125rem; line-height: 1.75; }
.rv-text-muted { color: var(--rv-text-muted); }
.rv-text-gradient {
  background: var(--rv-gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sections */
.rv-section {
  padding: var(--rv-space-3xl) 0;
  position: relative;
  /* Prevent initial reveal/AOS translate transforms from expanding
     document scroll height (fixes double-scrollbar on reload). */
  overflow: hidden; /* fallback */
  overflow: clip;
}

.rv-section--alt {
  background: var(--rv-surface);
}

.rv-section--mesh {
  background: var(--rv-gradient-mesh), var(--rv-surface);
}

.rv-section--dark {
  background: var(--rv-gradient-hero);
  color: var(--rv-white);
}

.rv-section-head { margin-bottom: var(--rv-space-2xl); }

.rv-section-head--center {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.rv-section-title {
  font-family: var(--rv-font-heading);
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 600;
  color: var(--rv-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--rv-space-md);
}

.rv-section--dark .rv-section-title { color: var(--rv-white); }

.rv-section-text {
  font-size: 1.0625rem;
  color: var(--rv-text-muted);
  line-height: 1.75;
}

.rv-section--dark .rv-section-text { color: rgba(255,255,255,0.78); }

/* Divider */
.rv-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rv-border), transparent);
  margin: var(--rv-space-2xl) 0;
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--rv-transition-slow), transform var(--rv-transition-slow);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utilities */
.rv-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.rv-text-center { text-align: center; }
.rv-mx-auto { margin-left: auto; margin-right: auto; }
