/* ==========================================================================
   FINLOG Design System & Master Stylesheet
   Brand Colors: Primary #005073, Primary Dark #003B59, Accent #FFCC00
   Font Family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif
   ========================================================================== */

:root {
  /* Brand Primitives */
  --color-brand-primary: #005073;
  --color-brand-dark: #003B59;
  --color-brand-accent: #FFCC00;
  --color-brand-accent-hover: #E6B800;
  --color-brand-sky: #2295E5;
  --color-brand-sky-light: #64C5FF;
  --color-brand-gold-glow: rgba(255, 204, 0, 0.25);
  --color-brand-blue-glow: rgba(0, 80, 115, 0.2);

  /* Light Theme (Default) */
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1F4F6;
  --bg-surface-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.7);
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-focus: var(--color-brand-primary);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --text-accent: #005073;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 12px 28px -6px rgba(0, 80, 115, 0.22);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --container-max: 1240px;
  --header-height: 76px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
  --bg-body: #060D13;
  --bg-surface: #0B1721;
  --bg-surface-alt: #10212F;
  --bg-surface-elevated: #152B3C;
  --bg-glass: rgba(11, 23, 33, 0.85);
  --bg-glass-card: rgba(16, 33, 47, 0.75);
  --border-subtle: #1C3549;
  --border-strong: #274862;
  --border-focus: var(--color-brand-accent);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #060D13;
  --text-accent: #FFCC00;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.65);
  --shadow-brand: 0 12px 30px -4px rgba(0, 80, 115, 0.45);
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography & Utility Classes
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-sky) 50%, var(--color-brand-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #78D2FF 0%, var(--color-brand-accent) 70%, #FFE57F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background-color: rgba(0, 80, 115, 0.08);
  color: var(--color-brand-primary);
  border: 1px solid rgba(0, 80, 115, 0.2);
}

[data-theme="dark"] .badge {
  background-color: rgba(255, 204, 0, 0.1);
  color: var(--color-brand-accent);
  border-color: rgba(255, 204, 0, 0.3);
}

.badge-gold {
  background-color: rgba(255, 204, 0, 0.15);
  color: #B45309;
  border: 1px solid rgba(255, 204, 0, 0.4);
}

[data-theme="dark"] .badge-gold {
  color: var(--color-brand-accent);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .badge-success {
  color: #34D399;
}

.badge-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand-primary) 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-brand);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -4px rgba(0, 80, 115, 0.35);
  filter: brightness(1.08);
}

.btn-accent {
  background: linear-gradient(135deg, #FFD52E 0%, var(--color-brand-accent) 100%);
  color: #003B59;
  font-weight: 700;
  box-shadow: 0 8px 20px -2px rgba(255, 204, 0, 0.35);
  border: 1px solid rgba(255, 204, 0, 0.5);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -2px rgba(255, 204, 0, 0.45);
  filter: brightness(1.05);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-alt);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-alt);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
}

.brand-logo-symbol {
  height: 38px;
  width: 38px;
}

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

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-brand-primary);
  border-radius: 2px;
}

[data-theme="dark"] .nav-link.active::after {
  background-color: var(--color-brand-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background-color: var(--bg-surface-alt);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface);
  padding: 24px;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 99;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 1.125rem;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, var(--color-brand-blue-glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  top: 120px;
  right: -100px;
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, var(--color-brand-gold-glow) 0%, transparent 70%);
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge-wrap {
  margin-bottom: 24px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-appstore-notice {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: -24px;
  margin-bottom: 48px;
}

/* Interactive Device Showcase */
.showcase-wrapper {
  margin-top: 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-frame {
  width: 100%;
  max-width: 380px;
  border-radius: 44px;
  background: #111;
  padding: 12px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.35), 0 18px 36px -18px rgba(0, 80, 115, 0.45);
  border: 4px solid #2B3540;
  position: relative;
  transition: transform var(--transition-bounce);
}

.device-frame:hover {
  transform: translateY(-6px);
}

.device-screen {
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  background: #000;
  aspect-ratio: 9 / 19.5;
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-pill {
  position: absolute;
  padding: 12px 18px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  backdrop-filter: blur(12px);
  z-index: 10;
  animation: float 4s ease-in-out infinite alternate;
}

.floating-pill-left {
  top: 28%;
  left: 10%;
  animation-delay: 0s;
}

.floating-pill-right {
  bottom: 22%;
  right: 10%;
  animation-delay: 1.5s;
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */
.section {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-header .badge {
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Architecture & Privacy Pillars Grid
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.pillar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-sky));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-strong);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background-color: rgba(0, 80, 115, 0.08);
  color: var(--color-brand-primary);
}

[data-theme="dark"] .pillar-icon-box {
  background-color: rgba(255, 204, 0, 0.12);
  color: var(--color-brand-accent);
}

.pillar-icon-box svg {
  width: 28px;
  height: 28px;
}

.pillar-title {
  font-size: 1.375rem;
  margin-bottom: 14px;
}

.pillar-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.pillar-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.spec-item svg {
  width: 16px;
  height: 16px;
  color: #10B981;
  flex-shrink: 0;
}

/* ==========================================================================
   Features Bento Grid
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.col-span-8 { grid-column: span 8; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-12 { grid-column: span 12; }

.bento-badge {
  align-self: flex-start;
  margin-bottom: 16px;
}

.bento-title {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.bento-text {
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

.bento-preview {
  margin-top: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Interactive Statement Importer Simulator
   ========================================================================== */
.simulator-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-top: 36px;
}

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

.simulator-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.step-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.step-card.active {
  border-color: var(--color-brand-primary);
  background-color: rgba(0, 80, 115, 0.05);
}

[data-theme="dark"] .step-card.active {
  border-color: var(--color-brand-accent);
  background-color: rgba(255, 204, 0, 0.05);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 12px;
}

[data-theme="dark"] .step-num {
  background-color: var(--color-brand-accent);
  color: #003B59;
}

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

.step-desc {
  font-size: 0.875rem;
}

.sim-output {
  border-radius: var(--radius-md);
  background-color: #0B1721;
  color: #E2E8F0;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-x: auto;
  border: 1px solid #1E293B;
}

/* ==========================================================================
   FINAI Section
   ========================================================================== */
.finai-section {
  background: linear-gradient(180deg, var(--bg-body) 0%, rgba(0, 80, 115, 0.04) 50%, var(--bg-body) 100%);
}

.finai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.finai-chat-mockup {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xl);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.chat-ai-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.chat-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.chat-bubble-user {
  align-self: flex-end;
  background-color: var(--color-brand-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-bubble-ai {
  align-self: flex-start;
  background-color: var(--bg-surface-alt);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.token-highlight {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 204, 0, 0.2);
  color: #B45309;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

[data-theme="dark"] .token-highlight {
  color: var(--color-brand-accent);
}

.chat-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background-color: var(--color-brand-primary);
  color: #fff;
  border-color: var(--color-brand-primary);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
}

.faq-icon {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-normal);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--color-brand-primary);
}

[data-theme="dark"] .faq-item.open .faq-icon {
  color: var(--color-brand-accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-bounce), padding var(--transition-fast);
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 24px 24px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

/* ==========================================================================
   Documentation / Legal / Policy Page Layout
   ========================================================================== */
.doc-page {
  padding: 60px 0 100px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.doc-sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.doc-toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-toc-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1.4;
  display: block;
}

.doc-toc-link:hover, .doc-toc-link.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-alt);
  font-weight: 600;
}

.doc-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  box-shadow: var(--shadow-sm);
}

.doc-header {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

.doc-meta {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Callouts & Alert Boxes */
.callout {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  border-left: 4px solid;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.callout-info {
  background-color: rgba(0, 80, 115, 0.06);
  border-left-color: var(--color-brand-primary);
  color: var(--text-primary);
}

[data-theme="dark"] .callout-info {
  background-color: rgba(34, 149, 229, 0.1);
  border-left-color: var(--color-brand-sky);
}

.callout-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-left-color: #F59E0B;
  color: var(--text-primary);
}

.callout-success {
  background-color: rgba(16, 185, 129, 0.08);
  border-left-color: #10B981;
  color: var(--text-primary);
}

.callout-todo {
  background-color: rgba(239, 68, 68, 0.08);
  border-left-color: #EF4444;
  color: var(--text-primary);
}

.todo-badge {
  display: inline-block;
  padding: 2px 8px;
  background-color: #EF4444;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 8px;
}

/* Prose formatting */
.prose h2 {
  font-size: 1.625rem;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.prose h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 14px;
}

.prose p {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose ul, .prose ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9375rem;
}

.prose th, .prose td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.prose th {
  background-color: var(--bg-surface-alt);
  font-weight: 600;
  color: var(--text-primary);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 3px 8px;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  color: var(--color-brand-primary);
  border: 1px solid var(--border-subtle);
}

[data-theme="dark"] .prose code {
  color: var(--color-brand-accent);
}

.prose pre {
  background-color: #0A141D;
  color: #E2E8F0;
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 28px 0;
  border: 1px solid #1C3549;
}

.prose pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 40px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 320px;
  font-size: 0.9375rem;
}

.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-brand-primary);
}

[data-theme="dark"] .footer-link:hover {
  color: var(--color-brand-accent);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

/* ==========================================================================
   Responsive Breakpoints & Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .col-span-8, .col-span-4, .col-span-6, .col-span-12 {
    grid-column: span 1;
  }

  .finai-grid {
    grid-template-columns: 1fr;
  }

  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .hero-section {
    padding: 56px 0 40px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .device-frame {
    max-width: 320px;
  }

  .floating-pill {
    display: none;
  }

  .doc-content {
    padding: 32px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
