/* ============================================================
   RAVYAWORKS WEBSITE FRAMEWORK — base.css
   Reset, theming hooks (CSS variables), typography, utilities.
   Every demo theme is applied by app.js overriding these
   :root variables from config.theme.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px; /* offset for sticky header when jumping to #anchors */
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- Theming hooks (defaults — overridden per site by app.js) ----------
   app.js reads config.theme and runs:
   document.documentElement.style.setProperty('--color-primary', '#...')
   So editing config.theme is ALL you do to re-skin a site.            */
:root {
  /* Brand colors */
  --color-primary: #c0392b;
  --color-primary-dark: #962d22;
  --color-primary-light: #e74c3c;
  --color-secondary: #2c3e50;
  --color-accent: #f39c12;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-surface-alt: #fff5f2;

  /* Text */
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-text-on-primary: #ffffff;

  /* Typography */
  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Header */
  --header-height: 80px;
}

/* ---------- Base typography ---------- */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-secondary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

p { color: var(--color-text-muted); }

::selection {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(60px, 8vw, 100px);
}

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

.section__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section__title {
  margin-bottom: 14px;
}

.section__title .accent {
  color: var(--color-primary);
}

.section__subtitle {
  font-size: 1.05rem;
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Reveal-on-scroll animation targets (toggled by IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
