/* Scatter World docs site — shipped alongside the HDA */
@import url('../colors_and_type.css');

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sw-font-ui);
  background: #1a1a1a;
  color: var(--sw-fg-1);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--sw-fg-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============== layout ============== */
.docs {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ============== sidebar ============== */
.sidebar {
  background: var(--sw-bg-panel);
  border-right: 1px solid #1a1a1a;
  padding: 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #1a1a1a;
}
.brand img { width: 32px; height: 32px; }
.brand .stack { display: flex; flex-direction: column; line-height: 1; }
.brand .studio { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--sw-fg-3); margin-bottom: 4px; }
.brand .product { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sw-fg-accent); }
.brand .ver { font-family: var(--sw-font-mono); font-size: 10px; color: var(--sw-fg-3); margin-top: 4px; }

.nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sw-fg-3); padding: 12px 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 2px;
  font-size: 13px; color: var(--sw-fg-2); text-decoration: none;
}
.nav a:hover { background: #333; color: var(--sw-fg-1); text-decoration: none; }
.nav a.active { background: #262626; color: var(--sw-green); box-shadow: inset 2px 0 0 var(--sw-green); }
.nav .pill {
  font-family: var(--sw-font-mono); font-size: 9px;
  background: var(--sw-bg-groove); color: var(--sw-fg-3);
  padding: 1px 6px; border-radius: 2px; margin-left: auto;
}

.sidebar-footer {
  margin-top: auto; padding: 12px 16px;
  border-top: 1px solid #1a1a1a;
  font-family: var(--sw-font-mono); font-size: 10px; color: var(--sw-fg-3);
  display: flex; justify-content: space-between;
}

/* ============== main ============== */
.main {
  padding: 56px 64px 80px;
  max-width: 880px;
  width: 100%;
}
.crumb {
  font-family: var(--sw-font-mono); font-size: 11px;
  color: var(--sw-fg-3); margin-bottom: 12px;
}
.crumb a { color: var(--sw-fg-3); }
.crumb b { color: var(--sw-fg-2); font-weight: 400; }

.h1 {
  font-size: 32px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--sw-fg-accent);
  margin: 0 0 8px;
}
.lede {
  font-size: 16px; color: var(--sw-fg-2);
  max-width: 640px; line-height: 1.55; margin: 0 0 32px;
}
.h2 {
  font-size: 20px; font-weight: 600; color: var(--sw-fg-1);
  margin: 40px 0 16px; letter-spacing: 0;
  border-top: 1px solid #1a1a1a; padding-top: 28px;
}
.h2:first-of-type { border-top: 0; padding-top: 0; }
.h3 {
  font-size: 14px; font-weight: 600;
  color: var(--sw-fg-1); margin: 24px 0 8px;
  letter-spacing: 0;
}
p { margin: 0 0 14px; }
code, kbd {
  font-family: var(--sw-font-mono); font-size: .9em;
  background: var(--sw-bg-groove); border: 1px solid #1a1a1a;
  padding: 1px 6px; border-radius: 2px; color: var(--sw-fg-accent);
}

/* ============== home: cards ============== */
.cardgrid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 24px;
}
.card {
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color var(--sw-dur-fast) var(--sw-ease), background var(--sw-dur-fast) var(--sw-ease);
  cursor: pointer; text-decoration: none;
}
.card:hover { border-color: var(--sw-blue-hi); background: #313131; text-decoration: none; }
.card .icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sw-bg-groove); border: 1px solid #1a1a1a;
  border-radius: 2px; color: var(--sw-fg-accent);
}
.card h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--sw-fg-1); }
.card p { margin: 0; font-size: 12px; color: var(--sw-fg-2); line-height: 1.5; }
.card .more { margin-top: auto; font-family: var(--sw-font-mono); font-size: 10px; color: var(--sw-fg-accent); padding-top: 8px; }

/* ============== quickstart steps ============== */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.step {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 16px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--sw-font-mono); font-size: 13px; font-weight: 500;
  color: var(--sw-fg-accent);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 1px;
}
.step h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--sw-fg-1); }
.step p { margin: 0; font-size: 13px; color: var(--sw-fg-2); }

/* ============== video grid ============== */
.video-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 8px;
}
.video {
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  overflow: hidden; cursor: pointer; text-decoration: none;
  transition: border-color var(--sw-dur-fast) var(--sw-ease);
}
.video:hover { border-color: var(--sw-blue-hi); text-decoration: none; }
.video .thumb {
  position: relative; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e3a5c 0%, #2c2c2c 100%);
  display: flex; align-items: center; justify-content: center;
}
.video .thumb::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(122,176,255,0.18), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(76,159,97,0.12), transparent 40%);
}
.video .play {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(20, 20, 20, 0.7);
  border: 1.5px solid rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  color: #fff; position: relative;
  backdrop-filter: blur(2px);
}
.video .play svg { width: 22px; height: 22px; margin-left: 3px; }
.video .duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.7); padding: 1px 6px; border-radius: 2px;
  font-family: var(--sw-font-mono); font-size: 10px; color: #fff;
}
.video .meta { padding: 12px 14px; }
.video .title { font-size: 13px; font-weight: 600; color: var(--sw-fg-1); margin: 0 0 4px; }
.video .desc  { font-size: 11px; color: var(--sw-fg-3); margin: 0; }
.video .tag {
  display: inline-block; margin-top: 6px;
  font-family: var(--sw-font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sw-green); background: rgba(76,159,97,.12);
  padding: 1px 6px; border-radius: 2px;
}

/* ============== screenshot walkthrough ============== */
.walkthrough { display: flex; flex-direction: column; gap: 28px; margin-top: 8px; }
.shot {
  display: grid; grid-template-columns: 1fr 320px; gap: 24px;
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 20px;
}
.shot .img {
  position: relative; background: var(--sw-bg-deep);
  border-radius: 2px; overflow: hidden; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.shot .img img { max-width: 100%; max-height: 360px; display: block; }
.shot .pin {
  position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: var(--sw-blue-hi); color: #0b1f3a;
  font-family: var(--sw-font-mono); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.shot .copy { display: flex; flex-direction: column; gap: 12px; }
.shot .copy h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--sw-fg-1); }
.shot .ann { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--sw-fg-2); line-height: 1.55; }
.shot .ann .num {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--sw-blue-hi); color: #0b1f3a;
  font-family: var(--sw-font-mono); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.shot .ann b { color: var(--sw-fg-1); font-weight: 600; }

/* ============== downloads ============== */
.dl-list { display: flex; flex-direction: column; gap: 8px; }
.dl {
  display: flex; align-items: center; gap: 14px;
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 14px 16px;
  text-decoration: none; color: inherit;
  transition: border-color var(--sw-dur-fast) var(--sw-ease);
}
.dl:hover { border-color: var(--sw-blue-hi); text-decoration: none; }
.dl .file-ico {
  width: 36px; height: 36px; flex: none;
  background: var(--sw-bg-groove); border: 1px solid #1a1a1a;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sw-font-mono); font-size: 9px; font-weight: 600;
  color: var(--sw-fg-accent); letter-spacing: .04em;
}
.dl .file-meta { flex: 1; }
.dl .file-meta .name { font-size: 13px; color: var(--sw-fg-1); margin: 0; font-weight: 500; }
.dl .file-meta .desc { font-size: 11px; color: var(--sw-fg-3); margin: 2px 0 0; }
.dl .size { font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-fg-3); }
.dl .arrow { color: var(--sw-fg-accent); font-size: 16px; }

/* ============== changelog ============== */
.changelog { display: flex; flex-direction: column; gap: 20px; }
.release {
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 18px 20px;
  display: grid; grid-template-columns: 110px 1fr; gap: 18px;
}
.release .ver-block { display: flex; flex-direction: column; gap: 4px; }
.release .ver-tag {
  font-family: var(--sw-font-mono); font-size: 13px; font-weight: 600;
  color: var(--sw-fg-accent);
}
.release .date {
  font-family: var(--sw-font-mono); font-size: 10px;
  color: var(--sw-fg-3);
}
.release .badge {
  display: inline-block; align-self: flex-start;
  font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--sw-green); color: #0b1f0d;
  padding: 1px 6px; border-radius: 2px; margin-top: 4px;
}
.release ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--sw-fg-2); }
.release li { margin: 4px 0; }
.release li .lbl {
  font-family: var(--sw-font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 2px; margin-right: 6px; vertical-align: middle;
}
.release li .lbl.added { background: rgba(76,159,97,.18); color: var(--sw-green); }
.release li .lbl.fixed { background: rgba(122,176,255,.15); color: var(--sw-blue-hi); }
.release li .lbl.changed { background: rgba(200,144,96,.15); color: var(--sw-amber); }
.release li .lbl.removed { background: rgba(255,96,96,.15); color: var(--sw-red); }

/* ============== contact / bug report ============== */
.form {
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.form .row { display: flex; flex-direction: column; gap: 6px; }
.form .row.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sw-fg-3); font-family: var(--sw-font-mono);
}
.form .req { color: var(--sw-red); margin-left: 2px; }
.form input[type=text], .form input[type=email], .form select, .form textarea {
  background: var(--sw-bg-groove); border: 1px solid #1a1a1a;
  border-radius: 2px; padding: 8px 10px;
  font-family: var(--sw-font-ui); font-size: 13px; color: var(--sw-fg-1);
  box-shadow: var(--sw-bevel-groove); width: 100%;
}
.form textarea { font-family: var(--sw-font-mono); font-size: 12px; min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--sw-blue-hi);
}
.form .submit {
  display: flex; gap: 10px; align-items: center; margin-top: 8px;
}
.btn-primary {
  height: 40px; padding: 0 24px;
  background: #3a5a82; color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid #1a1a1a; border-radius: 2px;
  box-shadow: var(--sw-bevel-button);
  cursor: pointer; font-family: inherit;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary {
  height: 40px; padding: 0 18px;
  background: var(--sw-bg-button); color: var(--sw-fg-1);
  font-size: 12px;
  border: 1px solid #1a1a1a; border-radius: 2px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--sw-bevel-button);
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn-secondary:hover { background: var(--sw-bg-button-hi); text-decoration: none; }
.contact-methods {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin: 0 0 28px;
}
.contact-methods .ch {
  background: var(--sw-bg-panel); border: 1px solid #1a1a1a;
  border-radius: 3px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.contact-methods .ch .label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--sw-fg-3); font-family: var(--sw-font-mono); }
.contact-methods .ch .val { font-size: 14px; color: var(--sw-fg-accent); font-family: var(--sw-font-mono); }
.contact-methods .ch .desc { font-size: 11px; color: var(--sw-fg-3); margin-top: 2px; }

/* ============== admin upload ============== */
.dropzone {
  background: var(--sw-bg-panel);
  border: 1.5px dashed #4a4a4a; border-radius: 3px;
  padding: 48px 24px; text-align: center;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  transition: border-color var(--sw-dur-fast) var(--sw-ease), background var(--sw-dur-fast) var(--sw-ease);
}
.dropzone.over { border-color: var(--sw-blue-hi); background: #313e52; }
.dropzone .big {
  font-size: 16px; color: var(--sw-fg-1); font-weight: 500;
}
.dropzone .small { font-size: 12px; color: var(--sw-fg-3); }
.dropzone .pick {
  margin-top: 12px; padding: 8px 16px; font-size: 12px;
  background: var(--sw-bg-button); color: var(--sw-fg-1);
  border: 1px solid #1a1a1a; border-radius: 2px;
  cursor: pointer; font-family: inherit;
}
.uploads {
  margin-top: 24px; display: flex; flex-direction: column; gap: 8px;
}
.upload-row {
  display: grid; grid-template-columns: 36px 1fr 90px 70px 30px;
  gap: 12px; align-items: center;
  background: var(--sw-bg-panel);
  border: 1px solid #1a1a1a; border-radius: 3px;
  padding: 10px 14px; font-size: 12px;
}
.upload-row .ico {
  width: 28px; height: 28px;
  background: var(--sw-bg-groove); border: 1px solid #1a1a1a; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sw-font-mono); font-size: 9px; color: var(--sw-fg-accent);
}
.upload-row .name { color: var(--sw-fg-1); }
.upload-row .size { font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-fg-3); }
.upload-row .progress {
  height: 4px; background: var(--sw-bg-groove); border-radius: 2px; overflow: hidden;
}
.upload-row .progress > div { height: 100%; background: var(--sw-blue-hi); }
.upload-row .x {
  width: 24px; height: 24px;
  background: transparent; border: 0; color: var(--sw-fg-3);
  font-size: 14px; cursor: pointer;
}
.upload-row .x:hover { color: var(--sw-red); }

.tabbar {
  display: flex; gap: 4px; margin-bottom: 24px;
  border-bottom: 1px solid #1a1a1a;
}
.tabbar a {
  padding: 10px 16px; font-size: 13px;
  color: var(--sw-fg-2); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabbar a:hover { color: var(--sw-fg-1); text-decoration: none; }
.tabbar a.active { color: var(--sw-green); border-bottom-color: var(--sw-green); }

.note {
  background: rgba(122,176,255,.08);
  border-left: 3px solid var(--sw-blue-hi);
  padding: 12px 16px; border-radius: 2px;
  font-size: 13px; color: var(--sw-fg-2); margin: 16px 0;
}
.note b { color: var(--sw-fg-1); }
