/* StackPad website: night glass, after the app icon. System fonts only, so the site makes no third-party requests. */

:root {
  --bg: #070a1f;
  --bg-2: #0e1438;
  --bg-3: #1a2366;
  --text: #e8eaf6;
  --text-dim: #9aa0c3;
  --text-faint: #6b7199;
  --accent: #0a84ff;
  --purple: #bf5af2;
  --cyan: #40c8e0;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --edge: rgba(255, 255, 255, 0.14);
  --edge-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 30px 80px rgba(2, 4, 20, 0.55);
  --radius: 22px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Syntax colours from the app's dark palette. */
  --syn-key: #6bdfff;
  --syn-string: #fc6a5d;
  --syn-number: #d9c97c;
  --syn-keyword: #fc5fa3;
  --jwt-header: #ff9f5a;
  --jwt-payload: #b69cff;
  --jwt-signature: #5fd37a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* The backdrop: the icon's gradient with its purple and cyan glows, fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vmax 50vmax at 85% -5%, rgba(191, 90, 242, 0.32), transparent 60%),
    radial-gradient(55vmax 45vmax at -10% 105%, rgba(64, 200, 224, 0.22), transparent 60%),
    radial-gradient(40vmax 30vmax at 50% 40%, rgba(10, 132, 255, 0.10), transparent 70%),
    linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 45%, var(--bg) 100%);
}

a { color: #7cc0ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(7, 10, 31, 0.55);
  border-bottom: 1px solid var(--edge-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--text-dim); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--edge);
  color: var(--text);
  background: var(--glass);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; background: var(--glass-strong); transform: translateY(-1px); }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #3b9bff, #0a84ff 55%, #5b5bf0);
  box-shadow: 0 10px 30px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #52a7ff, #2b93ff 55%, #6c6cf3); }
.btn svg { width: 20px; height: 20px; }
.btn small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; line-height: 1.1; }
.btn .two-line { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }

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

.hero { padding: 72px 0 40px; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-copy .lede { margin-inline: auto; }
.hero-copy .cta { justify-content: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: #c9d4ff; background: rgba(10, 132, 255, 0.14); border: 1px solid rgba(10, 132, 255, 0.35);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jwt-signature); box-shadow: 0 0 10px var(--jwt-signature); }
h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 20px 0 18px;
  font-weight: 750;
}
.gradient-text {
  background: linear-gradient(100deg, #7df9ff 0%, #6fb6ff 35%, #b69cff 70%, #f08cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 19px; color: var(--text-dim); max-width: 34em; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 14px; color: var(--text-faint); margin-top: 16px; }

/* The stacked pads from the icon, floating behind the app window. */
.stage { position: relative; isolation: isolate; margin-top: 64px; }
.pad { position: absolute; border-radius: 40px; z-index: -1; filter: saturate(115%); }
.pad-1 { inset: -44px 2% 18% 22%; background: linear-gradient(135deg, #d98bff, #8e3fd6); transform: rotate(-4deg); opacity: 0.7; animation: float 9s ease-in-out infinite; }
.pad-2 { inset: -18px 8% 10% 12%; background: linear-gradient(135deg, #6fe3f5, #0a84ff); transform: rotate(-4deg); opacity: 0.65; animation: float 9s ease-in-out -3s infinite; }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ---------- App window, after a real StackPad screenshot ---------- */

.app {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(30, 31, 36, 0.82);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  line-height: 1.4;
  color: #e3e5ec;
  text-align: left;
}
.app svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-titlebar { position: relative; height: 30px; display: flex; align-items: center; }
.lights { display: flex; gap: 8px; padding-left: 14px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.app-title { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #b9bcc6; pointer-events: none; }
.app-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); }

.app-side { padding: 4px 8px 12px; overflow: hidden; }
.app-search { display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; color: #9a9da5; }
.app-field { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.app-side h6 { margin: 12px 10px 4px; font-size: 11px; font-weight: 650; color: #9a9da5; }
.app-side ul { list-style: none; margin: 0; padding: 0; }
.app-side li { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 8px; white-space: nowrap; overflow: hidden; color: #e3e5ec; }
.app-side li svg { color: #9a9da5; }
.app-side li.on { background: rgba(10, 132, 255, 0.22); }
.app-side li.on svg { color: #64a8ff; }

.app-pane {
  margin: 0 10px 10px 0; padding: 18px 20px; border-radius: 12px; min-width: 0;
  background: rgba(20, 21, 25, 0.72); border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; gap: 12px;
}
.app-head { display: flex; align-items: center; gap: 12px; }
.tool-icon {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6aa9ff, #0a84ff 55%, #0866cc);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
}
.tool-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.app-head-text { flex: 1; min-width: 0; }
.app-head-text b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }
.app-head-text span { color: #9a9da5; font-size: 14px; }
.head-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; color: #8a8d96; font-weight: 500; }
.head-btn.on { color: #5aa2ff; }
.segments { display: inline-flex; align-self: flex-start; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; overflow: hidden; }
.segments span { padding: 5px 13px; color: #c9ccd4; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.segments span:first-child { border-left: 0; }
.segments span.on { background: rgba(255, 255, 255, 0.1); color: #fff; }

.find { display: flex; align-items: center; gap: 10px; color: #c9ccd4; }
.find-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; color: #fff;
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid #3d82f0;
}
.find-field svg { color: #9a9da5; }
.find-field .find-clear { margin-left: auto; width: 14px; height: 14px; }
.caret { width: 1px; height: 16px; background: #fff; margin-left: -8px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.find-count { font-size: 13px; white-space: nowrap; }
.find-nav { width: 18px !important; height: 18px !important; }

.viewer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
.tree, .details { border-radius: 9px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.1); min-width: 0; }
.tree { padding: 6px 0; font: 13px/26px var(--mono); }
.row { display: flex; align-items: center; white-space: pre; overflow: hidden; padding: 0 10px 0 calc(8px + var(--d) * 22px); color: #e3e5ec; }
.row.selected { background: rgba(10, 132, 255, 0.2); }
.row.hit { background: rgba(255, 159, 10, 0.13); }
.row .tw { width: 16px; height: 16px; margin-right: 4px; color: #9a9da5; flex: none; }
.row .ty { width: 16px; margin-right: 8px; color: #b5b8c1; flex: none; font-size: 11px; text-align: center; }
.row svg.ty { height: 14px; }
.row .lb { color: #b5b8c1; }
.row .pv { color: #b5b8c1; }
.row-tools { display: inline-flex; gap: 2px; margin-left: 10px; color: #9a9da5; }
.row-tools svg { width: 14px; height: 14px; }
mark { background: rgba(255, 159, 10, 0.5); color: #fff; border-radius: 2px; }
.details { display: flex; flex-direction: column; font-size: 13px; }
.details .path { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 6px; font: 13px var(--mono); }
.details .path svg { color: #9a9da5; }
.details .info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 12px 12px; color: #9a9da5; border-bottom: 1px solid rgba(255, 255, 255, 0.1); white-space: nowrap; }
.details .info .ty { width: 15px; height: 15px; }
.details .pill { margin-left: auto; padding: 2px 9px; border-radius: 10px; color: #e3e5ec; background: rgba(255, 159, 10, 0.2); font-size: 12px; }
.details .copy-btn { display: inline-flex; align-items: center; gap: 6px; color: #5aa2ff; font-weight: 500; }
.details .value { padding: 12px; font: 13px var(--mono); }

/* Code blocks and syntax colours, shared by the window and the demo cards. */
.code {
  margin: 0; padding: 10px 12px; border-radius: 9px; min-width: 0;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--edge-soft);
  font: 12px/1.55 var(--mono); color: #cfd3e6; white-space: pre; overflow: hidden;
}
.code .label { display: block; font: 600 11px var(--sans); color: var(--text-faint); margin-bottom: 6px; }
.k { color: var(--syn-key); }
.s { color: var(--syn-string); }
.n { color: var(--syn-number); }
.w { color: var(--syn-keyword); }

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

section { padding: 72px 0; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 12px; }
.section-head p { color: var(--text-dim); margin: 0; font-size: 18px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--edge-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Privacy promise strip */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise .glass { padding: 26px; }
.promise .big { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; line-height: 1; margin-bottom: 10px; }
.promise p { margin: 0; color: var(--text-dim); font-size: 16px; }

/* Paste-and-go demos */
.demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.demo { padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.demo h3 { margin: 0; font-size: 18px; }
.demo p { margin: 0; color: var(--text-dim); font-size: 15px; }
.demo .code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; }
.wrap-code { white-space: pre-wrap; word-break: break-all; }
.arrow { text-align: center; color: var(--text-faint); font-size: 18px; line-height: 1; }
.jh { color: var(--jwt-header); }
.jp { color: var(--jwt-payload); }
.js { color: var(--jwt-signature); }

/* Tool catalogue */
.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category { padding: 24px; }
.category h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; }
.category h3 .count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--text-faint); }
.glyph {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font: 700 14px var(--mono); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.g-data { background: linear-gradient(135deg, #5aa9ff, #0a84ff); }
.g-fmt { background: linear-gradient(135deg, #7ff0ff, #1fb5d6); }
.g-hash { background: linear-gradient(135deg, #ffb27a, #e8690f); }
.g-enc { background: linear-gradient(135deg, #cdb8ff, #8a5cf6); }
.g-db { background: linear-gradient(135deg, #8ff0a8, #2e9e4f); }
.g-img { background: linear-gradient(135deg, #ff9ad5, #d63d97); }
.category ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.category li { display: flex; flex-direction: column; }
.category li b { font-weight: 600; font-size: 15.5px; }
.category li span { color: var(--text-dim); font-size: 14px; line-height: 1.4; }

/* Feature rows */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { padding: 28px; }
.feature h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--text-dim); }
.feature .tag { display: inline-block; margin-bottom: 14px; font: 600 12px var(--mono); color: var(--syn-key); letter-spacing: 0.04em; }

/* Closing call to action */
.closing { text-align: center; padding: 56px 24px; }
.closing img { width: 120px; height: 120px; margin-bottom: 8px; }
.closing h2 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 10px; letter-spacing: -0.02em; }
.closing p { color: var(--text-dim); margin: 0 auto 26px; max-width: 32em; }

/* ---------- Document pages (privacy, support) ---------- */

.doc { padding: 56px 0 80px; }
.doc .wrap { width: min(820px, 100% - 32px); }
.doc-card { padding: clamp(24px, 5vw, 48px); }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin: 0 0 6px; }
.doc .meta { color: var(--text-faint); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #cfd3ea; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc code { font: 0.88em var(--mono); background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.summary {
  padding: 18px 20px; border-radius: 16px; margin: 0 0 8px;
  background: rgba(95, 211, 122, 0.08); border: 1px solid rgba(95, 211, 122, 0.3);
}
.summary strong { color: #8ff0a8; }
.contact-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 22px 24px; margin: 8px 0 12px; }
.contact-card p { margin: 0; }
details { border-top: 1px solid var(--edge-soft); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--edge-soft); }
summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text-faint); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p, details ul { margin: 10px 0 0; }

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

footer { border-top: 1px solid var(--edge-soft); padding: 32px 0 48px; color: var(--text-faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; }
footer a { color: var(--text-dim); }

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

@media (max-width: 980px) {
  .hero { padding-top: 48px; }
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-pane { margin: 0 10px 10px; }
  .categories, .demos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links { gap: 16px; font-size: 14px; }
  .nav-links .hide-sm { display: none; }
  .viewer { grid-template-columns: 1fr; }
  .app-pane { padding: 14px; }
  .app-head-text b { font-size: 17px; }
  .head-btn { padding: 4px; font-size: 0; gap: 0; }
  .tree { font-size: 12px; }
  .row { padding-left: calc(6px + var(--d) * 14px); }
  .find-count { font-size: 12px; }
  .promise, .demos, .categories, .features { grid-template-columns: 1fr; }
  .pad-1 { inset: -28px 0 30% 18%; }
  .pad-2 { inset: -12px 6% 20% 8%; }
  section { padding: 52px 0; }
  footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pad-1, .pad-2, .caret { animation: none; }
  .btn { transition: none; }
}
