/* ZiaPixel Tools — site styles */
/* Brand palette from the ZiaPixel website (ziapixel.com css/styles.css) */
:root {
  --obsidian: #0B1014;
  --gypsum: #F4F1E8;
  --graphite: #3B4248;
  --copper: #E25A3C;

  --paper: var(--obsidian);
  --sheet: #151C21;
  --ink: var(--gypsum);
  --mute: rgba(244, 241, 232, 0.72);
  --rule: rgba(244, 241, 232, 0.14);
  --slip-shadow: 0 0 0 1px rgba(244, 241, 232, 0.06), 0 18px 40px -18px rgba(0, 0, 0, .8);
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--copper); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 50; padding: 14px 0;
  background: rgba(11, 16, 20, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease;
}
.site-head.is-scrolled { border-bottom-color: var(--rule); background: rgba(11, 16, 20, .86); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 132px; height: 25px; background: var(--ink);
  -webkit-mask: url("../assets/ziapixel-logo.svg") left center / contain no-repeat;
          mask: url("../assets/ziapixel-logo.svg") left center / contain no-repeat;
}
.brand-name { font-weight: 600; font-variation-settings: "wdth" 112; font-size: 1.05rem; padding-left: 12px; border-left: 1px solid var(--rule); }
.nav { display: flex; align-items: center; gap: 26px; font-size: .94rem; }
.nav a:not(.btn) { color: var(--mute); text-decoration: none; transition: color .2s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--gypsum); }

/* Hero */
.hero { padding: clamp(32px, 7vw, 88px) 0 clamp(48px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: .98;
  letter-spacing: -.02em;
  font-weight: 300;
  font-variation-settings: "wdth" 125;
  margin: 0 0 24px;
  max-width: 15ch;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--mute); max-width: 40ch; margin: 0 0 32px; }
.status { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet);
  font-size: .95rem;
}
.pill svg { width: 18px; height: 18px; }
.pill.solid { background: var(--copper); color: var(--obsidian); border-color: transparent; text-decoration: none; font-weight: 600; }

/* Hero demo: transcript → task */
.demo { position: relative; min-height: 500px; }
.transcript {
  background: var(--sheet); border-radius: 14px; padding: 22px 24px 26px;
  box-shadow: var(--slip-shadow); max-width: 440px;
}
.transcript header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; color: var(--mute); font-size: .85rem; }
.transcript header strong { color: var(--ink); font-weight: 600; font-size: .95rem; }
.rec { display: inline-flex; align-items: center; gap: 6px; }
.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); }
.line { margin: 0 0 12px; font-size: .98rem; line-height: 1.5; }
.line b { display: block; font-size: .8rem; font-weight: 600; color: var(--mute); margin-bottom: 2px; }
.mark {
  background-image: linear-gradient(rgba(226, 90, 60, .38), rgba(226, 90, 60, .38));
  background-repeat: no-repeat; background-size: 100% 88%; background-position: 0 60%;
  color: var(--gypsum); padding: 0 2px; border-radius: 2px;
}
.board {
  position: absolute; right: 0; bottom: 0; width: min(300px, 70%);
  background: color-mix(in srgb, var(--paper) 70%, var(--sheet));
  border: 1px solid var(--rule); border-radius: 14px; padding: 14px;
}
.board h3 { margin: 0 0 10px; font-size: .85rem; font-weight: 600; color: var(--mute); display: flex; justify-content: space-between; }
.task {
  background: var(--sheet); border-radius: 10px; padding: 12px 14px; margin-top: 8px;
  box-shadow: var(--slip-shadow); font-size: .92rem; line-height: 1.35;
}
.task small { display: flex; gap: 10px; margin-top: 8px; color: var(--mute); font-size: .78rem; }
.task.new { border-left: 4px solid var(--copper); }
.avatar { width: 18px; height: 18px; border-radius: 50%; background: var(--copper); color: var(--obsidian); font-size: .65rem; font-weight: 700; display: inline-grid; place-items: center; }

@media (prefers-reduced-motion: no-preference) {
  .anim .mark { background-size: 0% 88%; animation: sweep .9s cubic-bezier(.6,.0,.2,1) .9s forwards; }
  .anim .task.new { opacity: 0; transform: translate(-60px, -150px) rotate(-4deg) scale(.96); animation: lift 1s cubic-bezier(.2,.8,.2,1) 2.1s forwards; }
  .anim .task.new + .task, .anim .board .task:first-of-type:not(.new) { animation: nudge .5s ease 2.5s both; }
}
@keyframes sweep { to { background-size: 100% 88%; } }
@keyframes lift { 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes nudge { from { transform: translateY(-6px); } to { transform: none; } }

/* Sections */
section.block { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--rule); }
.block h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.05; letter-spacing: -.015em;
  font-weight: 300; font-variation-settings: "wdth" 125; margin: 0 0 16px; max-width: 20ch;
}
.block .intro { color: var(--mute); max-width: 52ch; margin: 0 0 48px; font-size: 1.1rem; }

.kits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.kit { padding: 20px 24px 8px 0; }
.kit + .kit { padding-left: 24px; border-left: 1px solid var(--rule); }
.kit h3 { font-size: 1.15rem; font-weight: 700; font-variation-settings: "wdth" 112; margin: 0 0 4px; }
.kit p { margin: 0 0 16px; color: var(--mute); font-size: .95rem; }
.kit ul { list-style: none; padding: 0; margin: 0; }
.kit li { padding: 8px 0; border-top: 1px dashed var(--rule); font-size: .98rem; }

.datamap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.flows { list-style: none; padding: 0; margin: 0; }
.flows li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--rule); }
.flows li:last-child { border-bottom: 1px solid var(--rule); }
.flows dt, .flows .what { font-weight: 600; }
.flows .where { color: var(--mute); }
.flows .where strong { color: var(--ink); font-weight: 600; }

.callout { background: var(--sheet); border-radius: 14px; padding: 28px; box-shadow: var(--slip-shadow); }
.callout h3 { margin: 0 0 8px; font-size: 1.2rem; font-variation-settings: "wdth" 112; }
.callout p { margin: 0 0 12px; color: var(--mute); }
.callout p:last-child { margin: 0; }

/* Document pages (privacy, terms, support) */
.doc { padding: clamp(32px, 6vw, 72px) 0 96px; }
.doc .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.doc h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1; font-weight: 300; font-variation-settings: "wdth" 125; letter-spacing: -.02em; margin: 0 0 12px; }
.doc .meta { color: var(--mute); margin: 0 0 40px; }
.doc article { max-width: var(--measure); }
.doc h2 { font-size: 1.35rem; font-variation-settings: "wdth" 112; margin: 48px 0 12px; line-height: 1.2; scroll-margin-top: 24px; }
.doc h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.doc p, .doc li { margin: 0 0 14px; }
.doc ul { padding-left: 1.2em; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-top: 1px solid var(--rule); }
.doc th { font-weight: 600; }
.toc { position: sticky; top: 24px; align-self: start; font-size: .92rem; }
.toc p { font-weight: 600; margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--mute); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--copper); }

.faq details { border-top: 1px solid var(--rule); padding: 4px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--copper); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 12px; color: var(--mute); }
.contact-card { background: var(--sheet); border-radius: 14px; padding: 24px 28px; box-shadow: var(--slip-shadow); margin: 0 0 32px; }
.contact-card p { margin: 0 0 6px; }
.contact-card .big { font-size: 1.35rem; font-weight: 600; font-variation-settings: "wdth" 112; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: .92rem; color: var(--mute); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--ink); }

@media (max-width: 900px) {
  .hero .wrap, .datamap { grid-template-columns: 1fr; }
  .kits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit:nth-child(3) { padding-left: 0; border-left: 0; }
  .kit:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .doc .wrap { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 560px) {
  .kits { grid-template-columns: 1fr; }
  .kit, .kit + .kit { padding: 20px 0 8px; border-left: 0; }
  .kit + .kit { border-top: 1px solid var(--rule); }
  .flows li { grid-template-columns: 1fr; gap: 4px; }
  .demo { min-height: 0; }
  .board { position: relative; width: 88%; margin: -28px 0 0 auto; }
  .anim .task.new { transform: translate(-30px, -90px) rotate(-3deg); }
  .nav { gap: 16px; }
  .brand-mark { width: 104px; }
}
.nowrap { white-space: nowrap; }

/* Film grain, as on ziapixel.com (static here) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.board { background: #10171B; }
.kits { border-top-color: var(--copper); }
.pill.solid { padding: 10px 20px; }

/* Buttons (match ziapixel.com: copper pill, obsidian text) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--copper); color: var(--obsidian); font-weight: 600; text-decoration: none;
  padding: 14px 26px; border-radius: 999px; font-size: 1rem; line-height: 1;
  box-shadow: 0 0 0 0 rgba(226, 90, 60, 0), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .2s ease, box-shadow .3s ease, background-color .2s;
}
.btn:hover { background: #EA6A4D; box-shadow: 0 10px 30px -10px rgba(226, 90, 60, .7), inset 0 1px 0 rgba(255,255,255,.2); transform: translateY(-1px); text-decoration: none; }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-ghost { background: rgba(244, 241, 232, .06); color: var(--gypsum); box-shadow: inset 0 0 0 1px rgba(244, 241, 232, .18); }
.btn-ghost:hover { background: rgba(244, 241, 232, .11); box-shadow: inset 0 0 0 1px rgba(244, 241, 232, .3); }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; background: var(--gypsum); color: var(--obsidian); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
@media (max-width: 760px) {
  .nav a:not(.btn):not([href="support.html"]) { display: none; }
}
@media (max-width: 560px) {
  .home .nav a:not(.btn) { display: none; }
  .site-head .wrap { flex-wrap: nowrap; }
}
