/*
   Riva — marketing site theme
   Tokens come from css/brand.css (brand board v2). Ledger Navy surfaces,
   Signal Blue for action, Consistency Green for live/healthy, the signal
   gradient only ever vertical.
*/

/* ====================
   Design Tokens
   ==================== */
:root {
  --bg:           var(--riva-ledger-navy);
  --bg-raised:    #0D1B30;
  --bg-card:      #102038;
  --bg-elevated:  #152843;
  --border:       var(--riva-rule);
  --border-hover: #2A4268;
  --text:         var(--riva-mist);
  --text-secondary: var(--riva-steel);
  --text-dim:     var(--riva-slate);
  --accent:       var(--riva-signal-blue);
  --accent-text:  var(--riva-signal-blue-text);
  --live:         var(--riva-consistency-green);
  --accent-dim:   rgba(46, 92, 255, 0.14);
  --accent-glow:  rgba(46, 92, 255, 0.05);
  --warm:         #f59e0b;
  --warm-dim:     rgba(245, 158, 11, 0.10);
  --radius:       12px;
  --radius-sm:    8px;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.33, 1, 0.68, 1);
  --font-display: var(--riva-font-brand);
  --font-heading: var(--riva-font-brand);
  --font-body:    var(--riva-font-ui);
  --font-mono:    var(--riva-font-mono);
  --narrow:       740px;
  --wide:         1120px;
}

/* ====================
   Reset & Base
   ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--text);
}

::selection {
  background-color: rgba(46, 92, 255, 0.35);
  color: var(--text);
}

/* ====================
   Atmospheric Effects
   ==================== */

/* Grain texture overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Floating gradient orbs */
.glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
}

.glow--1 {
  width: 600px;
  height: 600px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(46, 92, 255, 0.16) 0%, transparent 70%);
  animation: glowDrift1 20s ease-in-out infinite;
}

.glow--2 {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: -200px;
  background: radial-gradient(circle, rgba(0, 196, 179, 0.07) 0%, transparent 70%);
  animation: glowDrift2 25s ease-in-out infinite;
}

@keyframes glowDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.05); }
  66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes glowDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.1); }
}

/* ====================
   Typography
   ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: 3.2rem; margin-bottom: 0.6em; }
h2 { font-size: 2rem; margin-bottom: 0.5em; }
h3 { font-size: 1.4rem; margin-bottom: 0.4em; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

em {
  font-style: italic;
  color: var(--text);
}

/* ====================
   Layout
   ==================== */
.container {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

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

/* ====================
   Navbar
   ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.1rem 0;
  background-color: rgba(10, 22, 40, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}


.logo:hover {
  opacity: 1;
  color: var(--text);
}

nav {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}

nav a {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

nav a:hover {
  color: var(--text);
  opacity: 1;
}

nav a.active {
  color: var(--text);
}

.external-icon {
  opacity: 0.4;
  transition: opacity 0.2s;
  margin-left: 1px;
}

nav a:hover .external-icon {
  opacity: 0.8;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  position: relative;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  margin: 5px 0;
  transition: 0.35s var(--ease);
  border-radius: 1px;
}

/* ====================
   Article — Hero
   ==================== */
.article {
  padding: 7rem 0 5rem;
  position: relative;
}

.article-header {
  margin-bottom: 4rem;
}

.article-meta {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.82rem;
}

.article-tag {
  background-color: var(--warm-dim);
  color: var(--warm);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.article-date {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent-line {
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 2rem 0 2.2rem;
}

.article-header .subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 580px;
  font-weight: 400;
}

/* Trust line */
.trust-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

/* Hero CTAs */
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.cta-btn--primary {
  background-color: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
}

.cta-btn--primary:hover {
  background-color: transparent;
  color: var(--accent-text);
  opacity: 1;
}

.cta-btn--secondary {
  background-color: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cta-btn--secondary:hover {
  border-color: var(--text-dim);
  color: var(--text);
  opacity: 1;
}

/* ====================
   Article — Body
   ==================== */
.article-body h2 {
  font-size: 1.65rem;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  position: relative;
  padding-left: 20px;
}

.article-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--riva-signal);
}

.article-body p {
  font-size: 1.08rem;
  line-height: 1.82;
  margin-bottom: 1.4rem;
  color: var(--text-secondary);
}

.article-body .lead {
  font-size: 1.22rem;
  color: var(--text);
  line-height: 1.75;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* Pullquote */
.pullquote {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.45;
  border-left: 3px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1.8rem;
  margin: 2.5rem 0;
  max-width: 560px;
}

/* Product tagline */
.product-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem !important;
  color: var(--accent-text) !important;
  letter-spacing: 0.01em;
  margin-bottom: 0.8rem !important;
  line-height: 1.5 !important;
}

/* ====================
   Products Grid
   ==================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

/* ====================
   Product Intro Cards
   ==================== */
.product-intro {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.product-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.product-intro:hover {
  border-color: var(--border-hover);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 0 60px var(--accent-glow);
}

.product-intro:hover::before {
  opacity: 1;
}

.product-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  opacity: 0.6;
}

.product-intro h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.product-intro h3 a {
  color: var(--text);
  position: relative;
  transition: color 0.3s var(--ease);
}

.product-intro h3 a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.product-intro h3 a:hover {
  color: var(--accent-text);
  opacity: 1;
}

.product-intro h3 a:hover::after {
  transform: scaleX(1);
}

.product-intro > p {
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* ====================
   Install Command
   ==================== */
.install-cmd {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-text);
  margin-top: 1rem;
  overflow-x: auto;
  transition: border-color 0.3s var(--ease);
}

.install-cmd:hover {
  border-color: var(--border-hover);
}

.install-prompt {
  color: var(--text-dim);
  user-select: none;
  flex-shrink: 0;
}

.install-cmd code {
  flex: 1;
  white-space: nowrap;
}

.install-cmd .copy-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-cmd .copy-btn:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

.install-cmd .copy-btn.copied {
  color: var(--accent-text);
}

/* ====================
   Divider
   ==================== */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3.5rem 0;
}

/* ====================
   Sign-off
   ==================== */
.sign-off-photo {
  margin-bottom: 1.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 480px;
}

.sign-off-photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.9) contrast(1.05);
  transition: filter 0.4s var(--ease);
}

.sign-off-photo:hover img {
  filter: brightness(1) contrast(1);
}

.sign-off p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-style: italic;
}

.sign-off .author {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.sign-off-aside {
  font-family: var(--font-mono);
  font-size: 0.78rem !important;
  font-style: normal !important;
  color: var(--text-dim) !important;
  letter-spacing: 0.01em;
  margin-top: -0.3rem;
}

/* ====================
   Product Page — Hero
   ==================== */
.product-hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.product-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.product-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

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

.product-hero .tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.product-hero .install-cmd {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  justify-content: center;
}

/* Multi-OS install block (product hero) */
.product-hero .install-block {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.install-os {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.product-hero .install-block .install-cmd {
  max-width: none;
  margin: 0;
  justify-content: flex-start;
  overflow: hidden;
}

/* Scroll the command itself on narrow screens so the copy button stays visible */
.install-block .install-cmd code {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.install-alt {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  margin: 0.2rem 0 0;
}

.install-alt code {
  font-family: var(--font-mono);
  color: var(--text);
}

.install-alt a {
  color: var(--text-dim);
  text-decoration: underline;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
}
.badge-row a { display: inline-flex; line-height: 0; border-radius: 4px; }
.badge-row img { height: 28px; }
.install-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-align: center;
  margin: 0.35rem 0 0;
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.hero-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-links a:hover {
  color: var(--accent-text);
  opacity: 1;
}

/* ====================
   Section
   ==================== */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header h2::before {
  /* the signal tick — vertical, blue at the bottom, as on the brand board */
  content: '';
  display: block;
  width: 3px;
  height: 22px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: var(--riva-signal);
}

.section-header p {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ====================
   Steps
   ==================== */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-dim);
  color: var(--accent-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.95rem;
}

/* ====================
   Feature Grid
   ==================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ====================
   Use Cases Grid
   ==================== */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.usecase-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s var(--ease);
}

.usecase-card:hover {
  border-color: var(--accent);
}

.usecase-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.usecase-card p {
  font-size: 0.92rem;
}

/* ====================
   Framework Tags (Riva)
   ==================== */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tag {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ====================
   Security (Riva)
   ==================== */
.security-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  margin-top: 2rem;
}

.security-section blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

.security-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.security-list li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.security-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent-text);
  font-family: monospace;
  font-weight: 700;
}

/* ====================
   Terminal / Code Block
   ==================== */
.terminal {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  overflow-x: auto;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border);
}

.terminal pre {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
}

.terminal pre .prompt {
  color: var(--accent-text);
  user-select: none;
}

.terminal pre .comment {
  color: var(--text-dim);
}

/* ====================
   Footer
   ==================== */
footer {
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 260px;
}

.footer-brand .logo {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-nav {
  display: flex;
  gap: 4.5rem;
  flex-wrap: wrap;
}

.footer-links h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
  transition: color 0.25s var(--ease);
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-dim);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.social-links a:hover {
  color: var(--text);
  opacity: 1;
  border-color: var(--border);
  background-color: var(--bg-card);
  transform: translateY(-1px);
}

/* ====================
   Animations
   ==================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in[data-delay="1"] { transition-delay: 0.1s; }
.fade-in[data-delay="2"] { transition-delay: 0.2s; }
.fade-in[data-delay="3"] { transition-delay: 0.3s; }
.fade-in[data-delay="4"] { transition-delay: 0.4s; }

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar entrance */
.navbar {
  animation: navSlide 0.6s var(--ease-out) forwards;
}

@keyframes navSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====================
   Responsive
   ==================== */
@media (max-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.6rem; }

  .article-header h1 { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .product-hero h1 { font-size: 2.5rem; }
  .product-hero .tagline { font-size: 1.1rem; }

  .article {
    padding: 5rem 0 3rem;
  }

  /* Mobile nav */
  .mobile-menu-btn {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    max-width: 320px;
    background-color: var(--bg-raised);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transition: right 0.35s var(--ease);
    border-left: 1px solid var(--border);
    z-index: 99;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 1.05rem;
    padding: 0.85rem 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Grids */
  .steps-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }
  .security-list { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }

  /* Product cards */
  .product-intro {
    padding: 1.8rem;
  }

  /* Footer */
  .footer-content { flex-direction: column; }
  .footer-nav { flex-direction: column; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .social-links { justify-content: center; }

  .product-hero { padding: 4rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .security-section { padding: 2rem; }

  /* Reduce glow on mobile */
  .glow--1 { width: 300px; height: 300px; }
  .glow--2 { width: 250px; height: 250px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 2rem; }
  .article-header h1 { font-size: 2.2rem; }
  .product-hero h1 { font-size: 2.1rem; }
  .hero-links { flex-direction: column; gap: 0.75rem; }
  .install-cmd { font-size: 0.8rem; }
  .tag-grid { gap: 0.5rem; }
  .tag { font-size: 0.8rem; padding: 6px 14px; }
  .article { padding: 4rem 0 2rem; }
}

/* ====================
   Brand marks (see css/brand.css)
   ==================== */
.logo .riva-wordmark { height: 28px; }
.product-hero .riva-imark--lg { margin: 0 auto 1.5rem; }
.hero-wordmark { margin: 0 0 1.25rem; line-height: 0; }
.hero-wordmark .riva-wordmark--lg { display: block; }
@media (max-width: 600px) {
  .product-hero .hero-cta { flex-wrap: wrap; justify-content: center; }
}

/* ====================
   Pillars — observe / improve / account / compare
   ==================== */
.pillar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.pillar {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem; display: flex; flex-direction: column; min-width: 0;
}
.pillar__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.pillar__name {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); padding-left: 11px; position: relative;
}
.pillar__name::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 3px; border-radius: 2px; background: var(--riva-signal); }
.pillar__chip {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-secondary); border: 1px solid var(--border-hover); border-radius: 100px; padding: 2px 8px;
}
.pillar__chip--now { color: var(--live); border-color: rgba(53, 226, 139, .35); background: rgba(53, 226, 139, .08); }
.pillar h3 { font-family: var(--font-heading); font-size: 1.22rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; margin-bottom: .45rem; color: var(--text); }
.pillar > p { font-size: .95rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1.2rem; }

.snippet {
  margin-top: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: .76rem; line-height: 1.5; color: var(--text); overflow: hidden;
}
.snippet__bar {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .85rem; border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 500;
}
.snippet__bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snippet__meta { color: var(--text-dim); font-weight: 400; white-space: nowrap; }
.snippet__note { padding: 0 .85rem .7rem; color: var(--text-dim); font-size: .72rem; margin: 0; }

.feed { list-style: none; padding: .35rem 0; margin: 0; }
.feed li { display: grid; grid-template-columns: 10px 7.5em 7.5em 1fr auto; align-items: center; gap: .6rem; padding: .32rem .85rem; }
.feed b { font-weight: 500; color: var(--text); }
.feed span { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed em { font-style: normal; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed time { color: var(--text-dim); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); display: block; }
.dot--live { background: var(--live); box-shadow: 0 0 0 3px rgba(53, 226, 139, .15); }

.turns { display: flex; flex-wrap: wrap; gap: 3px; padding: .8rem .85rem .45rem; }
.t { display: inline-block; width: 10px; height: 18px; border-radius: 2px; background: var(--accent); }
.t--r { background: var(--warm); }
.t--d { background: #ef4444; }
.t--w { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warm); }
.turns__legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: 0 .85rem .7rem; color: var(--text-dim); font-size: .7rem; }
.turns__legend span { display: inline-flex; align-items: center; gap: .4rem; }
.turns__legend .t { width: 8px; height: 12px; }
.metrics { margin: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; }
.metrics div { padding: .6rem .85rem; border-bottom: 1px solid var(--border); }
.metrics div:nth-child(odd) { border-right: 1px solid var(--border); }
.metrics div:nth-last-child(-n+2) { border-bottom: 0; }
.metrics dt { color: var(--text-dim); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.metrics dd { margin: .15rem 0 0; font-size: .95rem; font-weight: 500; color: var(--text); }
.metrics dd.warn { color: var(--warm); }
.metrics small { display: block; font-size: .68rem; font-weight: 400; color: var(--text-dim); }

.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { text-align: left; padding: .42rem .85rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ledger th { color: var(--text-dim); font-weight: 400; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.ledger td { color: var(--text-secondary); }
.ledger td:first-child { color: var(--text); overflow: hidden; text-overflow: ellipsis; max-width: 12em; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger__unowned td { color: var(--warm) !important; }

.bars { padding: .75rem .85rem .55rem; display: grid; gap: .55rem; }
.bars__row { display: grid; grid-template-columns: 5.2em 1fr 3.6em 5.4em; align-items: center; gap: .6rem; }
.bars__row span { color: var(--text-secondary); }
.bars__track { height: 8px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.bars__track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bars__row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.bars__row small { color: var(--text-dim); text-align: right; }
.pillars__footnote { margin-top: 1rem; text-align: center; font-size: .78rem; color: var(--text-dim); }

@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .feed li { grid-template-columns: 10px 7em 1fr auto; }
  .feed span { display: none; }
}
.feed__alert em { color: var(--warm); }
.dot--warn { background: var(--warm); box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.metrics--4 { grid-template-columns: repeat(4, 1fr); }
.metrics--4 div { border-bottom: 0; border-right: 1px solid var(--border); }
.metrics--4 div:last-child { border-right: 0; }
@media (max-width: 860px) {
  .metrics--4 { grid-template-columns: 1fr 1fr; }
  .metrics--4 div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .metrics--4 div:nth-child(2) { border-right: 0; }
}

/* ====================
   Hero signal field (home) — rising vertical bars in the signal gradient
   ==================== */
.product-hero--home { position: relative; overflow: hidden; }
.product-hero--home > .container { position: relative; z-index: 1; }
.signal-field {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  display: flex; align-items: flex-end; gap: 6px; padding: 0 3%;
  opacity: .14; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
}
.signal-field i { flex: 1; border-radius: 2px 2px 0 0; background: var(--riva-signal); }
@media (max-width: 600px) { .signal-field { gap: 3px; opacity: .12; } }
@media (prefers-reduced-motion: no-preference) {
  .signal-field i { transform-origin: bottom; animation: signalRise 1.2s var(--ease) both; }
}
@keyframes signalRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ====================
   Home: first screen = hero + pillars
   ==================== */
.product-hero--home { padding: 3.25rem 0 2.25rem; }
.product-hero--home .riva-wordmark--lg { height: clamp(52px, 7vw, 76px); }
.product-hero--home .tagline { font-size: 1.45rem; color: var(--text); }
.product-hero--home .hero-wordmark { margin-bottom: 1rem; }
.section.pillars { padding-top: 1.5rem; }
.pillars .section-header { margin-bottom: 2rem; }
@media (max-width: 600px) {
  .product-hero--home { padding: 2.5rem 0 1.75rem; }
  .product-hero--home .tagline { font-size: 1.2rem; }
}
.pillars .section-header h2 { font-size: 1.6rem; }
.pillars .section-header h2::before { height: 16px; margin-bottom: 10px; }
.pillars .section-header p { font-size: 1rem; }
.product-hero--home { padding-bottom: 1.5rem; }

/* `hidden` must win over component display rules (e.g. .map-float is inline-flex) */
[hidden] { display: none !important; }

/* ====================
   Product screens
   ==================== */
.screens .section-header { margin-bottom: 2.25rem; }
.screen { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55); }
.screen__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.screen__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-hover); }
.screen__bar span { margin-left: 10px; font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }
.screen img { display: block; width: 100%; height: auto; }
.screen figcaption { padding: .85rem 1.1rem 1rem; font-size: .92rem; color: var(--text-secondary); line-height: 1.55; border-top: 1px solid var(--border); }
.screen figcaption b { display: block; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: .25rem; }
.screen figcaption code { font-family: var(--font-mono); font-size: .85em; color: var(--accent-text); }
.screen--lead { margin-bottom: 1.25rem; }
.screen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.screens__note { margin-top: 1rem; text-align: center; font-size: .78rem; color: var(--text-dim); }
@media (max-width: 860px) { .screen-grid { grid-template-columns: 1fr; } }
