/* ═══════════════════════════════════════════════
   ZIP TIE GARAGE — Garage / Industrial Theme
   Palette: Charcoal black + burnt orange
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&family=Barlow:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:          #0a0a0a;
  --bg2:         #111111;
  --surface:     #1a1a1a;
  --surface2:    #222222;
  --border:      #2a2a2a;
  --border-hot:  rgba(234, 88, 12, 0.4);
  --accent:      #ea580c;
  --accent-bright: #f97316;
  --accent-dim:  rgba(234, 88, 12, 0.12);
  --accent-glow: rgba(234, 88, 12, 0.35);

  /* Crew name colors — consistent everywhere */
  --scott:  #f97316;   /* orange  */
  --steve:  #a78bfa;   /* purple  */
  --jamie:  #4ade80;   /* green   */
  --david:  #facc15;   /* yellow  */

  --text:        #f0ebe3;
  --text-muted:  #8a8278;
  --text-dim:    #4a4540;
  --font-head:   'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body:   'Barlow', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --radius:      4px;
  --nav-h:       64px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

main, footer, nav { position: relative; z-index: 1; }

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
}
p { color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

/* ─── Crew name colors ─── */
.scott, .t-name.scott { color: var(--scott); }
.steve, .t-name.steve { color: var(--steve); }
.jamie, .t-name.jamie { color: var(--jamie); }
.david, .t-name.david { color: var(--david); }

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Navigation ─── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-right: auto;
}
.logo-bracket { color: var(--accent); }

.nav-links { display: flex; list-style: none; gap: 36px; }
.nav-links a {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent-bright); }

/* ─── Hamburger ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-muted); transition: all 0.2s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent); }

/* ─── Mobile menu ─── */
.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(10, 10, 10, 0.98);
  border-bottom: 2px solid var(--accent);
  z-index: 99;
  padding: 32px 24px;
  transform: translateY(-110%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.mobile-link {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mobile-link:hover { color: var(--accent-bright); }

/* ════════════════════════════════════════
   HERO — split layout: title left, terminal right
════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

/* Left */
.hero-left { display: flex; flex-direction: column; gap: 32px; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content: ''; display: block; width: 24px; height: 2px; background: var(--accent); }

.hero-name {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--text);
  line-height: 0.88;
}
.hero-name .line2 {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.hero-tags { display: flex; flex-direction: column; gap: 8px; }
.tag {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag::before { content: '//'; color: var(--accent); font-family: var(--font-mono); font-size: 0.7rem; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: background 0.15s, box-shadow 0.15s;
}
.cta-btn:hover { background: var(--accent-bright); box-shadow: 0 0 32px var(--accent-glow); }

/* Right: terminal */
.hero-right { display: flex; flex-direction: column; gap: 14px; }

.hero-terminal {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.hero-terminal .terminal-body {
  min-height: 340px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* Each chat message animates in */
.chat-msg {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding: 5px 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.chat-msg.visible { opacity: 1; transform: none; }

.hero-terminal-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: right;
}

/* ─── Terminal shared styles ─── */
.terminal-window {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-bar {
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.t-dot.red    { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green  { background: #28c840; }
.t-title { margin-left: 8px; color: var(--text-dim); font-size: 0.78rem; flex: 1; }
.t-live {
  font-size: 0.7rem;
  color: var(--accent-bright);
  letter-spacing: 0.1em;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.terminal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.5;
}
.terminal-body p { color: var(--text-muted); }

.t-name { font-weight: 600; margin-right: 10px; display: inline-block; min-width: 52px; }

.t-cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── Section divider ─── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

/* ─── Category bar ─── */
#categories { padding: 48px 0 0; }

.category-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 14px 24px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cat-btn:hover { color: var(--text-muted); }
.cat-btn.active { color: var(--accent-bright); border-bottom-color: var(--accent); }

/* ─── Section header ─── */
.section-header {
  padding: 56px 0 40px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.section-header h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.section-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ─── Article grid ─── */
#builds { padding-bottom: 96px; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.article-card:first-child        { grid-column: span 8; }
.article-card:nth-child(2),
.article-card:nth-child(3)       { grid-column: span 4; }
.article-card:nth-child(n+4)     { grid-column: span 4; }

.article-card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  min-height: 220px;
}
.article-card:hover { background: var(--surface); }
.article-card:first-child { min-height: 340px; padding: 36px; }

.card-meta { display: flex; align-items: center; gap: 12px; }

.card-category {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 2px solid currentColor;
}
.card-category.automotive  { color: var(--accent-bright); }
.card-category.motorcycle  { color: var(--steve); }
.card-category.atv         { color: var(--jamie); }
.card-category.woodworking { color: var(--david); }
.card-category.default     { color: var(--accent-bright); }

.card-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1.1;
}
.article-card:first-child .card-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Chat preview snippet on cards */
.card-chat-preview {
  background: #0d0d0d;
  border-left: 2px solid var(--accent);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-chat-preview .p-name { font-weight: 600; margin-right: 6px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-authors { display: flex; gap: 8px; flex-wrap: wrap; }
.author-chip {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
/* Author chip colors match crew */
.author-chip.scott { color: var(--scott); }
.author-chip.steve { color: var(--steve); }
.author-chip.jamie { color: var(--jamie); }
.author-chip.david { color: var(--david); }

.read-time { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }

/* ─── Load more ─── */
.load-more-wrap { margin-top: 1px; }
.load-more {
  display: block;
  width: 100%;
  background: var(--bg);
  border: none;
  border-top: 1px solid var(--border);
  padding: 18px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.load-more:hover { background: var(--surface); color: var(--accent-bright); }
.load-more:disabled { opacity: 0.3; cursor: default; }

/* ─── About ─── */
#about {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-label::before { content: ''; display: block; width: 24px; height: 2px; background: var(--accent); }

.about-text h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 24px; }
.about-text p { font-size: 0.95rem; line-height: 1.8; margin-bottom: 16px; }

/* Crew list */
.crew-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  margin: 32px 0;
}
.crew-member {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.crew-member:last-child { border-bottom: none; }
.crew-member:hover { background: var(--surface); }

.crew-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 68px;
}

.crew-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Stats */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat { background: var(--bg); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-bright);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ─── Footer ─── */
footer { background: var(--bg2); border-top: 3px solid var(--border); }

.footer-top {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  border-bottom: 1px solid var(--border);
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.footer-tagline {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.footer-links a {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent-bright); }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-name { font-size: clamp(4rem, 14vw, 7rem); }
  .hero-right { display: none; } /* hide terminal on small screens, keep hero clean */
  .article-card:first-child { grid-column: span 12; }
  .article-card:nth-child(2),
  .article-card:nth-child(3) { grid-column: span 6; }
  .article-card:nth-child(n+4) { grid-column: span 6; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { text-align: left; flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .article-card,
  .article-card:first-child,
  .article-card:nth-child(2),
  .article-card:nth-child(3),
  .article-card:nth-child(n+4) { grid-column: span 12; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
