/**
 * NAMA SYSTEMS & INTELLIGENCE - MASTER STYLESHEET
 * Brand: The Synapse Circuit (Laser Cyan, Terminal Emerald, Hyper Cobalt, Obsidian Slate)
 * Standards: WCAG 2.1 AA/AAA Compliant, Swiss Modular Layout, Responsive Mobile Drawer
 * Privacy: 100% Self-Hosted WOFF2 Fonts (Zero Data Egress, Air-Gapped Ready)
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/Inter-800.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-700.woff2') format('woff2');
}

:root {
  /* Canvas & Surfaces */
  --canvas: #F8FAFC;              /* Slate-50: Clean anti-fatigue substrate */
  --canvas-subtle: #F1F5F9;       /* Slate-100: Secondary surfaces & input fills */
  --card: #FFFFFF;                /* Pure White: High contrast card background */
  
  /* Brand Core Hues (The Synapse Circuit) */
  --brand-cyan: #00E5FF;          /* Laser Cyan: AI Core & Neural Highlight */
  --brand-emerald: #10B981;       /* Terminal Emerald: IoT Edge & Telemetry */
  --brand-cobalt: #3B82F6;        /* Hyper Cobalt: Base software systems identity */
  --brand-obsidian: #0F172A;      /* Obsidian Slate: Deep architectural substrate */
  --brand-carbon: #030712;        /* Pitch Carbon: Maximum dark terminal contrast */

  /* Interactive Primary (WCAG AA & AAA Calibrated) */
  --primary: #2563EB;             /* Cobalt 600: Contrast 5.17:1 on #FFFFFF (PASS AA) */
  --primary-hover: #1D4ED8;       /* Cobalt 700: Contrast 6.70:1 on #FFFFFF (PASS AAA) */
  --primary-active: #1E40AF;      /* Cobalt 800: Contrast 8.50:1 on #FFFFFF (PASS AAA) */
  --primary-subtle: #EFF6FF;      /* Cobalt 50: Interactive container & tag backing */
  --primary-border: #BFDBFE;      /* Cobalt 200: Subtle focus & interactive border */

  /* Typography Colors */
  --text-pri: #0F172A;            /* Slate 900: High-fidelity readability (16.2:1) */
  --text-sec: #334155;            /* Slate 700: Ergonomic body copy (9.8:1) */
  --text-mut: #475569;            /* Slate 600: Auxiliary & metadata (6.12:1 PASS AA/AAA) */

  /* Structural Borders */
  --border: #E2E8F0;              /* Slate 200: Crisp geometric boundaries */
  --border-subtle: #F1F5F9;       /* Slate 100: Ultra-light internal dividers */
  --border-dark: #CBD5E1;         /* Slate 300: High-visibility form input border */

  /* Spatial Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.10), 0 4px 8px -2px rgba(15, 23, 42, 0.05);

  /* Radius & Geometry */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Typography Scales */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--canvas);
  color: var(--text-pri);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   NAVBAR & RESPONSIVE MOBILE DRAWER (BUG-01 RESOLUTION)
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

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

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-pri);
}

.brand-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  background: var(--canvas-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-mut);
  font-family: var(--font-mono);
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sec);
  transition: color 0.15s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger Toggle Button (Apple HIG & Material 44x44px minimum) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
}

.nav-toggle:hover {
  background: var(--canvas-subtle);
  border-color: var(--border-dark);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text-pri);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 198;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-backdrop.open,
.nav-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.15);
  z-index: 199;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-drawer.open,
.mobile-drawer.active {
  transform: translateX(0);
  visibility: visible;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-pri);
  transition: all 0.15s ease;
}

.drawer-close:hover {
  background: var(--canvas-subtle);
  border-color: var(--border-dark);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-pri);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: block;
}

.drawer-link:hover, .drawer-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   BUTTONS (WCAG 2.1 AA/AAA Compliant)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--primary-active);
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-pri);
}

.btn-outline:hover {
  background: var(--canvas-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   BADGES (Recalibrated for WCAG Contrast > 5:1)
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.badge-blue {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #DBEAFE;
}

.badge-green {
  background: #ECFDF5;
  color: #047857;
  border-color: #D1FAE5;
}

.badge-red {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FEE2E2;
}

.badge-cyan {
  background: #ECFEFF;
  color: #0E7490;
  border-color: #CFFAFE;
}

/* ==========================================================================
   SECTIONS & TYPOGRAPHY
   ========================================================================== */

.page-hero {
  padding: 64px 0 48px;
}

.page-headline {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-pri);
  margin-bottom: 20px;
  max-width: 980px;
}

.page-subhead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-sec);
  max-width: 880px;
  margin-bottom: 32px;
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 40px;
}

.section-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-pri);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-sec);
  max-width: 840px;
  line-height: 1.6;
}

/* Cards & Elevation (Subtle depth across Home & Subpages) */
.pillar-card,
.step-card,
.founder-card,
.manifesto-card,
.inquiry-card,
.tech-highlight-card,
.case-card,
.track-card,
.academy-card,
.feature-box,
.callout-box,
.free-course-hero,
.compare-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
}

.pillar-card:hover,
.step-card:hover,
.founder-card:hover,
.case-card:hover,
.track-card:hover,
.academy-card:hover,
.callout-box:hover {
  transform: translateY(-2px);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-hover);
}

.pillar-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-pri);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.pillar-desc {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 24px;
}

.pillar-bullets {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 24px;
}

.pillar-bullet {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.6;
}

.pillar-bullet strong {
  display: block;
  color: var(--text-pri);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pillar-bullet span {
  color: var(--text-sec);
}

.pillar-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s ease;
}

.pillar-cta:hover {
  gap: 10px;
  color: var(--primary-hover);
}

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

.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 80px;
}

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

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-pri);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-mut);
  max-width: 380px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pri);
  margin-bottom: 16px;
}

.footer-col-list {
  list-style: none;
}

.footer-col-list li {
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 10px;
}

.footer-col-list a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 12px;
  color: var(--text-mut);
}

/* Section Scroll Margins */
#kontak {
  scroll-margin-top: 80px;
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE & TABLET VIEWPORT)
   ========================================================================== */

@media (max-width: 900px) {
  .page-headline { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links, .navbar .btn-primary { display: none; }
  .nav-toggle { display: flex; }
}

/* Gateway Flow Diagram Responsive */
.gateway-flow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.flow-arrow-down { display: none; }

@media (max-width: 768px) {
  .gateway-flow-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .flow-arrow-right { display: none; }
  .flow-arrow-down {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin: -4px 0;
  }
}

/* Samsat Metrics Grid (Legacy Alias mapping to .case-metrics-grid) */
.samsat-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 28px 0 32px;
}

/* Upcoming Products Catalog Grid */
.upcoming-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
@media (max-width: 900px) {
  .upcoming-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Mobile Inquiry Card Padding & Tab Fit */
@media (max-width: 600px) {
  .inquiry-card {
    padding: 24px 16px !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY & FORM STATE ENHANCEMENTS (WCAG 2.1 AA & Apple HIG Compliant)
   ========================================================================== */

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

/* Touch-Optimized Tabs (Minimum 44px Height) */
.tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
}

.tab-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--canvas-subtle);
  color: var(--text-sec);
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.tab-btn:hover {
  border-color: var(--border-dark);
  color: var(--text-pri);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* Recalibrated WhatsApp Action Button (Contrast > 5:1 on White Text - PASS WCAG AA) */
.btn-submit-wa {
  width: 100%;
  height: 48px;
  min-height: 48px;
  background: #047857;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-submit-wa:hover:not(:disabled) {
  background: #065F46;
}

.btn-submit-wa:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  opacity: 0.8;
}

/* Form Submission Feedback Banner */
.feedback-banner {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feedback-banner.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.feedback-banner.loading {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
}

.feedback-banner.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.feedback-banner.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* Harmonized Ahmygate Case Metric Grid (Matching Samsat Style) */
.case-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 28px 0 32px;
}

.case-metric-card {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
}

.case-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-dark);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.case-metric-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.case-metric-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pri);
  margin-top: 6px;
  margin-bottom: 2px;
}

.case-metric-desc {
  font-size: 11px;
  color: var(--text-mut);
}

@media (max-width: 900px) {
  .case-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 22px 0 26px;
  }
}

@media (max-width: 480px) {
  .case-metrics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 18px 0 22px;
  }
}

/* FAQ Accordion & Knowledge Graph Section (GEO / AI Search Optimization) */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.faq-item:hover,
.faq-item[open] {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pri);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

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

.faq-question::after {
  content: "+";
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
  margin-left: 12px;
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 22px 20px 22px;
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

