/* ==========================================================================
   Yayasan Umah Rampa Indonesia (YURI) — RIVR × EcoNusa Hybrid Design System
   Architecture: Fluid Waterway Motion + Clean Global NGO Prestige
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Fraunces:ital,opsz,wght@0,9..144,400..800;1,9..144,400..700&family=IBM+Plex+Sans+Arabic:wght@400;600;700&family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --radius-pill: 9999px;
  
  /* Ironhill Inspired Warm Earth Linen & Parchment Ground */
  --bg: #f4eddd;
  --bg-alt: #ebe2cf;
  --card: #fcf9f2;
  --card-alt: #f3ecdb;
  
  --fg: #191f1a;
  --muted: #5e665d;
  --muted-light: #858e84;
  --border: rgba(25, 31, 26, 0.11);
  --border-strong: rgba(25, 31, 26, 0.20);
  
  /* RIVR Water, Earth & Deep Forest Accents */
  --teal-river: #0e6459;
  --teal-river-hover: #0a4f46;
  --teal-light: #128778;
  --teal-subtle: rgba(14, 100, 89, 0.09);
  
  --forest: #1b3d26;
  --forest-light: #295c3a;
  
  --emerald: #0e7955;
  --sand: #b87b33;
  --amber-warm: #c4823f;
  
  /* Elevation Shadows with Warm Earth Hues */
  --shadow-sm: 0 2px 8px rgba(25, 31, 26, 0.04);
  --shadow-card: 0 10px 30px rgba(25, 31, 26, 0.06);
  --shadow-hover: 0 20px 45px rgba(14, 100, 89, 0.12);
  --shadow-nav: 0 8px 32px rgba(25, 31, 26, 0.07);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', 'Poppins', Georgia, serif;
  --font-serif: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --font-mono: 'DM Mono', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  background-color: var(--bg);
  color: var(--fg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Typography Helpers */
.font-display { 
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Arabic Typography & RTL */
html[dir="rtl"] {
  font-family: 'IBM Plex Sans Arabic', var(--font-sans);
}
html[dir="rtl"] .font-display,
html[dir="rtl"] .font-serif {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}
html[dir="rtl"] .font-mono {
  font-family: 'IBM Plex Sans Arabic', monospace;
}
html[dir="rtl"] .text-left { text-align: right; }
html[dir="rtl"] .text-right { text-align: left; }
html[dir="rtl"] #lang-menu { right: auto; left: 0; }

/* ==========================================================================
   1. RIVR FLUID AMBIENT CURRENTS (Water Flow & Ecological Gradient)
   ========================================================================== */

.river-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #ece5d3 0%, #f4eddd 70%);
}

.river-current {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
  opacity: 0.45;
  pointer-events: none;
}

.river-current-1 {
  top: -15%;
  right: 15%;
  width: 50vw;
  height: 50vw;
  max-width: 650px;
  max-height: 650px;
  background: radial-gradient(circle, rgba(14, 100, 89, 0.14) 0%, rgba(20, 184, 166, 0.05) 60%, transparent 80%);
  animation: river-flow-1 24s ease-in-out infinite alternate;
}

.river-current-2 {
  top: 35%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(27, 61, 38, 0.12) 0%, rgba(196, 130, 63, 0.05) 50%, transparent 80%);
  animation: river-flow-2 28s ease-in-out infinite alternate;
}

.river-current-3 {
  bottom: -15%;
  right: 5%;
  width: 45vw;
  height: 45vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(196, 130, 63, 0.10) 0%, rgba(14, 100, 89, 0.05) 50%, transparent 80%);
  animation: river-flow-3 20s ease-in-out infinite alternate;
}

@keyframes river-flow-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 60px) scale(1.08); }
  100% { transform: translate(30px, -20px) scale(0.96); }
}

@keyframes river-flow-2 {
  0% { transform: translate(0, 0) scale(0.95); }
  50% { transform: translate(60px, -40px) scale(1.06); }
  100% { transform: translate(-30px, 30px) scale(1); }
}

@keyframes river-flow-3 {
  0% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-50px, -30px) scale(0.95); }
  100% { transform: translate(20px, 40px) scale(1); }
}

/* Subtle topographic topo lines pattern */
.topo-lines-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, #131a16 1px, transparent 1px),
    linear-gradient(to bottom, #131a16 1px, transparent 1px);
}

@media (prefers-reduced-motion: reduce) {
  .river-current-1, .river-current-2, .river-current-3 {
    animation: none;
    transform: none;
  }
}

/* ==========================================================================
   2. FROSTED CLEAN GLASS & CARDS (EcoNusa × MotionSites RIVR)
   ========================================================================== */

/* Floating Navbar Pill */
.rivr-nav-pill {
  background: rgba(252, 249, 242, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
}

/* Clean Elevation Cards */
.eco-card {
  background: var(--card) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
  overflow: hidden;
  position: relative;
}

.eco-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(14, 100, 89, 0.30);
}

/* Featured Green Card */
.eco-card-featured {
  background: #fbf6ec !important;
  border-color: rgba(14, 100, 89, 0.35);
  box-shadow: 0 16px 40px rgba(14, 100, 89, 0.08);
}

/* Image Thumbnail Container */
.eco-image-thumb {
  position: relative !important;
  overflow: hidden !important;
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
}

.eco-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.eco-card:hover .eco-image-thumb img {
  transform: scale(1.05);
}

/* Status Pill */
.status-pill-clean {
  background: #fcf9f2;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* MotionSites & Ironhill Signature Editorial Headline Accent */
.headline-serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal-river);
  letter-spacing: -0.01em;
}

/* Taste-Skill Double-Bezel Nested Architecture */
.bezel-shell {
  background: rgba(235, 226, 207, 0.70);
  border: 1px solid rgba(25, 31, 26, 0.12);
  border-radius: 1.75rem;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(25, 31, 26, 0.05);
}

.bezel-core {
  background: var(--card);
  border-radius: calc(1.75rem - 0.5rem);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(25, 31, 26, 0.06);
}

/* Organic Paper Grain Overlay */
.paper-grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Tabular Figures for clean telemetry & crypto alignment */
.tabular-nums, .font-mono {
  font-variant-numeric: tabular-nums;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #ebe2cf;
}
::-webkit-scrollbar-thumb {
  background: rgba(25, 31, 26, 0.20);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--teal-river);
}
