/* ============================================
   ReliaPlant Design System
   Version: 3.1 — Alignment & Layout Fix
   ============================================ */

/* === CSS Variables === */
:root {
  /* Backgrounds */
  --bg: #0B1120;
  --bg2: #131B2E;
  --bg3: #1A2540;
  --bg4: #223055;

  /* Text */
  --ink: #F0F2F5;
  --muted: #8B95A8;

  /* Borders */
  --rule: #2A3550;

  /* Accent */
  --accent: #F97316;
  --accent-hover: #EA6C0A;
  --accent-dim: rgba(249, 115, 22, 0.15);

  /* Status */
  --success: #22C55E;
  --success-dim: rgba(34, 197, 94, 0.15);
  --danger: #EF4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --warning: #F59E0B;
  --warning-dim: rgba(245, 158, 11, 0.15);

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Shadow */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 40px rgba(249, 115, 22, 0.1);

  /* Transition */
  --transition: all 0.3s ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* === Typography === */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(11, 17, 32, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--rule);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.nav-logo:hover { color: var(--ink); }

.nav-slogan {
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 700;
  margin-left: 0.6rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--rule);
  letter-spacing: 0.04em;
}
.nav-slogan b {
  padding: 0 0.3em;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.95);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-overlay.open { display: flex; }
.nav-overlay a {
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 600;
}
.nav-overlay a:hover { color: var(--ink); }

/* === Section === */
.section {
  padding: var(--space-xl) 2rem;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.section-title {
  margin-bottom: 0.8rem;
}
.section-desc {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-xl)) 2rem var(--space-xl);
}
.hero-inner {
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 {
  margin-bottom: 1.2rem;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Hero stats — each stat is a vertical unit */
.hero-stats {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 80px;
}
.hero-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
  color: #fff;
}
.btn-secondary {
  background: var(--bg3);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === Cards === */
.card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}
.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.card h3 {
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* === Table === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  background: var(--bg3);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
td {
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg3); }

/* === Badge / Tag === */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success {
  background: var(--success-dim);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-dim);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

/* === Blockquote === */
blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--bg2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted);
  line-height: 1.8;
  margin: 1.5rem 0;
}

/* === Divider === */
.divider {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: var(--space-lg) 0;
}

/* === CTA Banner === */
.cta-banner {
  text-align: center;
  padding: var(--space-xl) 2rem;
}
.cta-banner h2 {
  margin-bottom: 1rem;
}
.cta-banner .hero-actions {
  margin-bottom: 0;
}

/* === Footer === */
.footer {
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer a { color: var(--accent); }
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

/* === Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.2s; }
.fade-in.delay-3 { transition-delay: 0.3s; }
.fade-in.delay-4 { transition-delay: 0.4s; }

/* === Responsive: Tablet === */
@media (max-width: 960px) {
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 2rem; }
  .hero-stat-item { min-width: 70px; }
}

/* === Responsive: Mobile === */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
  .nav-slogan { display: none; }

  .section { padding: var(--space-lg) 1.25rem; }
  .hero { padding: calc(var(--nav-height) + var(--space-lg)) 1.25rem var(--space-lg); }

  .card-grid-3,
  .card-grid-2 { grid-template-columns: 1fr; }

  .hero-stats {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    width: 100%;
  }
  .hero-stat-item {
    flex: 1;
    min-width: 0;
    align-items: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid var(--rule);
  }
  .hero-stat-item:last-child {
    border-right: none;
  }
  .hero-stat-value {
    font-size: 1.15rem;
  }
  .hero-stat-label {
    font-size: 0.72rem;
    margin-top: 0.25rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    justify-content: center;
  }
}