/* ================================================================
   SHARED DESIGN SYSTEM — Listi
   Used across homepage + feature subpages
   Sources: UI/UX Pro Max, Theme Factory (Ocean Depths), Page CRO
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #38BDF8;
  --primary-container: #E0F2FE;
  --cta: #F97316;
  --cta-hover: #EA580C;

  --accent-cards: #F97316;
  --accent-cards-soft: rgba(249, 115, 22, 0.10);
  --accent-list: #0EA5E9;
  --accent-list-soft: rgba(14, 165, 233, 0.10);
  --accent-spend: #10B981;
  --accent-spend-soft: rgba(16, 185, 129, 0.10);

  --bg: #F0F9FF;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-elevated: #FFFFFF;

  --text-primary: #0C4A6E;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --border: #E2E8F0;
  --border-glass: rgba(14, 165, 233, 0.15);

  --shadow-sm: 0 1px 3px rgba(14, 165, 233, 0.06);
  --shadow-md: 0 4px 16px rgba(14, 165, 233, 0.08);
  --shadow-lg: 0 12px 40px rgba(14, 165, 233, 0.12);
  --shadow-cta: 0 8px 24px rgba(249, 115, 22, 0.25);

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
}

[data-theme="dark"] {
  --primary: #38BDF8;
  --primary-dark: #0EA5E9;
  --primary-light: #7DD3FC;
  --primary-container: #0C4A6E;
  --cta: #FB923C;
  --cta-hover: #F97316;

  --accent-cards: #FB923C;
  --accent-cards-soft: rgba(251, 146, 60, 0.12);
  --accent-list: #38BDF8;
  --accent-list-soft: rgba(56, 189, 248, 0.12);
  --accent-spend: #34D399;
  --accent-spend-soft: rgba(52, 211, 153, 0.12);

  --bg: #0F172A;
  --surface: #1E293B;
  --surface-glass: rgba(30, 41, 59, 0.9);
  --surface-elevated: #1E293B;

  --text-primary: #F0F9FF;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;

  --border: #334155;
  --border-glass: rgba(56, 189, 248, 0.2);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-cta: 0 8px 24px rgba(251, 146, 60, 0.3);
}

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

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

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1020px; margin: 0 auto; padding: 0 24px; }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  cursor: pointer;
  transition: opacity 0.2s ease-out;
}

.nav-brand:hover { opacity: 0.8; }

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s ease-out, color 0.2s ease-out;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--primary-container);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 600;
}

.nav-theme {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: transform 0.2s ease-out;
}

.nav-theme:hover { transform: scale(1.08); }
.nav-theme:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-theme svg { width: 18px; height: 18px; fill: var(--text-primary); }
.nav-theme .sun { display: none; }
.nav-theme .moon { display: block; }
[data-theme="dark"] .nav-theme .sun { display: block; }
[data-theme="dark"] .nav-theme .moon { display: none; }

/* ===================== SUBPAGE HERO ===================== */
.sub-hero {
  text-align: center;
  padding: 120px 0 56px;
  position: relative;
}

.sub-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-container) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

.sub-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.sub-hero .badge svg { width: 14px; height: 14px; fill: currentColor; }

.sub-hero .badge.cards { color: var(--accent-cards); background: var(--accent-cards-soft); }
.sub-hero .badge.list { color: var(--accent-list); background: var(--accent-list-soft); }
.sub-hero .badge.spend { color: var(--accent-spend); background: var(--accent-spend-soft); }

.sub-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.sub-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ===================== HOW IT WORKS ===================== */
.steps {
  padding: 48px 0;
}

.steps h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px 24px;
  position: relative;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  margin-bottom: 16px;
}

.step-num.cards { background: var(--accent-cards); }
.step-num.list { background: var(--accent-list); }
.step-num.spend { background: var(--accent-spend); }

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===================== FEATURES DETAIL ===================== */
.detail-section {
  padding: 48px 0;
}

.detail-section h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.d-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.d-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.d-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-icon svg { width: 22px; height: 22px; fill: currentColor; }
.d-icon.cards { color: var(--accent-cards); background: var(--accent-cards-soft); }
.d-icon.list { color: var(--accent-list); background: var(--accent-list-soft); }
.d-icon.spend { color: var(--accent-spend); background: var(--accent-spend-soft); }

.d-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.d-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ===================== PAGE CTA ===================== */
.page-cta {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  margin: 32px 0 48px;
}

.page-cta h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.page-cta p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  box-shadow: var(--shadow-cta);
}

.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35); }
.cta-btn:active { transform: translateY(0); }
.cta-btn svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

footer .links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
footer a { color: var(--text-muted); transition: color 0.2s ease-out; cursor: pointer; }
footer a:hover { color: var(--primary); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .sub-hero h1 { font-size: 2rem; }
  .nav-links { display: none; }
}

@media (max-width: 520px) {
  .sub-hero { padding: 90px 0 40px; }
  .sub-hero h1 { font-size: 1.75rem; }
  .step-grid { grid-template-columns: 1fr; }
  .page-cta { padding: 32px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
