/* Rushing Technologies — case study page chrome.
   Matches the terminal/glitch theme from public/index.html exactly. */

:root {
  --bg: #050608;
  --bg-2: #0a0c12;
  --ink: #e8e9ee;
  --ink-dim: #8a8d99;
  --ink-faint: #4a4d59;
  --red: #ff2d3d;
  --red-glow: #ff4858;
  --red-deep: #b00018;
  --grid: rgba(255, 45, 61, 0.06);
  --line: rgba(255, 255, 255, 0.06);
  --mono: 'JetBrains Mono', monospace;
  --display: 'Major Mono Display', monospace;
  --head: 'Syne', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: crosshair;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 45, 61, 0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 45, 61, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.4;
  z-index: 1000;
  animation: scan 8s linear infinite;
  pointer-events: none;
}
@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

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

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 8, 0.7);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.nav-logo {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--red); }
.nav-links a::before { content: '> '; opacity: 0; transition: opacity 0.2s; }
.nav-links a:hover::before { opacity: 1; }
.nav-status { color: var(--ink-faint); }
.nav-status span { color: #4ade80; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: crosshair;
  padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--red); transition: all 0.25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* PAGE WRAP */
.page {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 32px 100px;
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}
.breadcrumb a { color: var(--ink-dim); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--red); }

/* CASE STUDY (full page — same classes the in-page modal used) */
.cs-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-status {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border: 1px solid;
}
.cs-status.live { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.cs-status.dev { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.cs-status.oss { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
.cs-status.review { color: #c084fc; border-color: rgba(192, 132, 252, 0.35); }

.cs-title {
  font-family: var(--head);
  font-size: 56px;
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 24px;
}
.cs-sub {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 32px;
}

.cs-media {
  border: 1px solid var(--line);
  margin: 40px 0 56px;
  position: relative;
}
.cs-media::before {
  content: '// LIVE_CAPTURE';
  position: absolute;
  top: -9px;
  left: 20px;
  background: var(--bg);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.2em;
}
.cs-media img { width: 100%; display: block; }

.cs-section { margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.cs-section:last-child { border-bottom: none; margin-bottom: 0; }
.cs-section-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}
.cs-section-content {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.75;
}
.cs-arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.cs-arch-item { border: 1px solid var(--line); padding: 20px; }
.cs-arch-item-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.cs-arch-item-val { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); line-height: 1.6; }

.cs-stats { display: flex; gap: 48px; flex-wrap: wrap; margin-top: 24px; }
.cs-stat-num { font-family: var(--head); font-size: 48px; color: var(--red); font-weight: 800; line-height: 1; }
.cs-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 6px;
}

.cs-diagram {
  border: 1px solid var(--line);
  padding: 32px;
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 2;
  white-space: pre;
  overflow-x: auto;
  background: rgba(255, 45, 61, 0.02);
}

.cs-action-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }

/* PROJECT LINK (matches homepage) */
.project-link {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--red);
  text-decoration: none;
  border: 1px solid rgba(255, 45, 61, 0.35);
  padding: 8px 14px;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  background: none;
  display: inline-block;
}
.project-link:hover { background: rgba(255, 45, 61, 0.1); border-color: var(--red); }
.project-link.store { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.project-link.store:hover { background: rgba(74, 222, 128, 0.1); border-color: #4ade80; }
.project-link.oss-link { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
.project-link.oss-link:hover { background: rgba(56, 189, 248, 0.1); border-color: #38bdf8; }

/* RELATED BUILDS */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.related-card {
  border: 1px solid var(--line);
  padding: 20px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, background 0.2s;
}
.related-card:hover { border-color: var(--red); background: rgba(255, 45, 61, 0.03); }
.related-card .r-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.related-card h4 {
  font-family: var(--head);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.related-card p { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); line-height: 1.6; }

/* FOOTER */
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 32px;
  max-width: 900px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  flex-wrap: wrap;
  gap: 16px;
}
footer .red { color: var(--red); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 53px; left: 0; right: 0;
    background: rgba(5, 6, 8, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 24px 32px;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(12px);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .page { padding: 90px 20px 80px; }
  .cs-title { font-size: 36px; }
  .cs-arch-grid, .related-grid { grid-template-columns: 1fr; }
}
