/* ═══════════════════════════════════════════════════════════
   DYVE Info Site — Design System
   Domain: dyve.info, status.dyve.info, docs.dyve.info, etc.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(76, 110, 245, 0.3);

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);

  --accent: #4C6EF5;
  --accent-glow: rgba(76, 110, 245, 0.15);
  --accent-gradient: linear-gradient(135deg, #4C6EF5 0%, #7C3AED 50%, #EC4899 100%);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(76, 110, 245, 0.08);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1100px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Effect ── */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(76, 110, 245, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, -3%); }
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #7C8FFF; }

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav-logo .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 0 0 80px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.card .card-link::after {
  content: '→';
  transition: transform var(--transition);
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

/* ── Status Page ── */
.status-header {
  text-align: center;
  padding: 80px 0 40px;
}

.status-overall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
}

.status-overall.operational {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.status-overall.degraded {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.up { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.degraded { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-dot.down { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 80px;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.service-item:hover {
  background: var(--bg-card-hover);
}

.service-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.service-status.up { color: var(--success); }
.service-status.degraded { color: var(--warning); }
.service-status.down { color: var(--danger); }

.uptime-bar {
  display: flex;
  gap: 2px;
  margin-top: 24px;
}

.uptime-day {
  flex: 1;
  height: 32px;
  border-radius: 3px;
  background: rgba(16, 185, 129, 0.3);
  transition: all var(--transition);
  position: relative;
}

.uptime-day:hover {
  transform: scaleY(1.3);
}

.uptime-day.good { background: var(--success); opacity: 0.6; }
.uptime-day.good:hover { opacity: 1; }

/* ── Legal / Content Pages ── */
.content-page {
  padding: 80px 0;
}

.content-page .content-body {
  max-width: 720px;
  margin: 0 auto;
}

.content-body h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.content-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content-body p,
.content-body li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-body ul {
  padding-left: 20px;
}

.content-body li {
  margin-bottom: 8px;
}

.last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* ── Changelog ── */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.changelog-entry {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.changelog-date {
  flex-shrink: 0;
  width: 120px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 4px;
}

.changelog-content h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.changelog-tag {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
  vertical-align: middle;
}

.changelog-tag.feature {
  background: rgba(76, 110, 245, 0.15);
  color: var(--accent);
}

.changelog-tag.fix {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.changelog-tag.improvement {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.changelog-content p,
.changelog-content li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Press Kit ── */
.press-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.press-download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.press-download-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

/* ── Docs ── */
.docs-sidebar {
  position: sticky;
  top: 80px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 60px 0 80px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav-section {
  margin-bottom: 20px;
}

.docs-nav-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.docs-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.docs-nav a:hover,
.docs-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.docs-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
}

.docs-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0;
}

.docs-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.endpoint {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.endpoint-method {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  margin-right: 8px;
}

.endpoint-method.get { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.endpoint-method.post { background: rgba(76, 110, 245, 0.15); color: var(--accent); }
.endpoint-method.put { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.endpoint-method.delete { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 60px 24px 50px; }
  .hero h1 { font-size: 2rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .changelog-entry { flex-direction: column; gap: 8px; }
  .changelog-date { width: auto; }
}
