/* ============================================
   TrackDue — Shared Styles
   Dark fintech aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-dark: #0F0C29;
  --bg-mid: #1A1340;
  --accent-start: #6C5CE7;
  --accent-end: #A855F7;
  --success: #00D09C;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(108, 92, 231, 0.4);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
  --font-stack: -apple-system, 'Inter', 'SF Pro Display', system-ui, sans-serif;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  opacity: 0.8;
}

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

/* --- Typography --- */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.3;
}

p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
}

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

section {
  padding: 80px 0;
}

@media (min-width: 768px) {
  section {
    padding: 120px 0;
  }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15, 12, 41, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: background 0.3s ease;
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.btn-nav {
  background: var(--accent-gradient);
  color: white !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.6);
}

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

.btn-secondary:hover {
  border-color: var(--card-hover-border);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(168, 85, 247, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 12px;
}

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

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-end);
  margin-bottom: 16px;
}

.section-header p {
  max-width: 560px;
  margin: 16px auto 0;
}

/* --- Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

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

/* --- Legal Pages --- */
.legal-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.legal-page .container {
  max-width: 760px;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.legal-page .effective-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-page h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-top: 40px;
  margin-bottom: 16px;
}

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

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-page a {
  color: var(--accent-end);
}

/* --- Utilities --- */
.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
