/* ============================================================
   ZehnX Base Design System — /css/base.css
   Single source of truth for tokens, reset, nav, footer, buttons.
   All active pages must link this file.
   ============================================================ */

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

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-alt: #F5F5F3;
  --text: #18181B;
  --text2: #52525B;
  --text3: #52525B;
  --muted: #52525B;
  --accent: #18181B;
  --accent-hover: #000;
  --border: #E4E4E7;
  --border-subtle: #F0F0EE;

  /* Semantic */
  --green: #22C55E;
  --green-light: #F0FDF4;
  --blue: #2563EB;
  --blue-light: #EFF6FF;
  --warm: #D97706;
  --warm-light: #FFFBEB;
  --violet: #7C3AED;
  --violet-light: #F5F3FF;
  --red: #DC2626;

  /* Radius */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease);
  --transition: 0.25s var(--ease);
  --transition-slow: 0.4s var(--ease);

  /* Typography */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
}

/* --- Focus States (A11y) --- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Reduced Motion (A11y) --- */
@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;
  }
}

/* --- Gradient Bar --- */
.grad-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7C3AED, #2563EB, #16A34A);
  z-index: 200;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}

nav.scrolled {
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.nav-in {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.nav-logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { font-weight: 300; color: var(--text3); }

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

.nav-links a {
  padding: 10px 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--surface) !important;
  background: var(--accent);
  padding: 9px 22px;
  border-radius: 100px;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* --- Mobile Menu --- */
.mob-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mob-menu.open { display: flex; }

.mob-menu a {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.mob-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text);
}

/* --- Utility Classes --- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap-content { max-width: 680px; margin: 0 auto; padding: 0 24px; }

.sec { padding: var(--space-4xl) 0; }

.sec-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}

.sec-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.sec-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 540px;
  line-height: 1.7;
}

.sec-head { margin-bottom: 52px; }
.divider { width: 100%; max-width: 1080px; height: 1px; background: var(--border); margin: 0 auto; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.01em;
}

.btn-lg { font-size: 15px; padding: 15px 34px; }
.btn-md { font-size: 14px; padding: 12px 26px; }
.btn-sm { font-size: 13px; padding: 9px 20px; }

.btn-dark { color: #fff; background: var(--accent); }
.btn-dark:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-light { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.btn-light:hover { border-color: var(--text3); background: var(--surface-alt); }

.btn-ghost { color: var(--text2); background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text3); }

.btn-block { display: flex; width: 100%; justify-content: center; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: all 0.3s var(--ease);
}

.card:hover { border-color: var(--text3); box-shadow: var(--shadow-sm); }
.card-static:hover { border-color: var(--border); box-shadow: none; }

/* --- Forms --- */
.field { margin-bottom: var(--space-md); }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}

.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.footer-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { font-size: 13px; color: var(--text3); }

.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text3); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* --- Fade Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive: Base = Mobile --- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .sec { padding: var(--space-3xl) 0; }
  .wrap, .wrap-narrow, .wrap-content { padding: 0 20px; }
}

/* --- Responsive: Tablet+ --- */
@media (min-width: 641px) {
  .nav-burger { display: none; }
  .nav-links { display: flex; }
}

/* --- Responsive: Desktop --- */
@media (min-width: 1024px) {
  /* Desktop-specific overrides if needed */
}
