/* ═══════════════════════════════════════════════════════
   SEROTONIN — inject serotonin into your shell
   Color palette: crimson red / velvet / void black
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --srt-void: #050505;
  --srt-bg: #0a0a0a;
  --srt-surface: #111111;
  --srt-surface-2: #1a1a1a;
  --srt-border: rgba(220, 38, 38, 0.15);
  --srt-border-bright: rgba(220, 38, 38, 0.4);
  --srt-red: #dc2626;
  --srt-red-bright: #ef4444;
  --srt-red-soft: #fca5a5;
  --srt-velvet: #7f1d1d;
  --srt-velvet-deep: #450a0a;
  --srt-crimson: #991b1b;
  --srt-text: #e4e4e7;
  --srt-text-dim: #71717a;
  --srt-text-muted: #52525b;
  --srt-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--srt-crimson) var(--srt-void);
}

body {
  font-family: var(--srt-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--srt-text);
  background: var(--srt-void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--srt-red);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--srt-void); }
::-webkit-scrollbar-thumb { background: var(--srt-crimson); border-radius: 3px; }

a { color: var(--srt-red-bright); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--srt-red-soft); }

/* ── Canvas / Overlay Layers ──────────────────────── */
#srt-matrix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.srt-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ── Floating Chemicals ───────────────────────────── */
.srt-chemicals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.srt-chem {
  position: absolute;
  font-size: 12px;
  font-family: var(--srt-mono);
  color: var(--srt-red);
  opacity: 0;
  animation: chem-float 25s linear infinite;
}

.srt-chem-1 { left: 5%;  top: 100%; animation-delay: 0s;   font-size: 11px; }
.srt-chem-2 { left: 15%; top: 100%; animation-delay: 3s;   font-size: 14px; }
.srt-chem-3 { left: 30%; top: 100%; animation-delay: 7s;   font-size: 10px; }
.srt-chem-4 { left: 50%; top: 100%; animation-delay: 11s;  font-size: 12px; }
.srt-chem-5 { left: 65%; top: 100%; animation-delay: 5s;   font-size: 10px; }
.srt-chem-6 { left: 78%; top: 100%; animation-delay: 15s;  font-size: 13px; }
.srt-chem-7 { left: 88%; top: 100%; animation-delay: 9s;   font-size: 11px; }
.srt-chem-8 { left: 42%; top: 100%; animation-delay: 18s;  font-size: 10px; }

@keyframes chem-float {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  5%   { opacity: 0.06; }
  50%  { opacity: 0.08; }
  95%  { opacity: 0.04; }
  100% { transform: translateY(-110vh) rotate(15deg); opacity: 0; }
}

/* ── Serotonin Level Meter ────────────────────────── */
.srt-level {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--srt-text-dim);
}

.srt-level-label {
  color: var(--srt-red);
  font-weight: 700;
  font-size: 10px;
}

.srt-level-track {
  width: 3px;
  height: 150px;
  background: var(--srt-surface-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.srt-level-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, var(--srt-velvet), var(--srt-red), var(--srt-red-bright));
  border-radius: 2px;
  transition: height 0.3s ease;
  box-shadow: 0 0 8px var(--srt-red);
}

.srt-level-value {
  font-variant-numeric: tabular-nums;
  color: var(--srt-red-bright);
  font-weight: 600;
}

.srt-level-status {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 8px;
  color: var(--srt-text-muted);
  max-height: 80px;
  overflow: hidden;
}

/* ── Main Page Container ──────────────────────────── */
.srt-page {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero Section ─────────────────────────────────── */
.srt-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
}

/* Typing intro */
.srt-intro {
  font-size: 13px;
  color: var(--srt-text-dim);
  margin-bottom: 24px;
  text-align: left;
  min-height: 60px;
  width: 100%;
  max-width: 420px;
}

.srt-intro-line {
  white-space: nowrap;
  overflow: hidden;
}

.srt-intro-line::before {
  content: '> ';
  color: var(--srt-red);
  font-weight: 700;
}

.srt-intro-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--srt-red-bright);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Brain ASCII */
.srt-brain {
  font-size: 10px;
  line-height: 1.15;
  color: var(--srt-red);
  margin: 16px 0 32px;
  user-select: none;
  animation: brain-pulse 4s ease-in-out infinite;
  text-shadow:
    0 0 5px rgba(220, 38, 38, 0.4),
    0 0 10px rgba(220, 38, 38, 0.2),
    0 0 20px rgba(220, 38, 38, 0.1);
  opacity: 0;
  animation: brain-fade-in 2s ease forwards, brain-pulse 4s ease-in-out 2s infinite;
}

@keyframes brain-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes brain-pulse {
  0%, 100% {
    text-shadow:
      0 0 5px rgba(220, 38, 38, 0.4),
      0 0 10px rgba(220, 38, 38, 0.2),
      0 0 20px rgba(220, 38, 38, 0.1);
    filter: brightness(1);
  }
  30% {
    text-shadow:
      0 0 15px rgba(239, 68, 68, 0.7),
      0 0 30px rgba(220, 38, 38, 0.4),
      0 0 60px rgba(153, 27, 27, 0.2);
    filter: brightness(1.2);
  }
  60% {
    text-shadow:
      0 0 8px rgba(220, 38, 38, 0.5),
      0 0 15px rgba(220, 38, 38, 0.25),
      0 0 25px rgba(220, 38, 38, 0.1);
    filter: brightness(1.05);
  }
  80% {
    text-shadow:
      0 0 20px rgba(252, 165, 165, 0.6),
      0 0 40px rgba(239, 68, 68, 0.35),
      0 0 80px rgba(220, 38, 38, 0.15);
    filter: brightness(1.3);
  }
}

/* Title with glitch */
.srt-title {
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--srt-red-bright);
  position: relative;
  text-shadow:
    0 0 20px rgba(239, 68, 68, 0.5),
    0 0 40px rgba(220, 38, 38, 0.3),
    0 0 80px rgba(153, 27, 27, 0.2);
  margin-bottom: 12px;
}

.srt-glitch {
  animation: glitch-skew 6s infinite linear alternate-reverse;
}

.srt-glitch::before,
.srt-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.srt-glitch::before {
  color: var(--srt-red-soft);
  animation: glitch-1 4s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  text-shadow: -2px 0 var(--srt-crimson);
}

.srt-glitch::after {
  color: var(--srt-crimson);
  animation: glitch-2 4s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  text-shadow: 2px 0 var(--srt-velvet);
}

@keyframes glitch-1 {
  0%, 85%  { transform: translate(0); }
  86%      { transform: translate(-3px, -1px); }
  87%      { transform: translate(3px, 1px); }
  88%      { transform: translate(-2px, 0); }
  89%, 100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0%, 88%  { transform: translate(0); }
  89%      { transform: translate(2px, 1px); }
  90%      { transform: translate(-3px, -1px); }
  91%      { transform: translate(1px, 0); }
  92%, 100% { transform: translate(0); }
}

@keyframes glitch-skew {
  0%, 92%  { transform: skew(0deg); }
  93%      { transform: skew(-0.5deg); }
  94%      { transform: skew(0.5deg); }
  95%, 100% { transform: skew(0deg); }
}

.srt-tagline {
  font-size: 18px;
  color: var(--srt-text);
  font-weight: 500;
  margin-bottom: 4px;
}

.srt-subtitle {
  font-size: 13px;
  color: var(--srt-text-dim);
  margin-bottom: 40px;
}

/* Install box */
.srt-install-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--srt-surface);
  border: 1px solid var(--srt-border-bright);
  border-radius: 8px;
  padding: 14px 18px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.srt-install-box:hover {
  border-color: var(--srt-red);
  box-shadow:
    0 0 20px rgba(220, 38, 38, 0.15),
    0 0 40px rgba(220, 38, 38, 0.05);
}

.srt-install-rx {
  font-size: 22px;
  color: var(--srt-red);
  font-weight: 700;
  opacity: 0.7;
}

.srt-install-cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.srt-install-cmd code {
  font-family: var(--srt-mono);
  font-size: 13px;
  color: var(--srt-text);
}

.srt-copy-btn {
  background: none;
  border: none;
  color: var(--srt-text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}

.srt-copy-btn:hover {
  color: var(--srt-red-bright);
  background: rgba(220, 38, 38, 0.1);
}

.srt-copy-btn.copied {
  color: #22c55e;
}

/* ── EKG Divider ──────────────────────────────────── */
.srt-ekg {
  display: block;
  width: 100%;
  height: 40px;
  margin: 20px 0;
  overflow: visible;
}

.srt-ekg-line {
  fill: none;
  stroke: var(--srt-red);
  stroke-width: 1.5;
  opacity: 0.3;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.5));
  transition: stroke-dashoffset 2s ease;
}

.srt-ekg.srt-revealed .srt-ekg-line {
  stroke-dashoffset: 0;
}

/* ── Section Base ─────────────────────────────────── */
.srt-section {
  padding: 60px 0;
}

.srt-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--srt-red);
  margin-bottom: 16px;
  opacity: 0.7;
}

.srt-heading {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  color: var(--srt-text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.srt-accent { color: var(--srt-red-bright); }
.srt-dim { color: var(--srt-text-muted); }

.srt-desc {
  color: var(--srt-text-dim);
  margin-bottom: 32px;
  max-width: 600px;
}

/* ── Terminal Box ─────────────────────────────────── */
.srt-terminal {
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 10px;
  overflow: hidden;
  margin: 24px 0;
}

.srt-terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--srt-surface-2);
  border-bottom: 1px solid var(--srt-border);
}

.srt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.srt-dot-close { background: #ef4444; }
.srt-dot-min   { background: #eab308; }
.srt-dot-max   { background: #22c55e; }

.srt-terminal-title {
  font-size: 11px;
  color: var(--srt-text-muted);
  margin-left: 8px;
}

.srt-terminal-body {
  padding: 20px;
}

.srt-terminal-body pre {
  font-family: var(--srt-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--srt-text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}

.srt-terminal-sm { margin-top: 24px; }
.srt-terminal-sm .srt-terminal-body { padding: 14px 20px; }

/* Terminal syntax highlighting */
.srt-t-prompt  { color: var(--srt-red-bright); font-weight: 700; }
.srt-t-arrow   { color: var(--srt-red); }
.srt-t-tool    { color: var(--srt-red-soft); }
.srt-t-path    { color: #fbbf24; }
.srt-t-file    { color: var(--srt-text); }
.srt-t-comment { color: var(--srt-text-muted); }
.srt-t-fast    { color: #22c55e; font-weight: 600; }
.srt-t-done    { color: var(--srt-red-bright); }
.srt-t-dim     { color: var(--srt-text-muted); }

/* ── Philosophy Cards ─────────────────────────────── */
.srt-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.srt-card {
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.srt-card:hover {
  border-color: var(--srt-border-bright);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.08);
  transform: translateY(-2px);
}

.srt-card-icon {
  font-size: 18px;
  color: var(--srt-red);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.srt-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--srt-text);
  margin-bottom: 8px;
}

.srt-card p {
  font-size: 12px;
  color: var(--srt-text-dim);
  line-height: 1.6;
}

/* ── Comparison Table ─────────────────────────────── */
.srt-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 10px;
  border: 1px solid var(--srt-border);
}

.srt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.srt-table th,
.srt-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--srt-border);
}

.srt-table thead th {
  background: var(--srt-surface-2);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--srt-text-dim);
}

.srt-table tbody tr {
  background: var(--srt-surface);
  transition: background 0.2s;
}

.srt-table tbody tr:hover {
  background: var(--srt-surface-2);
}

.srt-table tbody tr:last-child td {
  border-bottom: none;
}

.srt-col-highlight {
  color: var(--srt-red-bright) !important;
}

.srt-badge-fast {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
}

.srt-arrow-cell {
  color: var(--srt-red);
  font-weight: 700;
  text-align: center !important;
  width: 40px;
}

.srt-table code {
  font-family: var(--srt-mono);
  font-size: 13px;
}

.srt-table-replacements td:first-child code {
  color: var(--srt-text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(113, 113, 122, 0.4);
}

/* ── Packs Grid ───────────────────────────────────── */
.srt-packs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.srt-pack-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srt-pack-cat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--srt-red);
  opacity: 0.6;
  margin-bottom: 4px;
}

.srt-pack {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.srt-pack:hover {
  border-color: var(--srt-border-bright);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.06);
}

.srt-pack-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.srt-pack div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.srt-pack strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--srt-text);
}

.srt-pack-tools {
  font-size: 11px;
  color: var(--srt-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Commands ─────────────────────────────────────── */
.srt-commands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.srt-cmd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.srt-cmd:hover {
  border-color: var(--srt-border-bright);
}

.srt-cmd code {
  font-family: var(--srt-mono);
  font-size: 13px;
  color: var(--srt-red-soft);
  font-weight: 600;
}

.srt-cmd span {
  font-size: 11px;
  color: var(--srt-text-muted);
}

/* ── CTA ──────────────────────────────────────────── */
.srt-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
}

.srt-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--srt-mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.srt-btn-primary {
  background: var(--srt-red);
  color: #fff;
  border: 1px solid var(--srt-red);
}

.srt-btn-primary:hover {
  background: var(--srt-red-bright);
  color: #fff;
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
  transform: translateY(-1px);
}

.srt-btn-secondary {
  background: transparent;
  color: var(--srt-text-dim);
  border: 1px solid var(--srt-border-bright);
}

.srt-btn-secondary:hover {
  color: var(--srt-text);
  border-color: var(--srt-red);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
}

/* ── Footer ───────────────────────────────────────── */
.srt-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--srt-border);
  font-size: 12px;
  color: var(--srt-text-muted);
}

.srt-footer a {
  color: var(--srt-text-dim);
}

.srt-footer a:hover {
  color: var(--srt-red-bright);
}

/* ── Scroll Reveal ────────────────────────────────── */
.srt-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.srt-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .srt-level { display: none; }

  .srt-page {
    padding: 0 16px;
  }

  .srt-hero {
    padding: 60px 0 30px;
  }

  .srt-brain {
    font-size: 6.5px;
    line-height: 1.1;
  }

  .srt-title {
    letter-spacing: 0.08em;
  }

  .srt-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .srt-packs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .srt-commands {
    grid-template-columns: 1fr;
  }

  .srt-install-cmd code {
    font-size: 11px;
  }

  .srt-install-box {
    padding: 12px 14px;
    gap: 8px;
  }

  .srt-install-rx {
    font-size: 18px;
  }

  .srt-table {
    font-size: 12px;
  }

  .srt-table th,
  .srt-table td {
    padding: 8px 10px;
  }

  .srt-section {
    padding: 40px 0;
  }

  .srt-chem { display: none; }
}

@media (max-width: 480px) {
  .srt-brain {
    font-size: 5px;
  }

  .srt-intro {
    font-size: 11px;
  }

  .srt-tagline {
    font-size: 15px;
  }

  .srt-terminal-body {
    padding: 14px;
  }

  .srt-terminal-body pre {
    font-size: 11px;
  }
}
