/* Tokens mirror source/Pixelffector/Resources/Styles/Colors.xaml */
:root {
  --app-ground: #0b0c0d;
  --sheet-ground: #151719;
  --brand-ground: #141825;
  --text: #f2f2f3;
  --text-dim: #98989b;
  --text-faint: #7a7a7d;
  --accent: #5980a6;
  --accent-400: #94bce3;
  --accent-300: #b5d9fd;
  --accent-600: #416180;
  --neutral-800: #424244;
  --neutral-900: #2b2b2d;
  --shell-plastic: #c9c6b4;
  --accent-tint: rgba(148, 188, 227, .1);

  --f-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "DM Mono", ui-monospace, monospace;

  --radius: 4px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--app-ground);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
  margin: 0;
}
h1 { font-size: clamp(48px, 8vw, 88px); }
h2 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 28px; }
h3 { font-size: 24px; margin-bottom: 8px; }

.accent { color: var(--accent-400); }

.eyebrow, .mono, .num, figcaption, .readout, .frame-hud {
  font-family: var(--f-mono);
  letter-spacing: .08em;
}
.eyebrow { color: var(--accent-400); font-size: 13px; margin: 0 0 14px; }
.lead { color: var(--text-dim); font-size: 19px; max-width: 34em; }
.narrow { margin-top: -12px; margin-bottom: 36px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 12, 13, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-900);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 22px var(--f-head); letter-spacing: .06em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 24px; align-items: center; font: 600 16px var(--f-head); text-transform: uppercase; letter-spacing: .06em; }
.nav-links a { text-decoration: none; color: var(--text-dim); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { color: var(--accent-400); border-bottom: 1px solid var(--accent-400); }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 24px; text-decoration: none;
  font: 600 18px var(--f-head); text-transform: uppercase; letter-spacing: .08em;
  border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--text); }
.btn-primary:hover { background: var(--accent-600); }
.btn-ghost { border: 1px solid var(--neutral-800); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-400); color: var(--accent-400); }

/* Corner registration marks */
.corner-marks { position: relative; }
.corner-marks::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  --m: 12px; --c: var(--accent-400);
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--m),
    linear-gradient(var(--c), var(--c)) top right / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--m),
    linear-gradient(var(--c), var(--c)) bottom left / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--m),
    linear-gradient(var(--c), var(--c)) bottom right / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--m);
  background-repeat: no-repeat;
}

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 96px;
}
.hero .lead { margin: 24px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.readout {
  display: flex; gap: 32px; margin: 40px 0 0; padding-top: 20px;
  border-top: 1px solid var(--neutral-900); font-size: 13px;
}
.readout dt { color: var(--text-faint); }
.readout dd { margin: 4px 0 0; color: var(--text); font-size: 15px; }

.hero-visual { max-width: 420px; justify-self: center; width: 100%; }
.frame { padding: 10px; border: 1px solid var(--neutral-900); background: var(--sheet-ground); }
#demo { width: 100%; aspect-ratio: 4 / 5; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.frame-hud { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); padding: 10px 2px 0; }
#demo-name { color: var(--text); }
.swatch-row { display: flex; height: 14px; margin-top: 14px; gap: 2px; }
.swatch-row span { flex: 1; transition: background .3s; }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--neutral-900); }
.section > .wrap:first-child h2 { margin-bottom: 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 28px 24px; border: 1px solid var(--neutral-900); background: var(--sheet-ground); }
.card p { margin: 0; color: var(--text-dim); font-size: 16px; }
.num { display: block; color: var(--accent-400); font-size: 12px; margin-bottom: 18px; }

/* Screenshots */
.shots {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 24px;
  scrollbar-width: thin; scrollbar-color: var(--neutral-800) transparent;
}
.shots figure { margin: 0; flex: 0 0 240px; scroll-snap-align: start; }
.shot {
  display: block; padding: 0; border: 1px solid var(--neutral-900); background: none; cursor: zoom-in;
  border-radius: 22px; overflow: hidden; transition: border-color .15s, transform .2s;
}
.shot:hover { border-color: var(--accent-400); transform: translateY(-4px); }
figcaption { font-size: 12px; color: var(--text-dim); margin-top: 12px; text-align: center; }

/* Palettes */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pal {
  border: 1px solid var(--neutral-900); padding: 16px; background: var(--sheet-ground);
  transition: border-color .15s, background .15s;
}
.pal:hover { border-color: var(--accent-400); background: var(--accent-tint); }
.pal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pal-name { font: 600 20px var(--f-head); text-transform: uppercase; letter-spacing: .04em; }
.pal-count { font: 12px var(--f-mono); color: var(--text-faint); }
.pal-strip { display: flex; height: 22px; }
.pal-strip span { flex: 1; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { border-top: 2px solid var(--accent); padding-top: 20px; }
.steps p { margin: 0; color: var(--text-dim); }

/* History */
.history { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.history-copy .lead { margin-top: 0; }
.history-copy p:not(.lead) { color: var(--text-dim); margin: 0; max-width: 38em; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 1px solid var(--neutral-800); }
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -29px; top: 2px; width: 9px; height: 9px;
  background: var(--app-ground); border: 1px solid var(--accent-400);
}
.timeline li:first-child::before { background: var(--accent-400); }
.timeline .num { margin-bottom: 8px; }
.timeline p { margin: 0; color: var(--text-dim); font-size: 16px; }

/* Download */
.download {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(89, 128, 166, .25), transparent 60%),
    var(--brand-ground);
  border-top: 1px solid var(--neutral-900);
  padding: 96px 0;
}
.download-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.download-icon { border-radius: 24px; margin-bottom: 28px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.download h2 { margin-bottom: 8px; }
.download .lead { margin: 0 0 36px; }
.stores { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.store {
  display: flex; align-items: center; gap: 12px; min-width: 200px;
  padding: 12px 22px; text-decoration: none;
  background: #000; color: #fff; border: 1px solid var(--neutral-800); border-radius: 10px;
  transition: border-color .15s, transform .15s;
}
.store:hover { border-color: var(--accent-400); transform: translateY(-2px); }
.store svg { width: 30px; height: 30px; flex: none; }
.store span { display: flex; flex-direction: column; text-align: left; font: 600 22px/1.05 var(--f-body); }
.store small { font: 400 12px var(--f-body); letter-spacing: .02em; }

/* Footer */
.footer { border-top: 1px solid var(--neutral-900); padding: 28px 0; color: var(--text-faint); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--accent-400); }

.footer-links { display: flex; gap: 20px; }

/* Text pages (privacy, license) */
.doc { padding: 64px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { margin-bottom: 12px; }
.doc h2 { font-size: 28px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text-dim); }
.doc .updated { font: 13px var(--f-mono); letter-spacing: .08em; color: var(--text-faint); margin: 0 0 32px; }
.doc a { color: var(--accent-400); overflow-wrap: anywhere; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.credits li { background: var(--sheet-ground); border: 1px solid var(--neutral-900); padding: 20px 22px; }
.credits h3 { font-size: 22px; margin: 0; color: var(--text); }
.credits p { margin: 8px 0 0; font-size: 16px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .88);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 24px; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 46px; height: 46px;
  background: none; border: 1px solid var(--neutral-800); color: var(--text); font-size: 18px; cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; gap: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .history { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .readout { gap: 20px; flex-wrap: wrap; }
  .shots figure { flex-basis: 200px; }
  .section { padding: 64px 0; }
}

/* Palette inspirations page (palettes.html) */
.notice { margin: 32px 0 8px; padding: 20px 22px; border: 1px solid var(--neutral-900); background: var(--sheet-ground); }
.notice h2 { margin-top: 0; font-size: 22px; }
.notice p { margin: 0; font-size: 15px; }
.inspirations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.inspirations li { padding: 18px 20px; border: 1px solid var(--neutral-900); background: var(--sheet-ground); }
.insp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.insp-head h3 { margin: 0; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.insp-count { font: 12px var(--f-mono); color: var(--text-faint); }
.insp-orig { margin: 14px 0 6px; color: var(--text); font-size: 16px; }
.insp-app { margin: 0; font: 13px var(--f-mono); color: var(--text-faint); }

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

/* Shared palette fallback page (palette/index.html) */
.shared-pal { max-width: 420px; margin: 8px 0 8px; }
.shared-pal .pal-strip { height: 34px; }
.doc .btn-primary { color: var(--text); }
.doc .store { color: #fff; }
.doc .stores { justify-content: flex-start; margin-top: 16px; }

/* Social profiles strip (above the footer on every page) */
.socials { border-top: 1px solid var(--neutral-900); padding: 40px 0; }
.socials-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.socials-title { font: 13px var(--f-mono); letter-spacing: .08em; color: var(--text-faint); }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.social-links a {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 44px;
  border: 1px solid var(--neutral-900); background: var(--sheet-ground); color: var(--text-dim);
  text-decoration: none; font: 600 16px var(--f-head); text-transform: uppercase; letter-spacing: .06em;
  transition: color .15s, border-color .15s;
}
.social-links a:hover { color: var(--accent-400); border-color: var(--accent-400); }
.social-links svg { width: 20px; height: 20px; flex: none; }

/* Promo video in "How it works" (index_new.html) */
.video { margin-top: 48px; padding: 10px; border: 1px solid var(--neutral-900); background: var(--sheet-ground); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
