/* ==========================================================================
   Slider Labs — shared stylesheet
   Monochrome / pixel-terminal theme. Swap tokens in :root to reskin.
   Boxes are drawn hand-sketched via rough.js (see script.js) on elements
   carrying the `.sketchy` class — CSS only reserves their layout box.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-elevated: #050505;
  --panel: #000000;
  --panel-hover: #0c0c0c;
  --border: rgba(255, 255, 255, 0.7);
  --border-soft: rgba(255, 255, 255, 0.16);
  --text: #f2f2f2;
  --text-muted: #a0a0a0;
  --text-faint: #5c5c5c;
  --accent: #ffffff;
  --accent-dim: #cfcfcf;
  --accent-wash: rgba(255, 255, 255, 0.06);
  --warn: #b5b5b5;
  --sketchy-color: rgba(235, 235, 235, 0.85);

  --font-body: "DotGothic16", "Courier New", ui-monospace, monospace;
  --font-mono: "DotGothic16", "Courier New", ui-monospace, monospace;

  --container: 1120px;
  --radius: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Top bar / status strip ---------- */

.status-strip {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
}

.status-strip .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}

.status-strip .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* ---------- Header / nav ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  font-size: 17px;
  white-space: nowrap;
}

.brand .mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand .subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item.has-children:hover > .nav-link,
.nav-link[aria-current="page"],
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: var(--accent-wash);
}

.nav-link[aria-current="page"] {
  color: var(--accent);
}

.nav-link .caret {
  width: 8px;
  height: 8px;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.nav-item.has-children:hover .caret {
  transform: rotate(180deg);
}

/* dropdown */

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: var(--bg-elevated);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}

.nav-item.has-children:hover > .dropdown,
.nav-item.has-children.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a,
.dropdown .dd-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.dropdown a:hover,
.dropdown .dd-link:hover,
.dropdown-sub:hover > .dd-link {
  background: var(--accent-wash);
  color: var(--text);
}

.dropdown .dd-label {
  padding: 6px 10px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
}

.tag-soon {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--warn);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  padding: 1px 5px;
  letter-spacing: 0.04em;
}

/* nested (level-2) submenu, e.g. Projects > Coming Soon > Terrapin/Jimmy */

.dropdown-sub {
  position: relative;
}

.dropdown-sub > .sub-panel {
  position: absolute;
  top: -6px;
  right: calc(100% + 8px);
  left: auto;
  min-width: 190px;
  background: var(--bg-elevated);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.dropdown-sub:hover > .sub-panel,
.dropdown-sub.open > .sub-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.caret-right {
  width: 7px;
  height: 7px;
  opacity: 0.55;
}

/* mobile nav toggle */

.nav-toggle {
  display: none;
  background: transparent;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  border: none;
  cursor: pointer;
  position: relative;
}

.btn-primary {
  background: var(--accent);
  color: #000000;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--accent-wash);
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  padding: 5px 12px;
  margin-bottom: 22px;
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 400;
}

h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
  max-width: 760px;
}

.lede {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Generic page header (non-home) ---------- */

.page-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-soft);
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.page-header h1 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 12px;
}

.page-header .lede {
  margin-bottom: 0;
  font-size: 16px;
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
  position: relative;
  z-index: 1;
}

section.tight {
  padding: 48px 0;
}

section + section {
  border-top: 1px solid var(--border-soft);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 10px;
  display: block;
}

.section-head h2 {
  font-size: clamp(20px, 3vw, 26px);
  margin: 0;
}

.section-head p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0;
}

/* ---------- Cards / grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--panel);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease;
  position: relative;
}

a.card:hover,
.card.linkable:hover {
  transform: translateY(-2px);
  background: var(--panel-hover);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 14px;
  flex-shrink: 0;
}

.card-icon.is-img {
  background: transparent;
  padding: 0;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card h3 {
  font-size: 17px;
  margin: 0;
}

.card p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.status-pill.active {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.status-pill.soon {
  color: var(--warn);
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

.status-pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Team ---------- */

.team-card {
  text-align: left;
}

.avatar {
  width: 52px;
  height: 52px;
  background: var(--accent-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--text);
}

.role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

/* ---------- Placeholder / empty state blocks ---------- */

.placeholder-block {
  padding: 28px;
  color: var(--text-faint);
  font-size: 14px;
  background: var(--bg-elevated);
  position: relative;
}

.placeholder-block strong {
  color: var(--text-muted);
}

/* ---------- Docs layout ---------- */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.docs-side {
  position: sticky;
  top: 88px;
  background: var(--panel);
  padding: 16px;
}

.docs-side .dd-label {
  padding: 4px 6px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
}

.docs-side a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.docs-side a:hover,
.docs-side a[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--text);
}

.docs-side a[aria-current="page"] {
  color: var(--accent);
}

.docs-content h2 {
  font-size: 21px;
  margin: 40px 0 14px;
}

.docs-content h2:first-child {
  margin-top: 0;
}

.docs-content p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.docs-content code,
code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  padding: 2px 6px;
  color: var(--text);
}

pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.docs-content h3 {
  font-size: 16px;
  margin: 28px 0 10px;
}

.docs-content h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 22px 0 8px;
}

.docs-content ul,
.docs-content ol {
  color: var(--text-muted);
  margin: 0 0 16px;
  padding-left: 22px;
}

.docs-content li {
  margin-bottom: 7px;
}

.docs-content a {
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}

.docs-content a:hover {
  border-bottom-color: var(--accent);
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
}

.docs-content th,
.docs-content td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.docs-content th {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 400;
}

.docs-content .doc-block {
  padding-bottom: 8px;
}

.docs-content .doc-block + .doc-block {
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
  padding-top: 8px;
}

/* keep the docs sidebar anchor TOC compact */
.docs-side a[href^="#"] {
  font-size: 13px;
  padding: 5px 10px;
  color: var(--text-faint);
}

.docs-side a[href^="#"]:hover {
  color: var(--text);
}

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ==========================================================================
   Hand-drawn (sketchy) boxes
   `.sketchy` elements get an <svg class="sketchy-border"> injected + drawn
   by rough.js in script.js. This just reserves the paint layer.
   ========================================================================== */

.sketchy {
  position: relative;
}

.sketchy > svg.sketchy-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}

/* .dropdown / .sub-panel need position:absolute for their popover behavior —
   two-class specificity here beats the generic `.sketchy { position: relative }`
   rule above regardless of source order. */
.dropdown.sketchy,
.sub-panel.sketchy {
  position: absolute;
}

/* ==========================================================================
   Scroll-in animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Skeleton loaders
   `.loadable` elements show a `.skeleton-layer` overlay (absolute, full
   bleed) until JS adds `.is-loaded`, at which point it fades out to reveal
   the always-present `.real-content` underneath — no layout shift.
   ========================================================================== */

.loadable {
  position: relative;
}

.loadable .skeleton-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loadable.is-loaded .skeleton-layer {
  opacity: 0;
  pointer-events: none;
}

.skel-line,
.skel-icon {
  background: linear-gradient(90deg, #0d0d0d 20%, #272727 40%, #0d0d0d 60%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}

.skel-line {
  height: 11px;
}

.skel-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
}

.skel-line.w-30 { width: 30%; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-55 { width: 55%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-70 { width: 70%; }
.skel-line.w-90 { width: 90%; }
.skel-line.w-100 { width: 100%; }

@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skel-line,
  .skel-icon {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  nav.primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 2px;
    display: none;
  }

  header.site-header.nav-open nav.primary-nav {
    display: flex;
  }

  .nav-item.has-children:hover > .dropdown,
  .nav-item.has-children.open > .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 4px 0 4px 10px;
    display: none;
  }

  .nav-item.has-children.open > .dropdown {
    display: block;
  }

  .dropdown-sub > .sub-panel {
    position: static;
    display: none;
    margin-left: 10px;
  }

  .dropdown-sub.open > .sub-panel {
    display: block;
  }

  .grid,
  .grid.cols-2,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Sponsors wall ---- */
.sponsor-tier-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  display: block;
  margin: 0 0 14px;
}
.sponsor-tier + .sponsor-tier {
  margin-top: 40px;
}
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.sponsor-card {
  background: var(--panel);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}
a.sponsor-card:hover {
  transform: translateY(-2px);
  background: var(--panel-hover);
}
.sponsor-avatar {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  background: var(--accent-wash);
  display: block;
}
.sponsor-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}
.sponsor-handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.sponsors-empty {
  padding: 40px 26px;
  text-align: center;
  color: var(--text-muted);
}
.sponsors-empty strong {
  color: var(--text);
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}
