/* SilverDempa — silverdempa.com */

:root {
  --ink:      #0a0c16;
  --ink-2:    #0f1322;
  --panel:    #151a2d;
  --panel-2:  #1c2238;
  --line:     #29314f;
  --line-hi:  #3b4570;
  --text:     #e9ecff;
  --muted:    #98a1c8;
  --mint:     #3ef0b0;
  --cyan:     #1aa6d8;
  --pink:     #ff5ea8;
  --amber:    #ffd166;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 3px
  );
}

img { max-width: 100%; display: block; }
.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--mint); text-decoration-color: rgba(62, 240, 176, 0.4); }
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 22, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 26px; height: 26px; }
.brand b { color: var(--mint); font-weight: 700; }
.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--mint); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(26, 166, 216, 0.22), transparent 70%),
    radial-gradient(45% 45% at 85% 25%, rgba(255, 94, 168, 0.16), transparent 70%),
    linear-gradient(to bottom, transparent, var(--ink) 85%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, rgba(59, 69, 112, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 69, 112, 0.35) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid rgba(62, 240, 176, 0.35);
  background: rgba(62, 240, 176, 0.07);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
  margin: 1rem 0 0.9rem;
}
.wordmark .l1 { display: block; color: var(--text); text-shadow: 3px 3px 0 rgba(26, 166, 216, 0.55); }
.wordmark .l2 { display: block; color: var(--mint); text-shadow: 3px 3px 0 rgba(255, 94, 168, 0.5); }

.lede { color: var(--muted); font-size: 1.06rem; max-width: 46ch; }
.lede strong { color: var(--text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--line-hi);
  background: var(--panel);
  color: var(--text);
}
.btn:hover { border-color: var(--mint); color: var(--mint); }
.btn-primary {
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  border-color: transparent;
  color: #06231b;
  font-weight: 700;
}
.btn-primary:hover { color: #06231b; filter: brightness(1.08); }
.btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.85;
  background: var(--panel);
  color: var(--muted);
  border-style: dashed;
}
.btn[aria-disabled="true"]:hover { border-color: var(--line-hi); color: var(--muted); }

/* ---------- live demo ---------- */

.demo {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo-bar .led { width: 8px; height: 8px; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.demo-bar .right { margin-left: auto; color: var(--line-hi); }

.demo-screen { background: #05060c; padding: 0.8rem; }
.demo-screen canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 1px solid var(--line);
}

.demo-controls { padding: 0.9rem 0.8rem 1rem; border-top: 1px solid var(--line); }
.ctl-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.45rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chip:hover { border-color: var(--line-hi); color: var(--text); }
.chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
  font-weight: 700;
}
.chip .sw { display: inline-flex; }
.chip .sw i { width: 6px; height: 12px; display: block; }

.ctl-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.ctl-row .ctl-label { margin: 0; white-space: nowrap; }
input[type="range"] {
  flex: 1 1 140px;
  min-width: 120px;
  accent-color: var(--mint);
  background: transparent;
}
.readout {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--mint);
  min-width: 6ch;
  text-align: right;
}

/* ---------- sections ---------- */

section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-head { margin-bottom: 1.75rem; }
h2 {
  font-family: var(--mono);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
h2 .accent { color: var(--mint); }
.section-head p { color: var(--muted); margin-top: 0.5rem; max-width: 60ch; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.25rem;
}
.feature:hover { border-color: var(--line-hi); }
.feature .ico {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 3px;
  margin-bottom: 0.9rem;
  width: max-content;
}
.feature .ico i { width: 8px; height: 8px; background: var(--line-hi); display: block; }
.feature h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.feature p { color: var(--muted); font-size: 0.95rem; }

.palette-list { display: grid; gap: 0.6rem; }
.palette-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  flex-wrap: wrap;
}
.palette-row .pname {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  min-width: 11ch;
}
.palette-row .swatches { display: flex; flex: 1 1 200px; height: 20px; }
.palette-row .swatches i { flex: 1 1 0; display: block; }
.palette-row .pnote { color: var(--muted); font-size: 0.82rem; }

.privacy-banner {
  background: linear-gradient(135deg, rgba(62, 240, 176, 0.09), rgba(26, 166, 216, 0.07));
  border: 1px solid rgba(62, 240, 176, 0.3);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
.privacy-banner div { flex: 1 1 320px; }
.privacy-banner h2 { margin-bottom: 0.4rem; }
.privacy-banner p { color: var(--muted); }

/* ---------- document pages ---------- */

.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 3rem; }
.doc h1 {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.doc h2 { margin: 2.4rem 0 0.75rem; font-size: 1.15rem; }
.doc h2:first-of-type { margin-top: 1.75rem; }
.doc p, .doc li { color: #ccd3f0; }
.doc ul { padding-left: 1.3rem; margin: 0.6rem 0; }
.doc li { margin-bottom: 0.35rem; }
.doc strong { color: var(--text); }
.dates {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.6rem;
}
.callout {
  border-left: 3px solid var(--mint);
  background: var(--panel);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.callout p { color: var(--text); }

table.apps {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
  background: var(--panel);
  border: 1px solid var(--line);
}
table.apps th, table.apps td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.apps tr:last-child td { border-bottom: none; }
table.apps th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
table.apps td { color: #ccd3f0; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--amber);
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 0.05em 0.35em;
}
.table-scroll { overflow-x: auto; }

.muted { color: var(--muted); font-size: 0.92rem; }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site .wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
footer.site nav { margin-left: auto; display: flex; gap: 1.25rem; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--mint); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar nav .opt { display: none; }
  .brand { font-size: 0.82rem; letter-spacing: 0.1em; }
  .palette-row .pname { min-width: auto; }
  .privacy-banner .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
