/* ==========================================================================
   COCKROACH CABINET - UNIFIED RETRO-BRUTALIST STYLING SYSTEM
   ========================================================================== */

:root {
  /* Core CJP Tactile Press Palette */
  --paper: #F4EBD7;        /* Recycled coarse paper background */
  --paper-2: #EADFC4;      /* Mid-tone paper for cards/inner sections */
  --paper-3: #DBCBA5;      /* Deep parchment shade for cards/hovers */
  --ink: #1A1108;          /* Dark organic printer ink charcoal */
  --ink-2: #3A2A1C;        /* Secondary border/header charcoal */
  --ink-3: #6A5440;        /* Muted ink for labels and secondary text */
  --saffron: #E0651E;      /* Bright Indian revolutionary saffron */
  --saffron-2: #F0823A;    /* Vibrant saffron highlight */
  --saffron-deep: #B84915; /* Saffron deep brick for stamps/buttons */
  --green: #1F5A2E;        /* Forest-press green */
  --green-2: #2D7A45;      /* Goal-stamp green */
  --blood: #8B1A1A;        /* Crimson red alert/warning ink */
  --gold: #C9A227;         /* Antique gold block-print */

  /* Typography Design */
  --display: 'Bowlby One', 'Impact', sans-serif;
  --condensed: 'Oswald', sans-serif;
  --sans: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Global Transitions */
  --transition-fast: 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & VIEWPORT OVERLAYS
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* Recycled newsprint rough texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='rough'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0.28 0'/></filter><rect width='180' height='180' filter='url(%23rough)'/></svg>");
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--paper-2);
  border-left: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--ink-2);
  border: 2px solid var(--paper-2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--saffron-deep);
}

/* ==========================================================================
   BRUTALIST ATOMS
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: normal;
  text-transform: uppercase;
}

.display {
  font-family: var(--display);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 2px 2px 0 rgba(26, 17, 8, 0.12);
}

.display em {
  font-style: italic;
  color: var(--saffron);
  text-shadow: 2px 2px 0 var(--ink);
}

p.lead {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink-2);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Button Press Systems */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--saffron-deep);
  color: var(--paper);
  border: 3px solid var(--ink);
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--saffron-2);
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--paper-2);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 8px 18px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-pill:hover {
  background-color: var(--paper-3);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-pill:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-link {
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--saffron);
  padding-bottom: 2px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn-link:hover {
  color: var(--saffron-deep);
  border-color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--saffron-deep);
  margin-bottom: 12px;
}

.eyebrow.on-dark {
  color: var(--saffron);
}

/* Disabled overlays */
.disabled {
  opacity: 0.35 !important;
  pointer-events: none !important;
}

/* Live indicators */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--blood);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.2);
  animation: pulse-red 1.8s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(139, 26, 26, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(139, 26, 26, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(139, 26, 26, 0); }
}

/* ==========================================================================
   MARQUEE STRIPS (RUNNING TICKER)
   ========================================================================== */

.top-strip {
  background-color: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--ink-2);
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.ticker {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 24s linear infinite;
  will-change: transform;
}

.ticker span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding-right: 60px;
  text-transform: uppercase;
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

header.nav {
  background-color: var(--paper);
  border-bottom: 3px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 99;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 0.95;
}

.brand-tag {
  font-family: var(--condensed);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin-top: 4px;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.primary-nav a {
  font-family: var(--condensed);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--saffron);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.primary-nav a:hover {
  color: var(--saffron-deep);
}

.primary-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

section.hero {
  position: relative;
  background: radial-gradient(circle at 75% 40%, rgba(224, 101, 30, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(31, 90, 70, 0.04) 0%, transparent 60%);
  padding: 100px 0 80px 0;
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 4.2rem);
  line-height: 0.95;
  margin-bottom: 24px;
}

.t-saffron { color: var(--saffron); }
.t-green { color: var(--green); }
.t-italic { font-style: italic; }

.hero-sub {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 35px;
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 50px;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 2px dashed rgba(26,17,8,0.15);
  padding-top: 24px;
}

.hero-strip strong {
  display: block;
  font-family: var(--condensed);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--saffron-deep);
}

.hero-strip span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 500;
}

/* Hero Badge */
.hero-badge-wrap {
  display: flex;
  justify-content: center;
}

.hero-badge {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  padding: 16px;
  box-shadow: 10px 10px 0 var(--ink);
  width: 100%;
  max-width: 360px;
}

/* ==========================================================================
   SWARM CABINET GRID (THE MAIN CARDS)
   ========================================================================== */

section.cabinet-sec {
  padding: 80px 0;
  border-bottom: 3px solid var(--ink);
  background: var(--paper-2);
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 12px;
}

/* Filters category */
.cabinet-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cabinet-filters button {
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cabinet-filters button.active, .cabinet-filters button:hover {
  background: var(--saffron-deep);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Roster grid layout */
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 30px;
}

.cabinet-card {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cabinet-card:hover {
  transform: translate(-3px, -3px) rotate(1deg);
  box-shadow: 9px 9px 0 var(--ink);
}

/* Card image wrapper */
.card-avatar-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 3px solid var(--ink);
  background: #eee;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
                    linear-gradient(45deg, #ccc 25%, #eee 25%, #eee 75%, #ccc 75%, #ccc);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  overflow: hidden;
  position: relative;
}

.card-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  align-self: flex-start;
  border: 1px solid var(--green);
  padding: 2px 6px;
  border-radius: 2px;
}

.card-name {
  font-family: var(--condensed);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-role {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--saffron-deep);
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(26,17,8,0.15);
  padding-bottom: 6px;
}

.card-desc {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-bottom: 16px;
  flex: 1;
}

.card-footer {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  border-top: 1px solid rgba(26,17,8,0.1);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   SUGGESTIONS CREVICE & OATH PREVIEW PANEL
   ========================================================================== */

section.interactive-sec {
  padding: 80px 0;
  border-bottom: 3px solid var(--ink);
}

.interactive-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
}

.crevice-box {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 30px;
}

.crevice-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 24px;
}

.crevice-form label, .admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: bold;
}

.crevice-form textarea, .admin-form textarea {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 12px;
  outline: none;
  font-family: var(--sans);
  font-size: 14px;
  resize: none;
}

.crevice-form select, .crevice-form input, .admin-form input, .admin-form select {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 10px;
  outline: none;
  font-family: var(--sans);
  font-size: 14px;
}

/* Scrolling Suggestions board */
.display-board {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.display-board-header {
  background: var(--ink);
  color: var(--paper);
  padding: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.display-board-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.petition-item {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 12px;
  box-shadow: 3px 3px 0 var(--ink);
}

.petition-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(26,17,8,0.15);
  padding-bottom: 4px;
}

.petition-text {
  font-size: 13px;
  color: var(--ink);
}

/* ==========================================================================
   THE SECURED ADMIN SYSTEM
   ========================================================================== */

/* Login card */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 20px;
}

.login-card {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  max-width: 440px;
  width: 100%;
  padding: 30px;
  text-align: center;
}

.login-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px auto;
}

/* Admin Dashboard layout */
.admin-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
}

.admin-card {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 30px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-list-item {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-list-thumb {
  width: 50px;
  height: 50px;
  border: 2px solid var(--ink);
  background: #ccc;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-list-details {
  flex: 1;
  min-width: 0;
}

.admin-list-details h4 {
  font-family: var(--condensed);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-list-details p {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.btn-vaporize {
  background: var(--blood);
  color: var(--paper);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: bold;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: all 0.1s ease;
}

.btn-vaporize:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-vaporize:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* File selection */
.file-select-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 3px dashed var(--ink-3);
  padding: 24px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.05);
}

.file-select-label:hover {
  background: var(--paper-2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer.footer {
  margin-top: 100px;
}

.footer-top {
  max-width: 1140px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.9fr);
  gap: 40px;
}

.foot-blurb {
  font-size: 13.5px;
  color: var(--ink-3);
  max-width: 250px;
}

.foot-col h4 {
  font-family: var(--condensed);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.foot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col a {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.foot-col a:hover {
  color: var(--saffron-deep);
}

.footer-bottom {
  background-color: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--ink-2);
  padding: 24px 0;
}

.fb-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.fb-inner p {
  font-size: 11px;
  opacity: 0.75;
}

.fb-inner .satire {
  background: var(--blood);
  color: var(--paper);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: bold;
}

/* Toast popup */
#cjp-toast {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper-2);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px 24px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: bold;
  z-index: 1000;
  max-width: 90%;
  text-align: center;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   MEDIA QUERIES (MOBILE RESPONSIVENESS)
   ========================================================================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-kicker {
    justify-content: center;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-strip {
    max-width: 600px;
    margin: 0 auto;
  }
  .interactive-grid, .admin-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    flex-direction: column;
    gap: 16px;
  }
  .primary-nav ul {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-strip {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .foot-blurb {
    margin: 10px auto 0 auto;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 2.2rem;
  }
}
