/* Clippy landing page. Tokens mirror docs/12-design.md; fonts are bundled, nothing loads from a CDN. */
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-display: swap; src: url("fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 400; font-display: swap; src: url("fonts/space-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 700; font-display: swap; src: url("fonts/space-mono-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #dcebfe;
  --surface: #ffffff;
  --ink: #000000;
  --ink-soft: #2f2f2f;
  --main: #5294ff;
  --warn: #facc00;
  --ok: #05e17a;
  --bad: #ff4d50;
  --violet: #7a83ff;
  --bw: 3px;
  --r: 6px;
  --sh: 6px 6px 0 0 var(--ink);
  --sh-sm: 3px 3px 0 0 var(--ink);
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.02; letter-spacing: -0.045em; }
h1 { font-size: clamp(2.9rem, 8.4vw, 6.3rem); }
h2 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h3 { font-size: 1.55rem; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34rem; }
.small { font-size: 0.9rem; color: var(--ink-soft); }

/* ---- primitives ---- */
.btn {
  font: inherit; font-weight: 800; color: var(--ink); text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.35rem; background: var(--surface);
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh);
  transition: transform 150ms, box-shadow 150ms;
}
.btn:hover, .btn:active { transform: translate(6px, 6px); box-shadow: none; }
.btn.main { background: var(--main); }
.btn.warn { background: var(--warn); }
.btn.sm { padding: 0.45rem 0.9rem; font-size: 0.95rem; box-shadow: var(--sh-sm); }
.btn.sm:hover { transform: translate(3px, 3px); }
.kbd {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 0.8em; line-height: 1.5;
  padding: 0 0.4em; background: var(--warn); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 2px 2px 0 0 var(--ink);
  white-space: nowrap;
}
.chip {
  display: inline-block; padding: 0.1rem 0.7rem; font-weight: 700; font-size: 0.9rem;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 2px 2px 0 0 var(--ink);
}
.block { border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); background: var(--surface); }

/* ---- header ---- */
.top { border-bottom: var(--bw) solid var(--ink); background: var(--surface); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; }
.brand img { width: 2.4rem; height: 2.4rem; border: 2px solid var(--ink); border-radius: var(--r); }
.top nav { display: flex; align-items: center; gap: 1.4rem; font-weight: 700; }
.top nav a:not(.btn) { text-decoration: none; }
.top nav a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (max-width: 40rem) { .top nav a:not(.btn) { display: none; } }

/* ---- hero ---- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-note { margin-top: 1.25rem; }
@media (max-width: 56rem) { .hero .wrap { grid-template-columns: 1fr; } }

/* the replica popup */
.demo { position: relative; }
.demo-hint { margin-bottom: 0.7rem; font-weight: 700; }
.pop { padding: 0.75rem; background: var(--bg); transform: rotate(1.2deg); }
.pop-search {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; margin-bottom: 0.7rem;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r);
}
.pop-search svg { width: 1.1rem; height: 1.1rem; flex: none; }
.pop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); }
.pop-search:focus-within { box-shadow: var(--sh-sm); }
.pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; max-height: 21rem; overflow: auto; }
.pop-item {
  display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.65rem; background: var(--surface); cursor: pointer;
  border: 2px solid var(--ink); border-radius: var(--r);
}
.pop-item[aria-selected="true"] { background: var(--main); box-shadow: var(--sh-sm); }
.pop-ico { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--warn); font-family: var(--mono); font-weight: 700; font-size: 0.85rem; }
.pop-ico.img { background: linear-gradient(135deg, var(--violet) 0 50%, var(--ok) 50% 100%); }
.pop-ico.file { background: var(--ok); }
.pop-ico.link { background: var(--surface); }
.pop-txt { min-width: 0; }
.pop-txt b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-txt small { color: var(--ink-soft); font-size: 0.78rem; }
.pop-item[aria-selected="true"] small { color: var(--ink); }
.pop-meta { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }
.pop-empty { padding: 1.2rem 0.4rem; font-weight: 700; }
.pop-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.7rem; font-size: 0.8rem; font-weight: 700; }
.paste { margin-top: 1.4rem; padding: 0.9rem 1rem; min-height: 6.2rem; background: var(--surface); transform: rotate(-0.8deg); }
.paste-label { display: block; margin-bottom: 0.35rem; font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); }
.paste-body { font-family: var(--mono); font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; min-height: 2.8rem; }
.paste-body:empty::before { content: "Kosong. Pilih sesuatu di atas, lalu Enter."; color: var(--ink-soft); }
.paste.flash { animation: flash 420ms steps(2, jump-none); }
@keyframes flash { 0% { background: var(--warn); } 100% { background: var(--surface); } }

/* ---- sections ---- */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head p { margin-top: 1rem; font-size: 1.15rem; }
.band { border-block: var(--bw) solid var(--ink); }
.band.white { background: var(--surface); }
.band.yellow { background: var(--warn); }

/* usp: deliberately uneven grid */
.usp { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.75rem; }
.usp > article { padding: 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; }
.u-light { grid-column: span 7; background: var(--main) !important; }
.u-local { grid-column: span 5; }
.u-shot { grid-column: span 12; }
.u-keys { grid-column: span 5; background: var(--warn) !important; }
.u-hist { grid-column: span 7; }
@media (max-width: 56rem) { .usp > article { grid-column: span 12 !important; } }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin-top: 0.4rem; }
.num { padding: 0.8rem 0.9rem; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); }
.num b { display: block; font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; white-space: nowrap; }
.num span { display: block; margin-top: 0.3rem; font-size: 0.85rem; font-weight: 700; line-height: 1.3; }
@media (max-width: 34rem) { .nums { grid-template-columns: 1fr; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 1.1rem; height: 1.1rem; background: var(--ok); border: 2px solid var(--ink); border-radius: 3px; }
.keys { display: grid; gap: 0.7rem; margin-top: 0.3rem; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.8rem; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); font-weight: 700; }
.key-row .kbd { background: var(--bg); }
.key-row > span:last-child { white-space: nowrap; flex: none; }

/* annotate demo */
.shot { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 56rem) { .shot { grid-template-columns: 1fr; } }
.tools { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.tool { font: inherit; font-weight: 800; cursor: pointer; padding: 0.4rem 0.85rem; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); transition: transform 150ms, box-shadow 150ms; }
.tool:hover { transform: translate(3px, 3px); box-shadow: none; }
.tool[aria-pressed="true"] { background: var(--main); box-shadow: none; transform: translate(3px, 3px); }
.canvas { background: var(--surface); padding: 0.6rem; }
.canvas svg { width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 4px; }
.ann { opacity: 0; }
.ann.on { opacity: 1; }
.ann.on .draw { stroke-dasharray: 400px; stroke-dashoffset: 400px; animation: draw 520ms ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* downloads */
.dl { display: grid; gap: 1.5rem; }
.dl-row { display: grid; grid-template-columns: 11rem 1fr; gap: 0; background: var(--surface); }
.dl-os { padding: 1.3rem; border-right: var(--bw) solid var(--ink); display: flex; flex-direction: column; gap: 0.6rem; }
.dl-os h3 { font-size: 1.8rem; }
.dl-body { padding: 1.3rem; display: grid; gap: 1rem; }
.dl-files { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.dl-file { display: grid; gap: 0.2rem; }
.dl-file .btn { width: 100%; }
.dl-file small { font-family: var(--mono); font-size: 0.74rem; font-weight: 700; }
.dl-row.mine { background: var(--ok); }
.dl-row.mine .dl-os { background: var(--surface); }
.tag { align-self: flex-start; padding: 0 0.5rem; font-size: 0.8rem; font-weight: 800; background: var(--warn); border: 2px solid var(--ink); border-radius: var(--r); }
.tag.ok { background: var(--ok); }
@media (max-width: 44rem) { .dl-row { grid-template-columns: 1fr; } .dl-os { border-right: 0; border-bottom: var(--bw) solid var(--ink); } }
.honest { margin-top: 2.2rem; padding: 1.4rem 1.6rem; background: var(--surface); }
.honest h3 { margin-bottom: 0.8rem; }
.honest ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
code, .mono { font-family: var(--mono); font-size: 0.88em; font-weight: 700; }

/* donate (mirrors metabye) */
.donate { position: relative; max-width: 50rem; padding: 2rem 1.6rem 1.8rem; background: var(--surface); }
.donate-badge {
  position: absolute; top: -2rem; right: 1.2rem; display: grid; place-items: center; width: 4.4rem; height: 4.4rem;
  background: var(--main); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm);
  font-size: 2.3rem; line-height: 1; transform: rotate(8deg);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.donate h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); padding-right: 4.5rem; margin-bottom: 0.7rem; }
.donate p { max-width: 36rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0 1.5rem; padding: 0; list-style: none; }
.emo { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@media (max-width: 40rem) { .donate .btn { width: 100%; } }

/* footer (same pattern as metabye) */
.foot { border-top: var(--bw) solid var(--ink); background: var(--surface); padding-block: 1.75rem 2.5rem; font-size: 0.97rem; }
.foot p { margin: 0 0 0.45rem; max-width: 46rem; }
.foot p a { font-weight: 700; color: #1f3bff; text-underline-offset: 3px; }
.made-by { display: flex; align-items: center; margin-bottom: 0.9rem; }
.wtf { display: inline-flex; align-items: baseline; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.wtf i { display: inline-block; width: 0.26em; height: 0.26em; margin-left: 0.05em; background: #ff4a17; }
.stripe { display: inline-flex; margin-left: 0.75rem; border: 2px solid var(--ink); }
.stripe i { width: 0.7rem; height: 0.7rem; }
.stripe i:nth-child(1) { background: #1f3bff; }
.stripe i:nth-child(2) { background: #ff4a17; }
.stripe i:nth-child(3) { background: #f5c000; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tool { transition: none; }
  .paste.flash { animation: none; }
  .ann.on .draw { animation: none; stroke-dashoffset: 0; }
}

.mt { margin-top: 0.8rem; }
.pop-foot .kbd { margin-right: 0.3rem; }
