/* ContextCraft site — theme mirrors olusion.us */
:root {
  --bg: #060a10;
  --panel: rgba(13, 19, 28, 0.88);
  --panel-border: #1c2836;
  --text: #e8ecf1;
  --text-dim: #5a7a8a;
  --text-mid: #8aa5b5;
  --accent: #4a9eff;
  --accent-dim: #2a5a8a;
  --green: #3ecf8e;
  --red: #e2544a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

canvas#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 3px; color: var(--text-mid); }
.topbar .brand img { width: 34px; height: 34px; border-radius: 8px; border: 0.5px solid var(--panel-border); }
.topbar nav { display: flex; gap: 8px; }
.topbar nav a {
  border: 0.5px solid var(--panel-border);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  background: rgba(13, 19, 28, 0.6);
  transition: border-color 0.15s, color 0.15s;
}
.topbar nav a:hover, .topbar nav a.active { border-color: var(--accent-dim); color: var(--text); }

/* ---------- hero ---------- */
#hero {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px 24px;
}
#hero .app-icon {
  width: 96px; height: 96px;
  border-radius: 22px;
  border: 0.5px solid var(--panel-border);
  box-shadow: 0 0 40px rgba(74, 158, 255, 0.18);
  margin-bottom: 28px;
}
#hero h1 { font-size: 52px; font-weight: 300; letter-spacing: 6px; margin: 0; }
#hero .tagline { font-size: 13px; letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase; margin-top: 10px; }
#hero .lede { max-width: 560px; margin: 28px auto 0; font-size: 15px; line-height: 1.7; color: var(--text-mid); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

.btn {
  background: rgba(13, 19, 28, 0.75);
  backdrop-filter: blur(6px);
  border: 0.5px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px 26px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-mid);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--accent-dim); color: var(--text); }
.btn.primary { background: var(--accent-dim); border-color: var(--accent-dim); color: var(--text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- main column ---------- */
main { position: relative; z-index: 2; max-width: 960px; margin: 0 auto; padding: 0 24px 80px; }

.section-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
  padding-top: 56px;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.card {
  background: var(--panel);
  border: 0.5px solid var(--panel-border);
  border-radius: 8px;
  padding: 18px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent-dim); }
.card .card-title { font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.card .card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; }

/* ---------- screenshots ---------- */
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--accent-dim) transparent;
  scrollbar-width: thin;
}
.shots figure { margin: 0; flex: 0 0 240px; scroll-snap-align: start; }
.shots img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 0.5px solid var(--panel-border);
  background: var(--panel);
  cursor: zoom-in;
}
.shots figcaption { font-size: 12px; color: var(--text-dim); margin-top: 10px; text-align: center; letter-spacing: 0.5px; }

/* lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 10;
  display: none; align-items: center; justify-content: center;
  background: rgba(6, 10, 16, 0.92);
  padding: 20px; cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; border: 0.5px solid var(--panel-border); }

/* ---------- format table ---------- */
.panel { background: var(--panel); border: 0.5px solid var(--panel-border); border-radius: 8px; overflow: hidden; }
table.formats { width: 100%; border-collapse: collapse; font-size: 13px; }
table.formats th, table.formats td { text-align: left; padding: 12px 18px; border-bottom: 0.5px solid var(--panel-border); vertical-align: top; line-height: 1.55; }
table.formats tr:last-child td { border-bottom: none; }
table.formats th { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); font-weight: 400; }
table.formats td:first-child { color: var(--text); white-space: nowrap; }
table.formats td:last-child { color: var(--text-mid); }

/* ---------- policy / prose pages ---------- */
.doc { margin-top: 36px; }
.doc h1 { font-size: 34px; font-weight: 300; letter-spacing: 4px; margin: 0; }
.doc .meta { font-size: 12px; letter-spacing: 1px; color: var(--text-dim); margin-top: 10px; }
.doc .summary { margin-top: 28px; padding: 18px 22px; border-left: 2px solid var(--green); }
.doc .summary p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text); }
.doc section { margin-top: 8px; }
.doc h2 { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); font-weight: 400; margin: 40px 0 14px; }
.doc p, .doc li { font-size: 14px; line-height: 1.75; color: var(--text-mid); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text); font-weight: 500; }
.doc a.inline { color: var(--accent); border-bottom: 0.5px solid var(--accent-dim); }
.doc a.inline:hover { color: var(--text); }
.doc code { font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text); background: rgba(10, 17, 25, 0.9); border: 0.5px solid var(--panel-border); border-radius: 4px; padding: 1px 6px; }

footer { position: relative; z-index: 2; text-align: center; padding: 30px 20px 40px; font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }
footer a { color: var(--text-mid); }
footer a:hover { color: var(--text); }
footer .sep { margin: 0 8px; opacity: 0.5; }

@media (max-width: 560px) {
  #hero h1 { font-size: 34px; letter-spacing: 4px; }
  .doc h1 { font-size: 26px; letter-spacing: 3px; }
  .topbar .brand span { display: none; }
  table.formats td:first-child { white-space: normal; }
  .shots figure { flex-basis: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
