/* ============================================================
   AI VALUE WORX — LAYOUT
   ============================================================ */

/* --- 1. Base reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-light); }
ul { list-style: none; }

/* --- 2. Container --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-4); }
.container--narrow { max-width: var(--content-width); }
@media (max-width: 768px) { .container { padding: 0 var(--space-2); } }

/* --- 3. Navigation --- */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding-top: 20px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-logo {
  height: 32px;
  width: auto;
  display: block;
}
.footer__logo {
  display: inline-block;
  margin-bottom: var(--space-2);
}
.nav__links {
  display: flex; gap: var(--space-3); align-items: center;
}
.nav-link {
  font-size: var(--text-sm); color: var(--text-secondary);
  letter-spacing: 0.02em; transition: color var(--transition-fast);
  text-decoration: none;
}
.nav-link:hover, .nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active { color: var(--accent); }
.nav__cta { margin-left: var(--space-2); }
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 4px; padding: 0;
}
.nav__toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 1px;
  transition: transform var(--transition-fast);
}

@media (max-width: 768px) {
  .nav__links {
    display: none; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-3); gap: var(--space-2);
  }
  .nav__links.is-open { display: flex; }
  .nav__toggle { display: flex; }
}

/* --- 4. Page structure --- */
.page { padding-top: var(--nav-height); }
.section { padding: var(--space-16) 0; }
.section--sm { padding: var(--space-8) 0; }
.section--xs { padding: var(--space-6) 0; }
.section--hero {
  padding: var(--space-20) 0;
  background: linear-gradient(180deg, rgba(14,165,233,0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
}

/* --- 5. Typography utilities --- */
.text-hero { font-size: clamp(2.25rem, 5vw, var(--text-6xl)); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.text-display { font-size: clamp(1.875rem, 3.5vw, var(--text-5xl)); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }
.text-heading { font-size: clamp(1.5rem, 2.5vw, var(--text-4xl)); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.text-subheading { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; }
.text-body-lg { font-size: var(--text-lg); line-height: 1.75; color: var(--text-secondary); }
.text-body { font-size: var(--text-base); line-height: 1.75; }
.text-caption { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }
.text-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* --- 6. Grid --- */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --- 7. Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-family: var(--font-sans); font-weight: 600; font-size: var(--text-base);
  cursor: pointer; transition: all var(--transition-fast);
  border: none; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--cta-bg); color: var(--cta-text); }
.btn-primary:hover { background: var(--cta-bg-hover); color: var(--cta-text); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-default); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: var(--text-sm); }
.btn-lg { padding: 16px 32px; font-size: var(--text-lg); }

/* --- 8. Cards --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--transition-fast);
}
.card--raised { background: var(--bg-raised); }
.card--accent { border-color: var(--accent-dim); }

/* --- 9. Divider --- */
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: var(--space-6) 0; }

/* --- 10. Footer --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-6);
}
.footer__main { margin-bottom: var(--space-8); }
.footer__bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-2);
}
@media (max-width: 768px) { .footer__main { grid-template-columns: 1fr; } }

/* --- 11. Misc utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
