/* ==============================================================
   PIKS Design System — shared styles across all public pages
   Load via: <link rel="stylesheet" href="css/piks-design.css">
   Font dependency (load in <head> before this file):
     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
   ============================================================== */

:root {
  --bg: #FAFAF7;
  --bg-elev: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --muted: #6b6b6b;
  --muted-2: #9a9a95;
  --line: #ebe9e3;
  --line-2: #f1efe9;
  --accent: #C8932F;
  --accent-soft: #E8B850;
  --accent-tint: rgba(200,147,47,0.08);
  --accent-ring: rgba(200,147,47,0.18);
  --danger: #b91c1c;
  --danger-tint: rgba(239, 68, 68, 0.08);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 2px 8px rgba(10,10,10,0.04);
  --shadow-md: 0 10px 30px -10px rgba(10,10,10,0.12);
  --shadow-lg: 0 24px 50px -18px rgba(10,10,10,0.22), 0 8px 20px -8px rgba(10,10,10,0.08);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- layout ---------- */
.container {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-wide { max-width: 1440px; }
.container-narrow { max-width: 820px; }

/* ---------- typography helpers ---------- */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* ---------- scroll reveal ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- nav ---------- */
header#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
header#header.scrolled {
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
header#header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-buttons .btn-ghost {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #3a3a3a;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-buttons .btn-ghost:hover {
  color: var(--ink);
  background: rgba(10,10,10,0.04);
}
.nav-buttons .btn-primary {
  margin-left: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink-soft);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.nav-buttons .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

/* ---------- buttons ---------- */
.btn-cta {
  background: var(--ink-soft);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.btn-cta svg { width: 14px; height: 14px; }
.btn-cta.accent { background: var(--accent); }
.btn-cta.accent:hover { background: var(--accent-soft); }

.btn-cta-secondary {
  background: transparent;
  color: var(--ink-soft);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}
.btn-cta-secondary::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 8px;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.btn-cta-secondary:hover::after { opacity: 1; }

/* ---------- sections common ---------- */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 72px;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.section-label::before,
.section-label::after {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px 0;
}
.section-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ---------- generic card ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200,147,47,0.25);
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px 0;
  color: var(--ink);
}
.card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf7;
  font: 500 15px 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0 0;
}

/* ---------- alerts ---------- */
.alert-error {
  display: none;
  background: var(--danger-tint);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}
.alert-error.active { display: block; }
.alert-success {
  display: none;
  background: var(--accent-tint);
  border: 1px solid var(--accent-ring);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}
.alert-success.active { display: block; }

/* ---------- footer ---------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 80px;
}
.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand img { height: 40px; width: auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.15s var(--ease);
}
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: center;
}
.copyright {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ---------- spinner ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive base ---------- */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-buttons .btn-ghost { display: none; }
  .nav-buttons .btn-ghost:nth-last-child(2),
  .nav-buttons .btn-primary { display: inline-flex; }
  .section-header { margin-bottom: 48px; }
  .footer-content { flex-direction: column; }
}
