/* ==========================================================================
   RVKS — rvx-footer
   Self-contained, namespaced site footer. Requires NO Bootstrap grid/JS, no
   jQuery, no yit-* asset, no FontAwesome (icons are inline SVG). Zero JS.

   Scope discipline: every rule below is scoped to .rvx-footer. Nothing leaks
   outside it — no bare element selectors, no utility classes, no overrides of
   anything the rest of the page owns.

   Palette + type match css/rvx-header.css so header and footer read as one
   system. Tokens are re-declared locally (not inherited) so this file can be
   dropped onto a page that does not load the header component.
   ========================================================================== */

.rvx-footer {
  /* --- brand tokens (shared with rvx-header) --- */
  --rvxf-navy: #0a0f18;
  --rvxf-navy-2: #121a28;
  --rvxf-navy-3: #162238;
  --rvxf-gold: #c4a035;
  --rvxf-gold-bright: #dfc465;
  --rvxf-white: #ffffff;

  /* --- ink scale on navy (all AA+ on the darkest stop) --- */
  --rvxf-ink-strong: rgba(255, 255, 255, 0.94);
  --rvxf-ink: rgba(255, 255, 255, 0.76);
  --rvxf-ink-soft: rgba(255, 255, 255, 0.62);
  --rvxf-ink-label: rgba(255, 255, 255, 0.56);

  /* --- hairlines --- */
  --rvxf-rule: rgba(255, 255, 255, 0.10);
  --rvxf-rule-soft: rgba(255, 255, 255, 0.07);
  --rvxf-rule-gold: rgba(196, 160, 53, 0.32);

  --rvxf-font-display: "Montserrat", "Plus Jakarta Sans", system-ui,
    -apple-system, "Segoe UI", Arial, sans-serif;
  --rvxf-font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial,
    sans-serif;

  --rvxf-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --rvxf-dur: 220ms;

  --rvxf-max: 1140px;
  --rvxf-gutter: 15px;

  /* --- shell --- */
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--rvxf-rule-gold);
  background: linear-gradient(168deg, var(--rvxf-navy) 0%, #0d1522 42%, var(--rvxf-navy-3) 100%);
  font-family: var(--rvxf-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--rvxf-ink);
  text-align: left;
  overflow: hidden;
}

/* A single, very restrained warm bloom behind the brand column. Kept under 6%
   alpha and pushed off-canvas — it reads as depth, never as a stain. */
.rvx-footer::before {
  content: "";
  position: absolute;
  top: -280px;
  left: -240px;
  width: 760px;
  height: 760px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(196, 160, 53, 0.055) 0%, rgba(196, 160, 53, 0) 66%);
}

/* ==========================================================================
   0. Defend against bootstrap.css + yit-*.css leaking in
   Every reset is wrapped in :where() so it carries the specificity of the bare
   element selector only — strong enough to beat the theme's element rules
   (this file loads last), weaker than the .rvx-footer__* rules below.
   ========================================================================== */

:where(.rvx-footer),
:where(.rvx-footer) *,
:where(.rvx-footer) *::before,
:where(.rvx-footer) *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:where(.rvx-footer) ul,
:where(.rvx-footer) ol,
:where(.rvx-footer) li {
  margin: 0;
  padding: 0;
  list-style: none;
  list-style-type: none;
  text-indent: 0;
  background: none;
  border: 0;
  float: none;
  line-height: inherit;
}

/* yit-style.css ships `ul li { display: inline-block }` (plus a 767px
   override). Match its specificity — this file loads last, tie goes to us. */
:where(.rvx-footer) ul li,
:where(.rvx-footer) ol li {
  display: block;
  line-height: inherit;
}

:where(.rvx-footer) ul::before,
:where(.rvx-footer) li::before {
  content: none;
}

/* yit-responsive.css centres every `p` and `h1..h6` below 767px and pads them.
   Bare element specificity, so re-declaring here (this file loads last) wins —
   but only for properties actually named, hence the explicit text-align. */
:where(.rvx-footer) p,
:where(.rvx-footer) h2,
:where(.rvx-footer) h3,
:where(.rvx-footer) address,
:where(.rvx-footer) ul,
:where(.rvx-footer) li {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

:where(.rvx-footer) a {
  text-decoration: none;
  background-color: transparent;
  color: inherit;
  outline-offset: 2px;
}

:where(.rvx-footer) a:hover,
:where(.rvx-footer) a:focus {
  text-decoration: none;
}

/* yit-responsive.css also does `img { float:none; margin:0 auto; display:block }`
   below 767px, which would centre the wordmark. Pin it back. */
:where(.rvx-footer) img {
  max-width: 100%;
  height: auto;
  margin: 0;
  float: none;
  border: 0;
  vertical-align: middle;
}

:where(.rvx-footer) svg {
  display: block;
  flex: none;
  overflow: visible;
}

:where(.rvx-footer) address {
  margin: 0;
  font-style: normal;
  line-height: inherit;
}

/* yit-style.css declares `a { outline: none !important }`, which would erase
   every keyboard focus ring in here. !important is the only way back. */
.rvx-footer :focus-visible {
  outline: 2px solid var(--rvxf-gold-bright) !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}

.rvx-footer__shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--rvxf-max);
  margin: 0 auto;
  padding: 0 var(--rvxf-gutter);
}

/* ==========================================================================
   1. Main grid
   ========================================================================== */

.rvx-footer__main {
  padding: 76px 0 60px;
}

.rvx-footer__grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.42fr)
    minmax(0, 0.72fr)
    minmax(0, 1.02fr)
    minmax(0, 1.3fr);
  gap: 48px 40px;
  align-items: start;
}

.rvx-footer__col {
  min-width: 0;
}

/* ==========================================================================
   2. Brand column
   ========================================================================== */

.rvx-footer__brand {
  display: inline-block;
  margin: 0 0 20px;
}

.rvx-footer__brand img {
  display: block;
  width: auto;
  height: 52px;
  opacity: 0.97;
  transition: opacity var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__brand:hover img,
.rvx-footer__brand:focus img {
  opacity: 1;
}

/* Page-level stylesheets (css/rvk-home-premium.css, and the per-page rvx-*.css
   files) load AFTER this component and style body copy with selectors such as
   `body.rvk-home-premium p { color: …; line-height: … }`. Two classes plus an
   element outranks a single component class no matter what order the files sit
   in, so the four <p> elements in here carry !important on exactly the two
   properties those page rules set. Nothing inside the component ever needs to
   override them, so this stays contained. */

.rvx-footer__kicker {
  margin: 0 0 18px;
  font-family: var(--rvxf-font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.5 !important;
  text-transform: uppercase;
  color: var(--rvxf-gold-bright) !important;
}

.rvx-footer__blurb {
  max-width: 32ch;
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.75 !important;
  color: var(--rvxf-ink) !important;
}

/* --- social --- */

.rvx-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rvx-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--rvxf-ink);
  background: rgba(255, 255, 255, 0.02);
  transition: color var(--rvxf-dur) var(--rvxf-ease),
    border-color var(--rvxf-dur) var(--rvxf-ease),
    background-color var(--rvxf-dur) var(--rvxf-ease),
    transform var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.rvx-footer__social-link:hover,
.rvx-footer__social-link:focus-visible {
  color: var(--rvxf-gold-bright);
  border-color: rgba(196, 160, 53, 0.62);
  background: rgba(196, 160, 53, 0.10);
  transform: translateY(-2px);
}

/* ==========================================================================
   3. Column headings
   Full-width hairline with a short gold segment riding on top of it.
   ========================================================================== */

.rvx-footer__heading {
  position: relative;
  display: block;
  margin: 0 0 22px;
  padding: 0 0 14px;
  /* !important: per-page `body.rvk-*-premium h2` (0-1-1) and `.heading-dosis h2`
     (yit-theme.css) outrank this single class and repaint/reface the headings —
     on rvk-services-sector-premium pages they went ink-on-navy (invisible). */
  font-family: var(--rvxf-font-display) !important;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--rvxf-ink-strong) !important;
}

.rvx-footer__heading::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--rvxf-rule);
}

.rvx-footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 2px;
  background: var(--rvxf-gold);
}

/* The wordmark PNG carries ~7px of internal top padding; pull it up so the
   logo's cap line sits on the same optical baseline as the column headings. */
.rvx-footer__col--brand .rvx-footer__brand {
  margin-top: -7px;
}

/* ==========================================================================
   4. Link lists
   ========================================================================== */

.rvx-footer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rvx-footer__link {
  position: relative;
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--rvxf-ink);
  transition: color var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 0;
  height: 1px;
  background: var(--rvxf-gold);
  transition: width var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__link:hover,
.rvx-footer__link:focus-visible {
  color: var(--rvxf-white);
}

.rvx-footer__link:hover::after,
.rvx-footer__link:focus-visible::after {
  width: 100%;
}

/* ==========================================================================
   5. Contact column
   ========================================================================== */

.rvx-footer__address {
  margin: 4px 0 22px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--rvxf-ink);
}

.rvx-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 20px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--rvxf-rule-soft);
}

.rvx-footer__contact-label {
  display: block;
  margin: 0 0 3px;
  font-family: var(--rvxf-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--rvxf-ink-label);
}

.rvx-footer__contact-value {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--rvxf-ink-strong);
  transition: color var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__contact-value:hover,
.rvx-footer__contact-value:focus-visible {
  color: var(--rvxf-gold-bright);
}

/* --- refined text CTA --- */

.rvx-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--rvxf-font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rvxf-gold-bright);
  transition: color var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__cta svg {
  width: 15px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__cta:hover,
.rvx-footer__cta:focus-visible {
  color: var(--rvxf-white);
}

.rvx-footer__cta:hover svg,
.rvx-footer__cta:focus-visible svg {
  transform: translateX(5px);
}

/* ==========================================================================
   6. Legal bar
   ========================================================================== */

/* A darker plinth under the hairline gives the legal row its own weight
   without introducing a second colour. */
.rvx-footer__legal {
  border-top: 1px solid var(--rvxf-rule);
  background: rgba(4, 8, 14, 0.34);
}

.rvx-footer__legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 24px 0 26px;
}

.rvx-footer__copy,
.rvx-footer__credit {
  font-size: 13px;
  line-height: 1.6 !important;
  color: var(--rvxf-ink-soft) !important;
}

.rvx-footer__legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 22px;
}

.rvx-footer__legal-link {
  position: relative;
  font-size: 13px;
  line-height: 1.6;
  color: var(--rvxf-ink-soft);
  transition: color var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__legal-link + .rvx-footer__legal-link::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 1px;
  height: 11px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.20);
}

.rvx-footer__legal-link:hover,
.rvx-footer__legal-link:focus-visible {
  color: var(--rvxf-gold-bright);
}

.rvx-footer__credit-link {
  color: var(--rvxf-ink-strong);
  transition: color var(--rvxf-dur) var(--rvxf-ease);
}

.rvx-footer__credit-link:hover,
.rvx-footer__credit-link:focus-visible {
  color: var(--rvxf-gold-bright);
}

/* ==========================================================================
   7. Responsive — 4-col → 2-col → 1-col
   ========================================================================== */

@media (max-width: 1199.98px) {
  .rvx-footer__grid {
    gap: 44px 32px;
  }
}

/* Tablet: a balanced 2x2 — brand | Firm over Services | Chennai. Spanning the
   brand across the full row instead would strand the contact column beside
   dead space, so the columns simply reflow in pairs. */
@media (max-width: 991.98px) {
  .rvx-footer {
    --rvxf-gutter: 24px;
  }

  .rvx-footer__main {
    padding: 60px 0 52px;
  }

  .rvx-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 40px;
  }

  .rvx-footer__blurb {
    max-width: 38ch;
  }

  /* Three items on one row start wrapping raggedly below ~1000px; stack them
     deliberately instead of letting flex-wrap decide. */
  .rvx-footer__legal-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 0 24px;
  }
}

/* Mobile: single column, centred brand block, tighter rhythm. */
@media (max-width: 575.98px) {
  .rvx-footer {
    --rvxf-gutter: 20px;
  }

  .rvx-footer::before {
    display: none;
  }

  .rvx-footer__main {
    padding: 48px 0 40px;
  }

  .rvx-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .rvx-footer__col--brand {
    padding-bottom: 6px;
  }

  .rvx-footer__brand img {
    height: 46px;
  }

  .rvx-footer__blurb {
    max-width: none;
    margin-bottom: 24px;
  }

  .rvx-footer__heading {
    margin-bottom: 18px;
  }

  .rvx-footer__legal-inner {
    gap: 14px;
  }
}

/* ==========================================================================
   8. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .rvx-footer,
  .rvx-footer *,
  .rvx-footer *::before,
  .rvx-footer *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .rvx-footer__social-link:hover,
  .rvx-footer__cta:hover svg {
    transform: none;
  }
}

/* ==========================================================================
   9. Print
   ========================================================================== */

@media print {
  .rvx-footer {
    background: none;
    color: #101827;
    border-top: 1px solid #101827;
  }

  .rvx-footer::before {
    display: none;
  }

  .rvx-footer__social {
    display: none;
  }
}
