/* ==========================================================================
   KIBO.IS — Enterprise Privacy Operations Platform Design System
   Industry-Standard Color System with Full Dark Mode & Light Mode Support
   ========================================================================== */

:root, [data-theme="dark"] {
  /* Dark Theme Palette (Industry Standard: Linear / Vanta / Stripe Dark) */
  --bg-primary: #030712;
  --bg-surface: #0f172a;
  --bg-elevated: #1e293b;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(99, 102, 241, 0.4);
  --border-focus: #6366f1;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #030712;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #a855f7 100%);
  --gradient-hero-bg: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.06) 50%, transparent 100%);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] {
  /* Light Theme Palette (Industry Standard: OneTrust / Salesforce / Stripe Light) */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  
  --border-color: #e2e8f0;
  --border-hover: #6366f1;
  --border-focus: #4f46e5;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-inverse: #ffffff;
  
  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-cyan: #0891b2;
  --accent-purple: #9333ea;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  
  --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #0891b2 50%, #9333ea 100%);
  --gradient-hero-bg: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.08) 0%, rgba(8, 145, 178, 0.04) 50%, transparent 100%);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

/* Global Variables */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-width: 1280px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basic Setup */
*, *::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-main);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

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

button {
  cursor: pointer;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--accent-cyan);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

/* Container & Sections */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem auto;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Header Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--gradient-brand);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-main);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem 0;
  background: var(--gradient-hero-bg);
  position: relative;
  overflow: hidden;
}

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

.hero h1 { margin-bottom: 1.5rem; line-height: 1.15; }
.hero-subheadline {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

/* Product Screenshot Frame */
.product-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  margin: 0 auto;
  text-align: left;
}

.frame-header {
  height: 42px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
}

.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.frame-title {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.frame-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 520px;
}

.frame-sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem 1rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.sidebar-item.active, .sidebar-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

.frame-main {
  padding: 1.5rem;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.stat-val { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.stat-lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }

.widget-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Badges Grid */
.badges-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin-top: 2rem; }
.reg-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition);
}

.reg-badge:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-emerald); }

/* Feature Cards Grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; color: var(--text-main); }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* Integrations Logo Wall */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.logo-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.logo-item:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-elevated);
}

/* Pricing Grid */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: stretch; }
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  position: relative;
}

.pricing-card.featured::after {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.plan-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-main); }
.plan-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; min-height: 42px; }
.plan-price { font-size: 2.75rem; font-weight: 800; color: var(--text-main); margin-bottom: 1.5rem; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

.plan-features { list-style: none; margin-bottom: 2rem; flex-grow: 1; }
.plan-features li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.925rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.plan-features li::before { content: '✓'; color: var(--accent-emerald); font-weight: 800; }

/* FAQ Accordion */
.faq-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
}

.faq-question:hover { color: var(--accent-cyan); }
.faq-icon { font-size: 1.25rem; transition: transform 0.3s; }
.faq-answer { padding: 0 1.5rem 1.25rem 1.5rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; display: none; }
.faq-item.active .faq-answer { display: block; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* Forms */
.form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 480px;
  margin: 4rem auto;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-main); }
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.divider { display: flex; align-items: center; text-align: center; margin: 1.5rem 0; color: var(--text-subtle); font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.divider::before { margin-right: 0.75rem; }
.divider::after { margin-left: 0.75rem; }

.sso-buttons { display: flex; flex-direction: column; gap: 0.75rem; }

/* Footer */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 3rem; margin-bottom: 4rem; }
.footer-brand p { margin-top: 1rem; color: var(--text-subtle); max-width: 300px; }
.footer-col h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-main); margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a:hover { color: var(--text-main); }

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: none;
}

.cookie-banner.active { display: block; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Media Queries */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .frame-body { grid-template-columns: 1fr; }
  .frame-sidebar { display: none; }
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    display: none;
  }
  .nav-menu.active { display: flex; }
  .nav-actions { display: none; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .dash-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
