/* ============================================================
   RIVEL Global — Unified Navbar + Footer
   Prefixed with rg- to avoid conflicts with Webflow CSS.
   Load AFTER the page's own Webflow CSS.
   ============================================================ */

/* ─── VARIABLES ─── */
:root {
  --rg-white: #fff;
  --rg-white-50: #ffffff80;
  --rg-white-30: #ffffff4d;
  --rg-white-20: #ffffff33;
  --rg-white-10: #ffffff1a;
  --rg-white-05: #ffffff0d;
  --rg-black: #000;
  --rg-black-50: #00000080;
  --rg-black-30: #0000004d;
  --rg-grey-dark: #1a1a1a;
  --rg-grey-light: #b8b8b8;
  --rg-grey-bg: #cdcdcd;
  --rg-round: 100vw;
  --rg-font: Geist, 'Space Grotesk', Arial, sans-serif;
}

/* ─── SMOOTH RENDERING ─── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── GSAP SCROLL REVEAL ─── */
.gs-reveal {
  opacity: 0;
  transform: translateY(2rem);
}

/* ─── HIDE OLD NAV & FOOTER ─── */
/* Use visibility+height instead of display:none to keep IX2 runtime working */
body .navbar.w-nav,
body > .navbar {
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}
body .footer-component {
  display: none !important;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.rg-navbar-wraper {
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding-top: 1.25rem;
  display: flex;
  position: fixed;
  inset: 0 0 auto;
  font-family: var(--rg-font);
  pointer-events: none;
}
.rg-navbar-wraper * { pointer-events: auto; }

.rg-navbar-bg-blur {
  display: none;
}

.rg-navbar {
  color: var(--rg-white);
}

.rg-navbar-container {
  gap: 0.25rem;
  justify-content: flex-start;
  align-items: center;
  display: flex;
}

/* ─── BRAND + DROPDOWN ─── */
.rg-brand-wrap {
  position: relative;
}

.rg-navbar-brand-link {
  aspect-ratio: 1;
  border-radius: var(--rg-round);
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  flex: none;
  justify-content: center;
  align-items: center;
  height: 3.5rem;
  display: flex;
  overflow: hidden;
  text-decoration: none;
  transition: background-color 0.2s;
  cursor: pointer;
}
.rg-navbar-brand-link:hover { background-color: rgba(0,0,0,0.6); }

.rg-navbar-brand-logo {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: cover;
}

/* Brand dropdown menu */
.rg-brand-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 1.25rem;
  padding: 0.5rem;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 1px solid var(--rg-white-10);
}
.rg-brand-dropdown.open { display: flex; }

.rg-brand-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
  color: var(--rg-white);
  text-decoration: none;
  transition: background-color 0.15s;
  font-size: 0.875rem;
}
.rg-brand-item:hover { background-color: var(--rg-white-10); }

.rg-brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--rg-round);
  background: var(--rg-white-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.rg-brand-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.rg-brand-desc {
  color: var(--rg-white-30);
  font-size: 0.75rem;
  margin-left: auto;
}

/* ─── NAV ACTIONS ─── */
.rg-navbar-actions {
  gap: 1.5rem;
  border-radius: var(--rg-round);
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  white-space: nowrap;
  justify-content: flex-start;
  align-items: center;
  padding: 0.25rem 0.25rem 0.25rem 1.5rem;
  display: flex;
}

.rg-menu-button {
  background: none;
  border: none;
  color: var(--rg-white);
  font-family: var(--rg-font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
}

.rg-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
}

.rg-menu-line-top,
.rg-menu-line-bottom {
  background-color: var(--rg-white);
  border-radius: 1rem;
  width: 18px;
  height: 2px;
  transition: transform 0.3s ease;
}
.rg-menu-line-top { margin-bottom: 3px; }
.rg-menu-line-bottom { margin-top: 3px; }

/* CTA Button — dark glass pill, matching Strategy Lab */
.rg-cta-button {
  border-radius: var(--rg-round);
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  color: var(--rg-white);
  font-family: var(--rg-font);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: background-color 0.2s;
}
.rg-cta-button:hover {
  background-color: rgba(0,0,0,0.6);
}
.rg-cta-button svg { width: 16px; height: 16px; }

/* ─── NAV MENU (mobile) ─── */
.rg-nav-menu {
  display: none;
  margin-top: 0.5rem;
}
.rg-nav-menu.open { display: block; }

.rg-nav-menu-links {
  border-radius: 3rem;
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.rg-nav-link {
  border-radius: var(--rg-round);
  color: var(--rg-white);
  text-align: center;
  width: 100%;
  padding: 0.5rem 0;
  text-decoration: none;
  font-family: var(--rg-font);
  font-size: 0.875rem;
  transition: background-color 0.2s;
}
.rg-nav-link:hover { background-color: var(--rg-white-10); }


/* ============================================================
   FOOTER
   ============================================================ */
.rg-footer {
  z-index: 1;
  background-color: var(--rg-black);
  color: var(--rg-white);
  position: relative;
  overflow: hidden;
  font-family: var(--rg-font);
}

.rg-footer-main {
  z-index: 2;
  background-image: linear-gradient(180deg, #000, transparent);
  position: relative;
}

.rg-footer-padding {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.rg-footer-container {
  max-width: 80rem;
  margin: 0 auto;
}

.rg-footer-top {
  padding-top: 5rem;
  padding-bottom: 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA Form Card */
.rg-cta-form-card {
  gap: 3rem;
  border-radius: 5rem;
  background-color: var(--rg-black-30);
  background-image: linear-gradient(#0006, #fff6);
  flex-direction: column;
  width: 100%;
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 2.5rem 3.75rem;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 0 40px #fff, inset 0 0 4px #fffc;
}

.rg-cta-form-top {
  gap: 1.5rem;
  flex-direction: column;
  align-items: center;
  display: flex;
}

.rg-circle-text {
  width: 5rem;
  aspect-ratio: 1;
}

.rg-cta-form-heading-wrap {
  gap: 1rem;
  text-align: center;
  flex-direction: column;
  display: flex;
}

.rg-cta-form-heading {
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 600;
  margin: 0;
}

.rg-cta-form-sub {
  color: var(--rg-white-50);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 auto;
}

/* Form */
.rg-cta-form { position: relative; }

.rg-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rg-form-input {
  border: 1px solid var(--rg-white-10);
  background-color: var(--rg-white-05);
  color: var(--rg-white);
  font-family: var(--rg-font);
  font-size: 1rem;
  border-radius: 1.125rem;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.rg-form-input:focus { border-color: var(--rg-white-30); }
.rg-form-input::placeholder { color: var(--rg-white-30); }

.rg-form-textarea {
  min-height: 8rem;
  padding-top: 0.75rem;
  resize: vertical;
}

.rg-form-button {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.rg-submit-button {
  border-radius: var(--rg-round);
  background-color: var(--rg-black);
  color: var(--rg-white);
  font-family: var(--rg-font);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: inset 0 0 32px var(--rg-white-50);
}
.rg-submit-button:hover { box-shadow: inset 0 0 32px var(--rg-white); }

.rg-form-success,
.rg-form-error {
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
}
.rg-form-error { color: #e70d0d; }

/* Footer bottom */
.rg-footer-bottom {
  gap: 2rem;
  flex-direction: column;
  padding-bottom: 1.5rem;
  display: flex;
}

.rg-footer-link-list {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rg-white-10);
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
}
.rg-footer-link-list-bottom {
  border-bottom: none;
  padding-top: 0.5rem;
  padding-bottom: 0;
}

.rg-footer-social-link {
  gap: 0.5rem;
  color: var(--rg-white);
  font-weight: 500;
  font-size: 0.875rem;
  align-items: center;
  text-decoration: none;
  display: flex;
}
.rg-footer-social-link:hover { text-decoration: underline; }

.rg-footer-social-icon {
  aspect-ratio: 1;
  border-radius: var(--rg-round);
  background-color: var(--rg-white-30);
  justify-content: center;
  align-items: center;
  width: 2rem;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 0 12px #fff;
}
.rg-footer-social-icon svg { width: 1rem; height: 1rem; }

.rg-footer-link {
  color: var(--rg-white);
  text-decoration: none;
  font-size: 0.875rem;
}
.rg-footer-link:hover { text-decoration: underline; }

/* Logo row */
.rg-footer-bottom-row {
  position: relative;
  height: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
}

.rg-footer-bottom-logo {
  width: 22.5rem;
  margin: 0 auto;
  display: block;
  position: absolute;
  inset: auto 0 0;
  -webkit-mask-image: linear-gradient(to bottom, white 0%, white 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, white 0%, white 40%, transparent 100%);
}

.rg-footer-bottom-row-inner {
  display: flex;
  justify-content: space-between;
}

.rg-footer-bottom-text {
  color: var(--rg-white-30);
  font-size: 0.875rem;
}

/* Video bg */
.rg-footer-bg-video {
  z-index: -1;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.rg-footer-bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 991px) {
  .rg-footer-bottom-row { height: auto; }
  .rg-footer-bottom-logo { position: static; margin: 0; }
}

@media screen and (max-width: 767px) {
  .rg-footer-padding { padding-left: 1.25rem; padding-right: 1.25rem; }
  .rg-cta-form-card { padding: 2rem; gap: 2rem; border-radius: 3.5rem; }
  .rg-form-button { margin-top: 1rem; }
  .rg-footer-link-list { display: grid; grid-template-columns: 1fr 1fr; }
  .rg-footer-bottom-row-inner { flex-direction: column; gap: 0.5rem; }
  .rg-footer-top { min-height: auto; padding-top: 3rem; padding-bottom: 3rem; }
}

@media screen and (max-width: 479px) {
  .rg-navbar-brand-link { height: 2.75rem; }
  .rg-navbar-actions { padding: 0.2rem 0.2rem 0.2rem 1rem; gap: 1rem; }
  .rg-cta-button { font-size: 0.75rem; padding: 0.5rem 0.875rem; }
  .rg-menu-button span { display: none; }
  .rg-cta-form-card { border-radius: 2.5rem; padding: 1.5rem; }
  .rg-cta-form-heading { font-size: 1.5rem; }
  .rg-navbar-wraper { padding-top: 0.75rem; }
}

/* ─── PADDING for fixed navbar ─── */
body { padding-top: 4.5rem; }
