/* ==========================================================================
   063 · RIVR FLUID (سيولة مرنة) — 1:1 Single-Viewport Framed Liquidity Sanctuary
   #F0F0F0 outer frame · 100dvh no-scroll rounded-48px hero · empty start slot + SVG concave cutout
   ========================================================================== */

:root {
  --rf-bg: #F0F0F0;
  --rf-navy: #1E325A;
  --rf-slate: #444C5C;
  --rf-nav: #2D2D2D;
  --rf-sans: 'IBM Plex Sans Arabic', 'Readex Pro', -apple-system, sans-serif;
  --rf-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--rf-bg);
  color: var(--rf-navy);
  font-family: var(--rf-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

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

button, input {
  font-family: inherit;
  letter-spacing: 0;
}

.rf-frame {
  width: 100vw;
  height: 100dvh;
  padding: 18px;
  display: flex;
}

.rf-hero-card {
  position: relative;
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  height: 100%;
  border-radius: 48px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #DDE5EE;
  isolation: isolate;
}

.rf-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.rf-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  transition: transform 0.6s ease;
}

#rf-fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.rf-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0.76) 0%, rgba(244, 247, 251, 0.34) 46%, rgba(235, 241, 248, 0.2) 100%);
  pointer-events: none;
}

/* ======================== TOP NAVBAR (OMITTED WORDMARK SLOT, CENTERED ITEMS) ======================== */
.rf-navbar {
  padding: 22px 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  z-index: 10;
}

.rf-start-slot {
  display: flex;
  align-items: center;
}

.rf-mini-dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  font-size: 12px;
  color: rgba(30, 50, 90, 0.72);
  white-space: nowrap;
}

.rf-mini-dir a:hover {
  color: var(--rf-navy);
}

.rf-nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  white-space: nowrap;
}

.rf-nav-item {
  background: transparent;
  border: none;
  font-size: 13.5px;
  color: var(--rf-nav);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.rf-nav-item:hover,
.rf-nav-item.is-active {
  background: rgba(255, 255, 255, 0.56);
  color: var(--rf-navy);
  font-weight: 600;
}

.rf-end-slot {
  display: flex;
  justify-content: flex-end;
}

.rf-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 20px;
  border-radius: 999px;
  border: none;
  background: rgba(30, 50, 90, 0.86);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s ease, transform 0.2s ease;
}

.rf-demo-btn:hover {
  background: rgba(30, 50, 90, 1);
  transform: translateY(-1px);
}

.rf-demo-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* ======================== CENTER HERO STACK ======================== */
.rf-center {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 28px 130px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 10;
}

.rf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 500;
  color: var(--rf-navy);
}

.rf-h1 {
  font-size: clamp(2.45rem, 5.1vw, 4.65rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--rf-slate);
  transition: opacity 0.22s ease;
}

.rf-sub {
  max-width: 580px;
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  color: rgba(68, 76, 92, 0.88);
  line-height: 1.75;
}

/* ======================== BOTTOM-RIGHT (RTL START) FROSTED STAT HUD ======================== */
.rf-stat-card {
  position: absolute;
  bottom: 34px;
  inset-inline-start: 34px;
  min-width: 215px;
  padding: 20px 22px;
  border-radius: 35px;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 42px rgba(30, 50, 90, 0.1);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rf-stat-val {
  font-size: 30px;
  font-weight: 600;
  color: var(--rf-navy);
  line-height: 1.1;
}

.rf-stat-lbl {
  font-size: 12px;
  color: rgba(30, 50, 90, 0.72);
  margin-bottom: 8px;
}

.rf-stat-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  border-radius: 999px;
  border: none;
  background: #FFFFFF;
  color: var(--rf-navy);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.rf-stat-cta span:last-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(30, 50, 90, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ======================== BOTTOM-LEFT (RTL END) CONCAVE CUTOUT ======================== */
.rf-cutout {
  position: absolute;
  bottom: 0;
  left: 0;
  background: var(--rf-bg);
  border-top-right-radius: 54px;
  padding: 26px 46px 22px 24px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.rf-fillet-top {
  position: absolute;
  top: -54px;
  left: 0;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.rf-fillet-right {
  position: absolute;
  bottom: 0;
  right: -54px;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.rf-cutout-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(30, 50, 90, 0.06);
  border: 1px solid rgba(30, 50, 90, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rf-navy);
  font-size: 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.rf-cutout:hover .rf-cutout-btn {
  background: var(--rf-navy);
  color: #FFFFFF;
}

/* ======================== WORKING CAPITAL YIELD MODAL ======================== */
.rf-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rf-modal.is-open {
  display: flex;
}

.rf-modal-card {
  width: 100%;
  max-width: 540px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #FFFFFF;
  box-shadow: 0 28px 80px rgba(30, 50, 90, 0.22);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rf-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(30, 50, 90, 0.16);
  background: #FFFFFF;
  color: var(--rf-navy);
  cursor: pointer;
}

@media (max-width: 920px) {
  .rf-mini-dir {
    display: none;
  }
}

@media (max-width: 720px) {
  html, body {
    overflow-y: auto;
  }
  .rf-frame {
    height: auto;
    min-height: 100dvh;
  }
  .rf-nav-list {
    display: none;
  }
  .rf-stat-card {
    position: static;
    margin: 0 20px 16px;
  }
  .rf-cutout {
    position: static;
    border-radius: 28px;
    margin: 0 20px 20px;
  }
  .rf-fillet-top, .rf-fillet-right {
    display: none;
  }
}
