/**
 * NovaCalc - Main Stylesheet
 * Shared base styles for all pages (except checkout.html).
 * Loaded before enhancements.css which provides animation/transition overrides.
 */

/* ===========================================================================
   RESET & CSS CUSTOM PROPERTIES
   =========================================================================== */

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

:root {
  --bg-base: #e8e5f2;
  --bg-gradient-start: #f0ecff;
  --bg-gradient-end: #e0daf0;

  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-bg-hover: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-border-subtle: rgba(255, 255, 255, 0.35);
  --glass-shadow: rgba(140, 130, 180, 0.18);
  --glass-shadow-hover: rgba(140, 130, 180, 0.28);
  --glass-blur: blur(24px) saturate(200%);

  --text-primary: #2a2438;
  --text-secondary: #5a5268;
  --text-muted: #7a7388;

  --accent: #5b8ff9;
  --accent-light: #6fa0ff;
  --accent-dark: #4a7ad9;

  --pill-active-bg: rgba(91, 143, 249, 0.15);
  --pill-active-border: rgba(91, 143, 249, 0.3);

  --font-display: 'DM Serif Display', serif;
  --font-body: 'Outfit', sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #070a11;
  --bg-gradient-start: #080b12;
  --bg-gradient-end: #15111f;
  --bg-radial-primary: rgba(52, 211, 225, 0.13);
  --bg-radial-secondary: rgba(124, 92, 255, 0.16);
  --bg-radial-tertiary: rgba(255, 77, 141, 0.08);
  --glass-bg: rgba(12, 18, 31, 0.58);
  --glass-bg-hover: rgba(17, 25, 42, 0.72);
  --glass-border: rgba(196, 232, 255, 0.18);
  --glass-border-subtle: rgba(196, 232, 255, 0.11);
  --glass-shadow: rgba(0, 0, 0, 0.48);
  --glass-shadow-hover: rgba(0, 0, 0, 0.62);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-highlight-strong: rgba(255, 255, 255, 0.24);
  --glass-lowlight: rgba(4, 9, 18, 0.3);
  --text-primary: #f6f8ff;
  --text-secondary: #c4cbda;
  --text-muted: #8f98ad;
  --accent: #5ee7ff;
  --accent-light: #9df4ff;
  --accent-dark: #37b7d8;
  --pill-active-bg: rgba(94, 231, 255, 0.13);
  --pill-active-border: rgba(94, 231, 255, 0.34);
}

/* ===========================================================================
   BASE STYLES
   =========================================================================== */

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 8%, var(--bg-radial-primary, rgba(91, 143, 249, 0.12)) 0%, transparent 34%),
    radial-gradient(circle at 82% 18%, var(--bg-radial-secondary, rgba(111, 160, 255, 0.1)) 0%, transparent 32%),
    radial-gradient(circle at 50% 100%, var(--bg-radial-tertiary, rgba(180, 150, 255, 0.1)) 0%, transparent 36%),
    linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  line-height: 1.6;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* ===========================================================================
   GLASS EFFECTS
   =========================================================================== */

.glass {
  background: linear-gradient(
    135deg,
    var(--glass-highlight, rgba(255, 255, 255, 0.28)) 0%,
    var(--glass-bg, rgba(255, 255, 255, 0.18)) 52%,
    var(--glass-lowlight, rgba(255, 255, 255, 0.12)) 100%
  );
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-highlight-strong, rgba(255, 255, 255, 0.85));
  border-left-color: var(--glass-highlight, rgba(255, 255, 255, 0.75));
  box-shadow:
    0 4px 24px var(--glass-shadow),
    0 8px 48px rgba(22, 32, 56, 0.16),
    inset 0 1px 0 var(--glass-highlight-strong, rgba(255, 255, 255, 0.6)),
    inset 0 -1px 0 var(--glass-lowlight, rgba(255, 255, 255, 0.2));
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
  background: linear-gradient(
    135deg,
    var(--glass-highlight-strong, rgba(255, 255, 255, 0.38)) 0%,
    var(--glass-bg-hover, rgba(255, 255, 255, 0.25)) 52%,
    var(--glass-lowlight, rgba(255, 255, 255, 0.18)) 100%
  );
  box-shadow:
    0 6px 32px var(--glass-shadow-hover),
    0 12px 56px rgba(52, 211, 225, 0.12),
    inset 0 1px 0 var(--glass-highlight-strong, rgba(255, 255, 255, 0.7)),
    inset 0 -1px 0 var(--glass-lowlight, rgba(255, 255, 255, 0.25));
  transform: translateY(-2px);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-md);
  box-shadow:
    0 2px 16px rgba(140, 130, 180, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}

.glass-subtle:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 4px 20px rgba(140, 130, 180, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-dark {
  background: linear-gradient(
    135deg,
    rgba(30, 25, 50, 0.35) 0%,
    rgba(20, 15, 35, 0.25) 50%,
    rgba(15, 10, 25, 0.2) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
}

.glass-panel {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.12) 100%
  );
  backdrop-filter: blur(28px) saturate(220%);
  -webkit-backdrop-filter: blur(28px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-left-color: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 40px rgba(140, 130, 180, 0.2),
    0 16px 64px rgba(140, 130, 180, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  box-shadow:
    0 12px 48px rgba(140, 130, 180, 0.25),
    0 20px 80px rgba(140, 130, 180, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
}

/* ===========================================================================
   TOPBAR & NAVIGATION
   =========================================================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  position: sticky;
  top: 16px;
  z-index: 100;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow:
    0 8px 22px rgba(91, 143, 249, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand-badge::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 54%);
  pointer-events: none;
}

.brand-badge img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .brand-badge {
  padding: 2px;
  background: linear-gradient(145deg, rgba(226, 239, 255, 0.18), rgba(13, 20, 34, 0.56));
  border-color: rgba(226, 239, 255, 0.24);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(226, 239, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .brand-badge::after {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.26), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 58%);
}

[data-theme="dark"] .brand-badge img {
  filter: brightness(1.22) contrast(1.08) saturate(1.08);
  transform: scale(1.16);
  box-shadow:
    0 0 0 1px rgba(226, 239, 255, 0.16),
    0 5px 14px rgba(0, 0, 0, 0.32);
}

.nav-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(140, 130, 180, 0.1);
  transform: translateY(-2px);
}

.pill.active {
  background: var(--pill-active-bg);
  border-color: var(--pill-active-border);
  color: var(--accent);
}

/* ===========================================================================
   THEME TOGGLE
   =========================================================================== */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px var(--glass-shadow);
}

.theme-toggle:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.15) 100%);
  transform: scale(1.05) rotate(10deg);
  color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, rgba(94, 231, 255, 0.16) 0%, rgba(124, 92, 255, 0.1) 100%);
  border-color: rgba(94, 231, 255, 0.32);
  color: var(--accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .theme-toggle:hover {
  background: linear-gradient(135deg, rgba(94, 231, 255, 0.24) 0%, rgba(124, 92, 255, 0.16) 100%);
  box-shadow: 0 6px 24px rgba(94, 231, 255, 0.22), 0 14px 34px rgba(0, 0, 0, 0.34);
}

/* ===========================================================================
   DARK THEME OVERRIDES
   =========================================================================== */

[data-theme="dark"] .ambient-glow {
  opacity: 0.72;
  filter: saturate(130%);
}

[data-theme="dark"] .glass-subtle,
[data-theme="dark"] .btn-ghost,
[data-theme="dark"] .asset-links a,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .pill {
  background: linear-gradient(135deg, rgba(15, 23, 38, 0.46) 0%, rgba(8, 13, 24, 0.32) 100%);
  border-color: rgba(196, 232, 255, 0.12);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass-subtle:hover,
[data-theme="dark"] .btn-ghost:hover,
[data-theme="dark"] .asset-links a:hover,
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .pill:hover {
  background: linear-gradient(135deg, rgba(25, 35, 56, 0.64) 0%, rgba(12, 20, 34, 0.46) 100%);
  border-color: rgba(94, 231, 255, 0.24);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(94, 231, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .glass-dark,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] footer,
[data-theme="dark"] .footer {
  background: linear-gradient(145deg, rgba(12, 18, 31, 0.7) 0%, rgba(8, 13, 24, 0.5) 58%, rgba(4, 8, 16, 0.42) 100%);
  border-color: rgba(196, 232, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-left-color: rgba(196, 232, 255, 0.18);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42), 0 0 42px rgba(94, 231, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .glass-panel:hover {
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.5), 0 0 48px rgba(94, 231, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .meta-chip {
  background: linear-gradient(135deg, rgba(94, 231, 255, 0.12) 0%, rgba(124, 92, 255, 0.08) 100%);
  border-color: rgba(94, 231, 255, 0.28);
  color: var(--accent-light);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .btn-solid,
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .footer-social a:hover {
  background: linear-gradient(135deg, #37d7ee 0%, #7c5cff 100%);
  box-shadow: 0 12px 32px rgba(94, 231, 255, 0.22), 0 8px 28px rgba(124, 92, 255, 0.16);
}

[data-theme="dark"] .footer-copyright {
  border-top-color: rgba(196, 232, 255, 0.12);
}

/* ===========================================================================
   HERO SECTION
   =========================================================================== */

.hero {
  padding: 48px 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--accent);
  font-style: italic;
}

.hero p,
.hero > p {
  color: var(--text-secondary);
  max-width: 720px;
  margin: 10px auto 0;
  font-size: 16px;
  line-height: 1.6;
}

.hero > p {
  font-size: 18px;
  margin: 0 auto var(--spacing-md);
  font-weight: 400;
  line-height: 1.7;
}

/* ===========================================================================
   META CHIP
   =========================================================================== */

.meta-chip {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(
    135deg,
    rgba(91, 143, 249, 0.12) 0%,
    rgba(91, 143, 249, 0.06) 100%
  );
  border-radius: 20px;
  color: var(--accent-dark);
  margin-top: 14px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(91, 143, 249, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 2px 12px rgba(91, 143, 249, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ===========================================================================
   DOWNLOAD PANEL (index page)
   =========================================================================== */

.download-panel {
  margin-top: 22px;
  padding: 18px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.download-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.asset-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.asset-links a {
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 8px rgba(140, 130, 180, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.asset-links a:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.15) 100%
  );
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 16px rgba(140, 130, 180, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ===========================================================================
   BUTTONS
   =========================================================================== */

.btn {
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 46px;
  white-space: nowrap;
}

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

.btn-solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  box-shadow: 0 4px 12px rgba(91, 143, 249, 0.25);
}

.btn-solid:hover {
  box-shadow: 0 8px 18px rgba(91, 143, 249, 0.30);
}

.btn-ghost {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.12) 100%
  );
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.btn-ghost:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.18) 100%
  );
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 20px rgba(140, 130, 180, 0.12);
}

.button-row {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ===========================================================================
   ICON HELPERS
   =========================================================================== */

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
}

.github-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.play-icon {
  width: 18px;
  height: 18px;
}

/* ===========================================================================
   FEATURE CARDS
   =========================================================================== */

.features,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.feature {
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.feature:hover::before {
  transform: translateX(100%) rotate(45deg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 8px 24px rgba(91, 143, 249, 0.3);
  transition: all 0.3s ease;
}

.feature-icon i {
  font-size: 24px;
  color: white;
}

.feature:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 12px 32px rgba(91, 143, 249, 0.4);
}

.feature h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.feature a {
  color: var(--accent);
  font-weight: 500;
  word-break: break-word;
}

.feature a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ===========================================================================
   PANEL & LISTS
   =========================================================================== */

.panel {
  padding: clamp(22px, 4vw, 36px);
}

.panel h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
}

.list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 0 0 4px rgba(91, 143, 249, 0.12);
}

/* ===========================================================================
   KPI GRID (features page)
   =========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.kpi {
  padding: var(--spacing-lg);
  text-align: center;
}

.kpi h3 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: var(--spacing-xs);
  line-height: 1;
}

.kpi p {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===========================================================================
   FOOTER
   =========================================================================== */

footer,
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: auto;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 24px rgba(140, 130, 180, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.footer-brand .brand-badge.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(91, 143, 249, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-links {
  display: flex;
  gap: 8px;
}

.footer-links a {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: linear-gradient(135deg, rgba(91, 143, 249, 0.2) 0%, rgba(91, 143, 249, 0.1) 100%);
  border-color: rgba(91, 143, 249, 0.35);
  color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(91, 143, 249, 0.2);
}

.footer-social i {
  font-size: 18px;
}

.footer-copyright {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ===========================================================================
   SCROLL PROGRESS BAR
   =========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent-light);
}

/* ===========================================================================
   AMBIENT GLOW
   =========================================================================== */

.ambient-glow {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 143, 249, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(111, 160, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(91, 143, 249, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: ambientPulse 15s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

/* ===========================================================================
   LEGAL PAGES (privacy, terms, legal)
   =========================================================================== */

.legal-page {
  padding: var(--spacing-xl);
  max-width: 900px;
  margin: 0 auto;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.legal-page .updated {
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.legal-page h2 {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 600;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.legal-page h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  margin-top: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.legal-page h3 i {
  color: var(--accent);
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.legal-page p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
}

.legal-page a {
  color: var(--accent);
  font-weight: 500;
}

.legal-page a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.legal-page ul {
  margin: 0 0 var(--spacing-md) var(--spacing-md);
  color: var(--text-secondary);
}

.legal-page li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--spacing-lg);
  padding: 12px 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(140, 130, 180, 0.06);
}

.back-home:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.18) 100%
  );
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--text-primary);
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(140, 130, 180, 0.1);
}

/* ===========================================================================
   FEATURE CARD (legal page)
   =========================================================================== */

.feature-card {
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .feature-card {
  background: linear-gradient(135deg, rgba(15, 23, 38, 0.46), rgba(8, 13, 24, 0.32));
  border-color: rgba(196, 232, 255, 0.12);
}

.feature-card p {
  margin-bottom: var(--spacing-sm);
}

.feature-card ul {
  margin-bottom: 0;
}

/* ===========================================================================
   ANIMATIONS
   =========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */

@media (max-width: 900px) {
  .features,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 20px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 32px 20px;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.15;
  }

  .hero p,
  .hero > p {
    font-size: 16px;
    line-height: 1.6;
  }

  .feature {
    padding: var(--spacing-md);
  }

  .feature h3 {
    font-size: 18px;
  }

  .feature p {
    font-size: 15px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .feature-icon i {
    font-size: 20px;
  }

  .panel {
    padding: 24px 20px;
  }

  .panel h2 {
    font-size: 20px;
  }

  .download-panel {
    padding: 18px 16px;
  }

  .legal-page {
    padding: 28px 20px;
  }

  .legal-page h1 {
    font-size: 32px;
    line-height: 1.15;
  }

  .legal-page h2 {
    font-size: 20px;
    margin-top: 32px;
  }

  .legal-page h3 {
    font-size: 17px;
  }

  .legal-page p {
    font-size: 16px;
    line-height: 1.7;
  }

  .legal-page li {
    font-size: 15px;
  }

  .feature-card {
    padding: 18px 16px;
  }

  footer,
  .footer {
    padding: 28px 20px;
  }

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

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .footer-links a {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
  }

  .footer-social {
    justify-content: center;
    gap: 12px;
  }

  .footer-social a {
    width: 48px;
    height: 48px;
  }

  .footer-social i {
    font-size: 18px;
  }

  .back-home {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 14px 20px;
  }
}

@media (max-width: 380px) {
  .shell {
    padding: 12px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .hero {
    padding: 24px 16px;
  }

  .feature {
    padding: 20px 16px;
  }

  .panel {
    padding: 20px 16px;
  }

  .legal-page {
    padding: 24px 16px;
  }

  .legal-page h1 {
    font-size: 28px;
  }

  .feature-card {
    padding: 16px 14px;
  }

  .pill {
    font-size: 15px;
  }
}
