/* ==========================================================================
   TANGENT GLOBAL BASE STYLES & LAYOUT SYSTEM
   ========================================================================== */
:root {
  --bg-base: #08090d;
  --bg-surface: #0e111a;
  --bg-card: #131724;
  --bg-card-hover: #191e30;
  --border-color: #1f273b;
  --border-highlight: rgba(0, 210, 255, 0.4);
  --accent: #00d2ff;
  --accent-glow: rgba(0, 210, 255, 0.18);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
  padding-top: 60px; /* Offset for fixed global nav */
}

/* Global Media & Responsive Restraint */
img, canvas, video, svg, iframe {
  max-width: 100%;
  height: auto;
}

/* Global Navigation */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  height: 60px;
  flex-shrink: 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
}

.toolkit-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.toolkit-toggle-btn:hover,
body.sidebar-open .toolkit-toggle-btn {
  color: #ffffff;
  background-color: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.15);
}

.toolkit-toggle-btn .sidebar-icon {
  color: #00d2ff;
  transition: transform 0.2s ease;
}

body.sidebar-open .toolkit-toggle-btn .sidebar-icon {
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Collapsible Push-Sidebar */
.tangent-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  box-sizing: border-box !important;
  background: #0f131f;
  background: linear-gradient(180deg, #131826 0%, #0c0f18 100%);
  border-right: 1px solid rgba(0, 210, 255, 0.18);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 2500;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.sidebar-open .tangent-sidebar {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #00d2ff;
}

.sidebar-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sidebar-close-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-nav-list::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav-list::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav-list::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.2);
  border-radius: 4px;
}
.sidebar-nav-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 255, 0.5);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 2px;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-group-title:hover, .sidebar-group.open .sidebar-group-title {
  color: #00d2ff;
  background-color: rgba(0, 210, 255, 0.05);
}

.sidebar-group-title::after {
  content: "▼";
  font-size: 0.5rem;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.sidebar-group-content {
  display: none;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group.open .sidebar-group-content {
  display: flex;
}

.sidebar-group.open .sidebar-group-title::after {
  transform: rotate(180deg);
  opacity: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sidebar-item:hover {
  background-color: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.2);
  transform: translateX(2px);
}

.sidebar-item.active {
  background-color: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

.sidebar-item svg {
  flex-shrink: 0;
}

.sidebar-item .item-text {
  flex: 1;
  min-width: 0;
}

.sidebar-item .item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item:hover .item-title,
.sidebar-item.active .item-title {
  color: #00d2ff;
}

.sidebar-item .item-desc {
  font-size: 0.70rem;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App Canvas Push (Desktop) */
.app-canvas {
  width: 100%;
  box-sizing: border-box;
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 961px) {
  body.sidebar-open .app-canvas {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
  }
}

/* Mobile Overlay Mode */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2400;
}

@media (max-width: 960px) {
  .tangent-sidebar {
    top: 0 !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    z-index: 2500 !important;
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .global-nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
}

/* Clean Hero Header & Badges */
.clean-header {
  text-align: center;
  padding: 44px 20px 24px;
}

.badge-pill, .privacy-shield-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: #00d2ff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.feature-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.feature-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.feature-item svg {
  color: var(--accent-emerald);
}

/* Educational / SEO Article & FAQs */
.seo-article {
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  padding-top: 48px;
}

.seo-article h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.seo-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 28px 0 12px 0;
  color: var(--accent);
}

.seo-article p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.seo-article ul {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 24px;
  padding-left: 20px;
}

.seo-article li {
  margin-bottom: 8px;
}

.seo-article li strong {
  color: #ffffff;
}

/* ==========================================================================
   FEATURE TILES & FAQ ARCHITECTURE (Standardized across all pages)
   ========================================================================== */
.info-section {
  max-width: 1080px;
  margin: 60px auto 40px auto;
  padding: 50px 20px 0 20px;
  border-top: 1px solid #1f2533;
  width: 100%;
  box-sizing: border-box;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.feature-card {
  background: #11141d;
  border: 1px solid #1f2533;
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.feature-icon {
  margin-bottom: 16px;
  color: #00d2ff;
  display: inline-flex;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.feature-card h3 span { color: #00d2ff; }

.feature-card p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.faq-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: left;
  margin-bottom: 24px;
  color: #ffffff;
}

.faq-box {
  background: #11141d;
  border: 1px solid #1f2533;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  text-align: left;
}

.faq-box details {
  padding: 0;
  margin: 0;
}

.faq-box summary {
  padding: 18px 24px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  color: #f1f5f9;
  outline: none;
  list-style: none;
  text-align: left;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.faq-box summary:hover {
  color: #00d2ff;
  background-color: rgba(0, 210, 255, 0.03);
}

.faq-box summary::-webkit-details-marker { display: none; }

.faq-box p {
  padding: 0 24px 20px 24px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
  font-size: 0.95rem;
  text-align: left;
}

/* Global 2-Line Footer */
.global-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  background-color: var(--bg-base);
  margin-top: auto;
}

.global-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  margin: 0 12px;
}

.global-footer a:hover {
  color: var(--accent);
}

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

/* Master Mobile Grid Override */
@media (max-width: 768px) {
  .grid-container,
  .features-grid,
  .setup-grid,
  .trust-grid {
    grid-template-columns: 1fr !important;
  }
}
