/* ============================================================
   BudgeTUI Landing Page — Styles
   Catppuccin Mocha Theme
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --ctp-crust: #11111b;
  --ctp-mantle: #181825;
  --ctp-base: #1e1e2e;
  --ctp-surface0: #313244;
  --ctp-surface1: #45475a;
  --ctp-surface2: #585b70;
  --ctp-overlay0: #6c7086;
  --ctp-overlay1: #7f849c;
  --ctp-subtext0: #a6adc8;
  --ctp-text: #cdd6f4;
  --ctp-lavender: #b4befe;
  --ctp-blue: #89b4fa;
  --ctp-sapphire: #74c7ec;
  --ctp-teal: #94e2d5;
  --ctp-green: #a6e3a1;
  --ctp-yellow: #f9e2af;
  --ctp-peach: #fab387;
  --ctp-red: #f38ba8;
  --ctp-mauve: #cba6f7;
  --ctp-pink: #f5c2e7;

  --blue-1: #c6dbfc;
  --blue-2: #b4d0fa;
  --blue-3: #a2c5f8;
  --blue-4: #93baf6;
  --blue-5: #84aff4;
  --blue-6: #75a4f0;
  --blue-7: #6699ea;
  --blue-8: #578ce2;
  --blue-9: #487fda;
  --blue-10: #3a72d0;
  --blue-11: #2d65c6;
  --blue-12: #2158bc;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;

  --shadow-md: 2px 4px 8px 2px rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(137, 180, 250, 0.15);

  --nav-height: 64px;
  --max-width: 1200px;
  --section-padding: 120px 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--ctp-base);
  color: var(--ctp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--ctp-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ctp-lavender);
}

/* --- Navigation --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

#nav.scrolled {
  background-color: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(69, 71, 90, 0.5);
}

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

.navLogo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ctp-text);
  letter-spacing: -0.02em;
}

.navLogo:hover {
  color: var(--ctp-text);
}

.prompt {
  color: var(--ctp-blue);
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navLinks a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ctp-subtext0);
  transition: color 0.2s;
}

.navLinks a:hover {
  color: var(--ctp-text);
}

/* Mobile Menu */
.mobileMenuBtn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobileMenuBtn span {
  width: 24px;
  height: 2px;
  background-color: var(--ctp-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobileMenuBtn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobileMenuBtn.active span:nth-child(2) {
  opacity: 0;
}

.mobileMenuBtn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobileMenu {
  display: none;
  flex-direction: column;
  background-color: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 24px;
  gap: 16px;
  border-bottom: 1px solid var(--ctp-surface1);
}

.mobileMenu.open {
  display: flex;
}

.mobileMenu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ctp-subtext0);
  padding: 8px 0;
}

.mobileMenu a:hover {
  color: var(--ctp-text);
}

/* --- Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 24px 120px;
  min-height: 100vh;
}

.heroContent {
  flex: 1;
  max-width: 480px;
}

.heroTitle {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.accent {
  color: var(--ctp-blue);
}

.heroSub {
  font-size: 1.15rem;
  color: var(--ctp-subtext0);
  line-height: 1.7;
  margin-bottom: 32px;
}

.heroCtas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btnPrimary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background-color: var(--ctp-blue);
  color: var(--ctp-crust);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btnPrimary:hover {
  background-color: var(--ctp-lavender);
  color: var(--ctp-crust);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(137, 180, 250, 0.3);
}

.btnSecondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background-color: transparent;
  color: var(--ctp-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid var(--ctp-surface1);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.btnSecondary:hover {
  border-color: var(--ctp-blue);
  color: var(--ctp-blue);
  transform: translateY(-2px);
}

.heroTerminal {
  flex: 1.2;
  max-width: 620px;
}

/* --- Terminal Window --- */
.terminal {
  background-color: var(--ctp-crust);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--ctp-surface0);
}

.terminalBar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--ctp-mantle);
  border-bottom: 1px solid var(--ctp-surface0);
}

.terminalDots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dotRed {
  background-color: var(--ctp-red);
}

.dotYellow {
  background-color: var(--ctp-yellow);
}

.dotGreen {
  background-color: var(--ctp-green);
}

.terminalTitle {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ctp-overlay1);
}

.terminalSpacer {
  width: 52px;
}

.terminalBody {
  padding: 16px;
  overflow-x: auto;
}

/* Terminal text colors */
.tText { color: var(--ctp-text); }
.tDim { color: var(--ctp-overlay0); }
.tSubtext { color: var(--ctp-subtext0); }
.tBlue { color: var(--ctp-blue); }
.tGreen { color: var(--ctp-green); }
.tRed { color: var(--ctp-red); }
.tYellow { color: var(--ctp-yellow); }
.tMauve { color: var(--ctp-mauve); }
.tPeach { color: var(--ctp-peach); }
.tTeal { color: var(--ctp-teal); }

/* Terminal background colors */
.tBgBlue { background-color: var(--ctp-blue); }
.tBgBlue1 { background-color: var(--blue-1); }
.tBgBlue2 { background-color: var(--blue-2); }
.tBgBlue3 { background-color: var(--blue-3); }
.tBgBlue4 { background-color: var(--blue-4); }
.tBgBlue5 { background-color: var(--blue-5); }
.tBgBlue6 { background-color: var(--blue-6); }
.tBgBlue7 { background-color: var(--blue-7); }
.tBgBlue8 { background-color: var(--blue-8); }
.tBgBlue9 { background-color: var(--blue-9); }
.tBgBlue10 { background-color: var(--blue-10); }
.tBgBlue11 { background-color: var(--blue-11); }
.tBgBlue12 { background-color: var(--blue-12); }

/* --- Terminal UI Components --- */

/* Hint bar (replaces old tab bar) */
.termHintBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: var(--ctp-mantle);
  border-radius: 2px;
}

.termHintScreen {
  font-weight: 700;
}

.termHintNav {
  font-size: 0.7rem;
}

.termDivider {
  height: 1px;
  background-color: var(--ctp-surface0);
  margin: 8px 0;
}

.termContent {
  padding: 8px 4px;
}

/* Card rows (debit + credit) */
.termCardRow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.termCards {
  display: flex;
  gap: 12px;
}

.termCard {
  flex: 1;
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-align: center;
  border: 1px solid;
}

.termCardBlue { border-color: var(--ctp-blue); }
.termCardRed { border-color: var(--ctp-red); }
.termCardGreen { border-color: var(--ctp-green); }

.termCardLabel {
  font-size: 0.65rem;
  color: var(--ctp-subtext0);
  margin-bottom: 4px;
}

.termCardValue {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Net Worth row */
.termNetWorth {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--ctp-surface1);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.termNetWorthValue {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Spending bars */
.termSection {
  margin-bottom: 16px;
}

.termSectionTitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ctp-subtext0);
  margin-bottom: 8px;
}

.termBarRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.termBarLabel {
  width: 110px;
  flex-shrink: 0;
  color: var(--ctp-text);
  text-align: right;
}

.termBar {
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  max-width: 250px;
}

.termBarValue {
  flex-shrink: 0;
  color: var(--ctp-text);
  margin-left: auto;
}

/* Sparkline */
.termSparkline {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
}

.sparkBar {
  flex: 1;
  background-color: var(--ctp-blue);
  border-radius: 2px 2px 0 0;
  min-width: 8px;
}

.termSparkLabels {
  display: flex;
  gap: 6px;
  padding: 4px 8px 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ctp-overlay0);
}

.termSparkLabels span {
  flex: 1;
  text-align: center;
  min-width: 8px;
}

/* Status bar */
.termStatusBar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px;
}

.termStatusMode {
  background-color: var(--ctp-blue);
  color: var(--ctp-crust);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.7rem;
}

.termStatusSearch {
  background-color: var(--ctp-yellow);
}

.termStatusRight {
  margin-left: auto;
}

/* --- Account Cards --- */
.termAccountCards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.termAccountCard {
  border: 1px solid var(--ctp-surface1);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.termAccountSelected {
  border-color: var(--ctp-blue);
  background-color: rgba(137, 180, 250, 0.05);
}

.termAccountHeader {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.termAccountName {
  font-weight: 600;
}

.termAccountStats {
  display: flex;
  gap: 24px;
  margin-bottom: 4px;
}

.termAccountBalance {
  font-size: 0.8rem;
}

/* --- Budget Progress Bars --- */
.termBudgetList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.termBudgetRow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.termBudgetHeader {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.termProgressBar {
  height: 8px;
  background-color: var(--ctp-surface0);
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  width: calc(100% - 50px);
  vertical-align: middle;
}

.termProgressFill {
  height: 100%;
  border-radius: 4px;
}

.termProgressGreen {
  background-color: var(--ctp-green);
}

.termProgressYellow {
  background-color: var(--ctp-yellow);
}

.termProgressRed {
  background-color: var(--ctp-red);
}

.termBudgetPct {
  display: inline-block;
  width: 40px;
  text-align: right;
  vertical-align: middle;
  margin-left: 8px;
  font-weight: 600;
}

/* --- Import Step Indicator --- */
.termImportSteps {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 12px;
}

.termImportStepActive {
  background-color: var(--ctp-blue);
  color: var(--ctp-crust);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
}

/* Import account list */
.termAccountList {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.termAccountListItem {
  padding: 5px 8px;
  color: var(--ctp-text);
}

.termAccountListSelected {
  background-color: rgba(137, 180, 250, 0.15);
  border-radius: 2px;
  color: var(--ctp-blue);
  font-weight: 600;
}

/* Terminal Table */
.termTable {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.termTable th {
  text-align: left;
  color: var(--ctp-subtext0);
  padding: 4px 8px;
  border-bottom: 1px solid var(--ctp-surface0);
  font-weight: 500;
}

.termTable td {
  padding: 5px 8px;
  color: var(--ctp-text);
  white-space: nowrap;
}

.termTable .alignRight {
  text-align: right;
}

.termTableAlt td {
  background-color: rgba(69, 71, 90, 0.15);
}

.termTableFooter {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 8px 8px 4px;
}

.termSearchBar {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 4px 0;
  border-top: 1px solid var(--ctp-surface0);
  margin-top: 4px;
}

.termCursor {
  color: var(--ctp-blue);
  animation: blink 1s infinite;
}

.termSearchCount {
  margin-left: auto;
}

/* Import panel */
.termImportTitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.termImportDetect {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.termImportField {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

.termImportStats {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* Categories panel */
.termSplitPanels {
  display: flex;
  gap: 12px;
}

.termPanel {
  flex: 1;
  border: 1px solid var(--ctp-surface0);
  border-radius: 4px;
  padding: 10px 12px;
  min-height: 200px;
}

.termPanelActive {
  border-color: var(--ctp-blue);
}

.termPanelTitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Flat category list */
.termCategoryList {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.termCategoryItem {
  padding: 3px 8px;
}

.termCategorySelected {
  background-color: rgba(137, 180, 250, 0.1);
  border-radius: 2px;
}

.termRulesFor {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.termRuleRow {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 0;
}

.termRuleCount {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: 10px;
}

/* --- Section Common Styles --- */
.sectionTitle {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.sectionSub {
  font-size: 1.1rem;
  color: var(--ctp-subtext0);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* --- Features Section --- */
.features {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.featuresGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.featureCard {
  flex: 1 1 340px;
  max-width: 380px;
  padding: 32px;
  background-color: var(--ctp-surface0);
  border-radius: 12px;
  border: 1px solid var(--ctp-surface1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.featureCard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.featureIcon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.featureCard h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ctp-text);
}

.featureCard p {
  font-size: 0.95rem;
  color: var(--ctp-subtext0);
  line-height: 1.6;
}

/* --- Demo Section --- */
.demo {
  padding: var(--section-padding);
  max-width: 900px;
  margin: 0 auto;
}

.demoContainer {
  margin-top: 0;
}

.demoTabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  padding: 0 8px;
}

.demoTab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 20px;
  background-color: var(--ctp-mantle);
  color: var(--ctp-overlay0);
  border: 1px solid var(--ctp-surface0);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.demoTab:hover {
  color: var(--ctp-text);
}

.demoTab.active {
  background-color: var(--ctp-crust);
  color: var(--ctp-blue);
  font-weight: 600;
  border-color: var(--ctp-surface0);
}

.demoPanel {
  display: none;
}

.demoPanel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Connect tabs to terminal */
.demoContainer .terminal {
  border-top-left-radius: 0;
}

/* --- Banks Section --- */
.banks {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.bankGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.bankBadge {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 24px;
  background-color: var(--ctp-surface0);
  color: var(--ctp-text);
  border-radius: 10px;
  border: 1px solid var(--ctp-surface1);
  transition: border-color 0.2s, transform 0.2s;
}

.bankBadge:hover {
  border-color: var(--ctp-blue);
  transform: translateY(-2px);
}

.bankBadgeMore {
  color: var(--ctp-blue);
  font-style: italic;
  border-style: dashed;
}

/* --- Why Section --- */
.why {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--ctp-mantle);
}

.whyGrid {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.whyCard {
  flex: 1 1 280px;
  max-width: 320px;
  text-align: center;
  padding: 32px 24px;
}

.whyIcon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.whyCard h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ctp-text);
}

.whyCard p {
  font-size: 0.95rem;
  color: var(--ctp-subtext0);
  line-height: 1.6;
}

/* --- Install Section --- */
.install {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.installGrid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 640px;
  margin: 0 auto;
}

.installBlock h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ctp-subtext0);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.codeBlock {
  position: relative;
  background-color: var(--ctp-crust);
  border-radius: 10px;
  border: 1px solid var(--ctp-surface0);
  overflow: hidden;
}

.codePre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 20px 24px;
  margin: 0;
  color: var(--ctp-text);
  white-space: pre;
  overflow-x: auto;
}

.copyBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  background-color: var(--ctp-surface0);
  color: var(--ctp-subtext0);
  border: 1px solid var(--ctp-surface1);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.copyBtn:hover {
  background-color: var(--ctp-surface1);
  color: var(--ctp-text);
}

.copyBtn.copied {
  background-color: rgba(166, 227, 161, 0.2);
  color: var(--ctp-green);
  border-color: rgba(166, 227, 161, 0.3);
}

.installNote {
  font-size: 0.85rem;
  color: var(--ctp-overlay1);
  margin-top: 8px;
}

/* --- Keybindings Section --- */
.keys {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--ctp-mantle);
}

.keysGrid {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.keysColumn {
  flex: 1 1 300px;
  max-width: 360px;
}

.keysColumn h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ctp-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ctp-surface1);
}

.keyRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(69, 71, 90, 0.3);
  font-size: 0.9rem;
}

.keyRow span {
  color: var(--ctp-subtext0);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 3px 8px;
  background-color: var(--ctp-surface0);
  color: var(--ctp-text);
  border-radius: 4px;
  border: 1px solid var(--ctp-surface1);
  border-bottom: 2px solid var(--ctp-surface1);
  white-space: nowrap;
}

/* --- Footer --- */
.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--ctp-surface0);
}

.footerInner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footerTagline {
  font-size: 0.85rem;
  color: var(--ctp-overlay0);
  margin-top: 4px;
}

.footerLinks {
  display: flex;
  gap: 24px;
}

.footerLinks a {
  font-size: 0.85rem;
  color: var(--ctp-overlay1);
}

.footerLinks a:hover {
  color: var(--ctp-blue);
}

.footerBuilt {
  font-size: 0.8rem;
  color: var(--ctp-overlay0);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for children */
.featuresGrid .reveal:nth-child(1) { transition-delay: 0s; }
.featuresGrid .reveal:nth-child(2) { transition-delay: 0.08s; }
.featuresGrid .reveal:nth-child(3) { transition-delay: 0.16s; }
.featuresGrid .reveal:nth-child(4) { transition-delay: 0.24s; }
.featuresGrid .reveal:nth-child(5) { transition-delay: 0.32s; }
.featuresGrid .reveal:nth-child(6) { transition-delay: 0.4s; }

.whyGrid .reveal:nth-child(1) { transition-delay: 0s; }
.whyGrid .reveal:nth-child(2) { transition-delay: 0.1s; }
.whyGrid .reveal:nth-child(3) { transition-delay: 0.2s; }

.keysGrid .reveal:nth-child(1) { transition-delay: 0s; }
.keysGrid .reveal:nth-child(2) { transition-delay: 0.1s; }

/* --- Cursor Blink for Terminal --- */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .demoPanel.active {
    animation: none;
  }

  .featureCard,
  .bankBadge,
  .btnPrimary,
  .btnSecondary {
    transition: none;
  }

  .termCursor {
    animation: none;
    opacity: 1;
  }
}

/* --- Responsive --- */
@media screen and (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
    gap: 48px;
  }

  .heroContent {
    max-width: 600px;
  }

  .heroCtas {
    justify-content: center;
  }

  .heroTerminal {
    max-width: 100%;
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --section-padding: 80px 16px;
  }

  .navLinks {
    display: none;
  }

  .mobileMenuBtn {
    display: flex;
  }

  #nav {
    height: auto;
  }

  .navInner {
    height: var(--nav-height);
  }

  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .heroTitle {
    font-size: 2rem;
  }

  .heroSub {
    font-size: 1rem;
  }

  .demoTabs {
    flex-wrap: wrap;
  }

  .demoTab {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .featureCard {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .keysGrid {
    gap: 32px;
  }

  .keysColumn {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .codePre {
    font-size: 0.8rem;
    padding: 16px;
  }

  .bankBadge {
    font-size: 0.85rem;
    padding: 10px 18px;
  }

  .termCards {
    flex-direction: column;
    gap: 8px;
  }

  .termBarLabel {
    width: 85px;
    font-size: 0.65rem;
  }

  .termBar {
    max-width: 150px;
  }

  .termBarValue {
    font-size: 0.65rem;
  }

  .termSplitPanels {
    flex-direction: column;
  }

  .termPanel {
    min-height: auto;
  }

  .termTable {
    font-size: 0.6rem;
  }

  .termTable th,
  .termTable td {
    padding: 3px 4px;
  }

  .termAccountStats {
    flex-direction: column;
    gap: 4px;
  }
}

@media screen and (max-width: 480px) {
  .terminalBody {
    padding: 12px 8px;
  }

  .heroCtas {
    flex-direction: column;
    align-items: center;
  }

  .btnPrimary,
  .btnSecondary {
    width: 100%;
    justify-content: center;
  }

  .termHintBar {
    font-size: 0.65rem;
  }

  .termHintNav {
    font-size: 0.6rem;
  }

  .termCardValue {
    font-size: 0.8rem;
  }

  .termBarLabel {
    width: 70px;
    font-size: 0.6rem;
  }

  .termBar {
    max-width: 100px;
  }

  .termStatusBar {
    font-size: 0.6rem;
    gap: 8px;
    flex-wrap: wrap;
  }

  .termStatusRight {
    display: none;
  }
}
