/* ==========================================================================
   Raisers India — Base
   Reset, element defaults, typography primitives, layout helpers and the
   scroll-reveal utilities used across every page.
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header. */
  scroll-padding-top: calc(var(--ri-header-h) + 24px);
}

body {
  font-family: var(--ri-font-body);
  font-size: var(--ri-fs-body);
  line-height: var(--ri-lh-body);
  color: var(--ri-text);
  background: var(--ri-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.ri-no-scroll { overflow: hidden; }

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

img { height: auto; border: 0; }

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

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

ul, ol { list-style: none; padding: 0; }

a {
  color: var(--ri-primary);
  text-decoration: none;
  transition: color var(--ri-dur-fast) var(--ri-ease);
}

a:hover { color: var(--ri-accent); }

/* Visible, on-brand focus ring for keyboard users only. */
:focus-visible {
  outline: 2px solid var(--ri-blue-600);
  outline-offset: 3px;
  border-radius: var(--ri-r-xs);
}

::selection {
  background: var(--ri-blue-700);
  color: #fff;
}

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ri-font-display);
  font-weight: 600;
  line-height: var(--ri-lh-snug);
  letter-spacing: var(--ri-ls-tight);
  color: var(--ri-ink);
  /* Fraunces variable axes: softer, slightly wonky optical setting. */
  font-variation-settings: "SOFT" 20, "WONK" 0, "opsz" 40;
  text-wrap: balance;
}

h1 { font-size: var(--ri-fs-h1); line-height: var(--ri-lh-tight); }
h2 { font-size: var(--ri-fs-h2); }
h3 { font-size: var(--ri-fs-h3); }
h4 { font-size: var(--ri-fs-h4); letter-spacing: -0.015em; }

p { text-wrap: pretty; }

strong, b { font-weight: 700; }

/* Italic display accent — the signature editorial move of this identity. */
.ri-em {
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
}

.ri-em--accent { color: var(--ri-accent); }
.ri-em--brand { color: var(--ri-blue-600); }

/* Gradient-filled word for hero headlines. */
.ri-grad-text {
  background: linear-gradient(100deg, var(--ri-blue-300), #fff 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ri-lead {
  font-size: var(--ri-fs-lead);
  line-height: 1.68;
  color: var(--ri-text-soft);
}

.ri-muted { color: var(--ri-text-soft); }

/* ---- Layout helpers ---------------------------------------------------- */
.ri-container {
  width: 100%;
  max-width: var(--ri-container);
  margin-inline: auto;
  padding-inline: var(--ri-gutter);
}

.ri-container--wide { max-width: var(--ri-container-wide); }
.ri-container--narrow { max-width: var(--ri-container-narrow); }

.ri-section { padding-block: var(--ri-section-y); }
.ri-section--sm { padding-block: var(--ri-section-y-sm); }
.ri-section--flush-top { padding-top: 0; }
.ri-section--flush-bottom { padding-bottom: 0; }

.ri-bg-alt { background: var(--ri-bg-alt); }
.ri-bg-sand { background: var(--ri-sand); }

.ri-bg-dark {
  background: var(--ri-grad-ink);
  color: var(--ri-text-invert);
}

.ri-bg-dark h1,
.ri-bg-dark h2,
.ri-bg-dark h3,
.ri-bg-dark h4 { color: #fff; }

.ri-bg-dark .ri-lead,
.ri-bg-dark .ri-muted { color: var(--ri-text-invert-soft); }

/* Generic responsive grid — pages set the column count per breakpoint. */
.ri-grid {
  display: grid;
  gap: var(--ri-space-5);
}

.ri-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ri-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ri-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 991px) {
  .ri-grid--3,
  .ri-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
  .ri-grid--2,
  .ri-grid--3,
  .ri-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.ri-stack { display: flex; flex-direction: column; }
.ri-row { display: flex; align-items: center; }
.ri-wrap { flex-wrap: wrap; }
.ri-gap-2 { gap: var(--ri-space-2); }
.ri-gap-3 { gap: var(--ri-space-3); }
.ri-gap-4 { gap: var(--ri-space-4); }
.ri-gap-5 { gap: var(--ri-space-5); }
.ri-gap-6 { gap: var(--ri-space-6); }

.ri-text-center { text-align: center; }
.ri-mx-auto { margin-inline: auto; }
.ri-relative { position: relative; }

.ri-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ri-skip-link {
  position: absolute;
  left: var(--ri-space-4);
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--ri-ink);
  color: #fff;
  border-radius: var(--ri-r-sm);
  transition: top var(--ri-dur) var(--ri-ease);
}

.ri-skip-link:focus { top: var(--ri-space-4); color: #fff; }

/* ---- Section heading block --------------------------------------------- */
.ri-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--ri-font-body);
  font-size: var(--ri-fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ri-ls-eyebrow);
  text-transform: uppercase;
  color: var(--ri-accent);
}

/* The short rule that precedes every eyebrow, echoing the logo's arc sweep. */
.ri-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--ri-grad-accent);
}

.ri-eyebrow--light { color: var(--ri-blue-300); }
.ri-eyebrow--light::before { background: var(--ri-blue-300); }

.ri-eyebrow--num::before { display: none; }

.ri-eyebrow__num {
  font-family: var(--ri-font-display);
  font-size: 0.875rem;
  font-style: italic;
  letter-spacing: 0;
  opacity: 0.65;
}

.ri-heading {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-4);
  max-width: 44ch;
}

.ri-heading--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
  max-width: 52ch;
}

.ri-heading__title { margin: 0; }
.ri-heading__body { margin: 0; }

/* Header row that pairs a heading with a trailing link/button. */
.ri-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ri-space-6);
  flex-wrap: wrap;
}

/* ---- Decorative arc motif ----------------------------------------------
   Drawn from the swooping arcs in the logo. Purely ornamental, so it is
   hidden from assistive tech wherever it is used. */
.ri-arc {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.16;
  pointer-events: none;
}

.ri-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

/* Fine dotted field used behind stacked imagery. */
.ri-dots {
  position: absolute;
  pointer-events: none;
  background-image: radial-gradient(currentColor 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.18;
}

/* ---- Scroll reveal -----------------------------------------------------
   JS adds .is-in when the element enters the viewport. Without JS the
   :not(.ri-reveal-ready) rule keeps everything visible. */
.ri-reveal-ready .ri-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--ri-dur-slow) var(--ri-ease-out),
    transform var(--ri-dur-slow) var(--ri-ease-out);
  transition-delay: var(--ri-reveal-delay, 0ms);
}

.ri-reveal-ready .ri-reveal--left { transform: translateX(-32px); }
.ri-reveal-ready .ri-reveal--right { transform: translateX(32px); }
.ri-reveal-ready .ri-reveal--zoom { transform: scale(0.94); }

.ri-reveal-ready .ri-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Word-by-word headline entrance, used on the hero only. */
.ri-reveal-ready .ri-split-line { display: block; overflow: hidden; }

.ri-reveal-ready .ri-split-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 900ms var(--ri-ease-out);
  transition-delay: var(--ri-reveal-delay, 0ms);
}

.ri-reveal-ready .is-in .ri-split-line > span,
.ri-reveal-ready .ri-split-line.is-in > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .ri-reveal-ready .ri-reveal,
  .ri-reveal-ready .ri-split-line > span {
    opacity: 1 !important;
    transform: none !important;
  }
}
