/* ============================================================
   2K Systems — Base Components
   Reset, typography, nav, footer, buttons, theme toggle.
   Shared by index.html and pricing.html.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t-med), color var(--t-med);
}

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

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

p { color: var(--text-secondary); }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}
.eyebrow.no-mark::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast),
              box-shadow var(--t-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text-primary);
  background: var(--surface-2);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { opacity: 0.92; }

.btn .arrow {
  transition: transform var(--t-fast);
  font-size: 1.05em;
  line-height: 1;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 68px;
  padding: 0 var(--gutter-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 30px; width: auto; }
.brand-word {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-links a:hover { color: var(--text-primary); background: var(--surface-2); }
.nav-links a.active { color: var(--text-primary); }

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

.nav-cta {
  padding: 9px 16px;
  background: var(--text-primary);
  color: var(--bg) !important;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.nav-cta:hover { background: var(--accent) !important; color: #fff !important; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}
.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--surface-2);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.hamburger:hover { border-color: var(--border-strong); }
.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  inset-inline: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 16px var(--gutter-x) 24px;
  gap: 4px;
  z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-radius: var(--r-sm);
}
.mobile-menu a:hover { color: var(--text-primary); background: var(--surface-2); }
.mobile-menu .nav-cta {
  background: var(--text-primary);
  color: var(--bg) !important;
  margin-top: 8px;
  text-align: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 56px var(--gutter-x) 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p {
  font-size: 0.88rem;
  max-width: 280px;
  line-height: 1.7;
  color: var(--text-muted);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Section primitives ---------- */
.section { padding: var(--space-9) var(--gutter-x); }
.section--tight { padding: var(--space-8) var(--gutter-x); }
.container { max-width: var(--container); margin: 0 auto; }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}
.section-head--bound {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.section-head h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  margin-top: 14px;
}
.section-head p {
  margin-top: 18px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-secondary);
}
.eyebrow--center { justify-content: center; }

/* ---------- Utility ---------- */
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 760px) {
  .section { padding: var(--space-8) var(--gutter-x); }
}
@media (max-width: 480px) {
  .section { padding: var(--space-7) var(--gutter-x); }
  .btn { padding: 12px 18px; font-size: 0.88rem; }
}
