/* =========================================================
   Peck Stelzer Systems — Shared Stylesheet
   "Spec sheet" design system: paper, ink, one sharp accent.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --paper:       #f5f0e4;
  --paper-deep:  #ece4d0;
  --ink:         #20251c;
  --ink-soft:    #555a4c;
  --pine:        #24372c;
  --pine-deep:   #1a2920;
  --accent:      #c44d18;
  --accent-soft: rgba(196, 77, 24, 0.09);
  --line:        #cfc4a8;
  --line-dark:   rgba(245, 240, 228, 0.16);
  --cream-text:  #f0ead9;
  --cream-muted: rgba(240, 234, 217, 0.66);

  --serif: 'Fraunces', Georgia, serif;
  --mono:  'IBM Plex Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ── GRID PAPER MOTIF ── */
.graph {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.graph-dark {
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--ink);
  transition: background 0.15s, color 0.15s !important;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }
.nav-cta.active::after { display: none; }

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
}

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0 1.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.8rem 1.5rem; }
  .nav-links a.active::after { display: none; }
  .nav-cta { margin: 0.5rem 5%; }
}

/* ── TYPE UTILITIES ── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.fig-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.section-header { max-width: 720px; margin: 0 auto 3.5rem; text-align: center; }
.section-header.left { text-align: left; margin-left: 0; }
.section-header h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 450;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.section-header p {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  line-height: 1.75;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 90px 5% 80px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 420;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 800px;
  margin-bottom: 1.4rem;
}
.page-hero h1 em { font-style: italic; color: var(--accent); }
.page-hero p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 580px;
  line-height: 1.75;
}

/* ── REVEAL ANIMATION (page-load stagger) ── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise   { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.18s; }
.rise-3 { animation-delay: 0.32s; }
.rise-4 { animation-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .rise, .rise-1, .rise-2, .rise-3, .rise-4 { animation: none; }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border: 2px solid var(--accent);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border: 2px solid var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-outline:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.btn-outline.on-dark {
  color: var(--cream-text);
  border-color: var(--cream-text);
}
.btn-outline.on-dark:hover { box-shadow: 4px 4px 0 var(--accent); }

/* ── SPEC CARD (shared card language) ── */
.spec-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 2rem 1.9rem;
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
}
.spec-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}
.spec-card .card-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.9rem;
}
.spec-card h3 {
  font-size: 1.12rem;
  font-weight: 550;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.spec-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ── DARK SECTION BASE ── */
.dark-section {
  background: var(--pine);
  color: var(--cream-text);
}
.dark-section .eyebrow { color: var(--accent-bright, #e0703d); }
.dark-section .section-header h2 { color: var(--cream-text); }
.dark-section .section-header p { color: var(--cream-muted); }

/* ── CTA SECTION (shared) ── */
.cta-section {
  background: var(--pine-deep);
  padding: 110px 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.cta-section > * { position: relative; }
.cta-section .eyebrow { color: #e0703d; }
.cta-section h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 420;
  color: var(--cream-text);
  line-height: 1.18;
  margin-bottom: 1.2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.cta-section p {
  font-size: 1rem;
  color: var(--cream-muted);
  margin: 0 auto 2.6rem;
  max-width: 480px;
  line-height: 1.75;
}

/* ── FOOTER ── */
footer {
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 44px 5%;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 1.8rem; list-style: none; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ── UTILITY ── */
.container { max-width: 1100px; margin: 0 auto; }
