/* Ship It — 6-Stage Pipeline Design System */

:root {
  --font-body: 'Instrument Sans', -apple-system, system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-editorial: 'IBM Plex Serif', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --bg: #faf9f6;
  --bg-alt: #f5f2ed;
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #999;
  --accent: #d4552a;
  --accent-pale: #f4e8e2;
  --border: #e5e0da;
  --code-bg: #f5f2ed;
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1e40af;
  --radius: 6px;
  --nav-height: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #1a1a1a; color: #fff; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

a { color: var(--text); }

/* ─── FIXED NAV ─────────────────────────────────────────────────── */
.si-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 60px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 249, 246, 0.88);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.si-nav__brand {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}
.si-nav__brand:hover { color: var(--text-secondary); }

/* Pipeline progress */
.si-pipeline {
  display: flex;
  align-items: center;
  gap: 0;
}

.si-step {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.si-step:hover { background: rgba(26, 26, 26, 0.04); }

.si-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 0.5rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  background: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.si-step__label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.si-step--active .si-step__num {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.si-step--active .si-step__label {
  color: var(--text);
  font-weight: 500;
}

.si-step--done .si-step__num {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.si-step--done .si-step__label {
  color: var(--text-secondary);
}

.si-step--locked {
  pointer-events: none;
  opacity: 0.5;
}

.si-connector {
  width: 16px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}
.si-connector--done { background: var(--text); }

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.si-footer {
  padding: 24px clamp(16px, 4vw, 60px) 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
}

.si-footer__brand {
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.si-footer__links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.si-footer__links a {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}
.si-footer__links a:hover { color: var(--text); }
.si-footer__links a[data-active] { color: var(--text); font-weight: 500; }

/* ─── COMMON ELEMENTS ───────────────────────────────────────────── */
.si-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 60px);
}

.si-section {
  padding: 3rem 0;
}

.si-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.si-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.si-sub {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}

.si-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Buttons */
.si-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.si-btn--primary {
  background: var(--text);
  color: #fff;
}
.si-btn--primary:hover { background: #333; }
.si-btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.si-btn--secondary:hover { border-color: var(--text); }
.si-btn--accent {
  background: var(--accent);
  color: #fff;
}
.si-btn--accent:hover { background: #b94420; }
.si-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Code blocks */
.si-code {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.si-code pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}
.si-code__copy {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 10px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
}
.si-code__copy.copied { background: var(--success-bg); color: #166534; border-color: var(--success-border); }

/* Notes */
.si-note {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.65;
}
.si-note strong { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; margin-right: 6px; }
.si-note--tip { background: var(--success-bg); border: 1px solid var(--success-border); color: #166534; }
.si-note--warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.si-note--info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info-text); }
.si-note--cost { background: #faf5ff; border: 1px solid #e9d5ff; color: #6b21a8; }

/* Checkboxes */
.si-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.3s;
  user-select: none;
}
.si-check.checked { background: var(--success-bg); border-color: #86efac; }
.si-check__circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.si-check.checked .si-check__circle { border-color: var(--success); background: var(--success); }
.si-check__text { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.si-check.checked .si-check__text { color: #16a34a; }

/* Cards */
.si-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  background: #fff;
}

/* Form elements */
.si-input, .si-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}
.si-input:focus, .si-textarea:focus {
  outline: none;
  border-color: var(--text);
}
.si-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* Reveal animation */
.si-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.si-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .si-step__label { display: none; }
  .si-connector { width: 10px; }
  .si-step { padding: 4px; }
  .si-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .si-nav { padding: 0 12px; }
  .si-footer { padding: 16px 12px 20px; }
  .si-connector { width: 6px; }
}

/* ─── UNIFIED NAV (V3) ──────────────────────────────────────────── */
.shipit-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 249, 246, 0.92);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  padding: 0 clamp(16px, 4vw, 60px);
}
.shipit-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.shipit-nav__brand {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.shipit-nav__brand:hover { color: var(--accent); }
.shipit-nav__book {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: border-color 0.2s, color 0.2s;
}
.shipit-nav__book:hover { border-color: var(--accent); color: var(--accent); }
.shipit-nav__steps {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 10px;
}
.shipit-nav__steps a {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}
.shipit-nav__steps a:hover { color: var(--text); }
.shipit-nav__steps a.active { color: var(--accent); font-weight: 500; }
.shipit-nav__steps span {
  font-size: 0.5rem;
  color: var(--text-tertiary);
}

/* Adjust body padding for new nav (taller with step bar) */
body:has(.shipit-nav) {
  padding-top: calc(var(--nav-height) + 28px);
}

/* ─── UNIFIED FOOTER (V3) ────────────────────────────────────────── */
.shipit-footer {
  padding: 2rem clamp(16px, 4vw, 60px);
  border-top: 1px solid var(--border);
  text-align: center;
}
.shipit-footer__brand {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}
.shipit-footer__sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.shipit-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.shipit-footer__links a {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}
.shipit-footer__links a:hover { color: var(--text); }
