/* 4kick — studio site. Tokens from the 4kick press kit (tokens.json): Paper is the default, data-theme="mono" for dark sections. Flat: no shadows, no gradients. */
:root, [data-theme="paper"] {
  --brand-ink: #0e0e0e;
  --brand-bone: #f2f0eb;
  --bg: #f2f0eb;
  --surface: #e7e4dd;
  --surface-strong: #dcd8cf;
  --ink: #0e0e0e;
  --ink-muted: #4a4741;
  --line: #cfcbc2;
}
[data-theme="mono"] {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --surface-strong: #262626;
  --ink: #f2f0eb;
  --ink-muted: #a8a49c;
  --line: #2e2e2e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="paper"]) {
    --bg: #0e0e0e; --surface: #1a1a1a; --surface-strong: #262626;
    --ink: #f2f0eb; --ink-muted: #a8a49c; --line: #2e2e2e;
  }
}
:root {
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --r-sm: 8px; --r-md: 20px; --r-icon: 22.5%; --r-pill: 999px;
  --max: 1120px;
  --gutter: var(--s6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
section, header, footer { background: var(--bg); color: var(--ink); }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* type */
.display-xl { font-weight: 700; font-size: clamp(56px, 9vw, 112px); line-height: 0.93; letter-spacing: -0.045em; margin: 0; }
.display { font-weight: 700; font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -0.04em; margin: 0; }
.h1 { font-weight: 700; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
.h2 { font-weight: 700; font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
.body-lg { font-size: 20px; line-height: 1.5; margin: 0; }
.small { font-size: 14px; line-height: 1.45; font-weight: 500; }
.label { font-size: 12px; line-height: 1.3; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--ink-muted); }
.tabular { font-variant-numeric: tabular-nums; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; }
.bar .logo img { height: 30px; width: auto; }
.bar nav { display: flex; gap: var(--s5); }
.bar nav a { text-decoration: none; color: var(--ink-muted); transition: color .15s; }
.bar nav a:hover { color: var(--ink); }

/* hero */
.hero { position: relative; overflow: hidden; }
.hero .grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
  opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.hero .wrap { position: relative; }
.hero-meta { display: flex; justify-content: space-between; gap: var(--s4); padding-top: var(--s7); border-top: 1px solid var(--line); }
.hero-body { padding: var(--s7) 0 var(--s6); }
.hero-body .body-lg { max-width: 36ch; margin-top: var(--s5); }

/* the 4/4 step sequencer: 16 steps, the kick lands on 1, 5, 9, 13 */
.seq { padding: var(--s5) 0 var(--s8); }
.seq-head { display: flex; justify-content: space-between; margin-bottom: var(--s3); }
.steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 6px; }
.step { height: 44px; border: 1px solid var(--line); border-radius: 6px; background: transparent; }
.step:nth-child(4n+1) { border-color: var(--ink-muted); }
.step:nth-child(4n+1)::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); margin: 18px auto 0; }
.steps.on .step { animation: tick 2s steps(1, end) infinite; }
.steps.on .step:nth-child(4n+1) { animation-name: kick; }
@keyframes tick { 0% { background: var(--surface-strong); } 6.25%, 100% { background: transparent; } }
@keyframes kick { 0% { background: var(--brand-bone); border-color: var(--brand-bone); } 6.25%, 100% { background: transparent; } }
.seq-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: var(--s2); }
.seq-foot span { border-top: 1px solid var(--line); padding-top: var(--s2); }
@media (prefers-reduced-motion: reduce) {
  .steps.on .step { animation: none; }
  .step:nth-child(4n+1) { background: var(--surface-strong); }
}

/* section frame */
.sec { padding: var(--s8) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); }
.sec-head .label { white-space: nowrap; }

/* apps */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.app { position: relative; display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); background: var(--surface); border-radius: var(--r-md); text-decoration: none; transition: background .15s; min-height: 360px; }
.app:hover { background: var(--surface-strong); }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.app-icon { width: 88px; height: 88px; border-radius: var(--r-icon); overflow: hidden; background: var(--surface-strong); }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.tag { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 12px; border: 1px solid var(--ink-muted); border-radius: var(--r-pill); color: var(--ink-muted); }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.app .one { color: var(--ink-muted); max-width: 34ch; }
.app-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.cta { display: inline-flex; align-items: center; gap: var(--s2); padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 500; font-size: 15px; }
.cta .arr { transition: transform .15s; }
.app:hover .cta .arr { transform: translate(2px, -2px); }

/* how we work */
.how { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.how > div { padding: var(--s5) var(--s4) 0 0; }
.how > div + div { padding-left: var(--s4); border-left: 1px solid var(--line); }
.how .display { margin-bottom: var(--s4); }
.how .body-lg b { font-weight: 700; }

/* contact + footer */
.contact { border-top: 1px solid var(--line); }
.contact .mail { display: inline-block; margin-top: var(--s5); text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.contact .mail:hover { color: var(--ink-muted); border-color: var(--ink-muted); }
.foot { padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: start; }
.foot .mark { width: 22px; height: 22px; }
.foot .legal { color: var(--ink-muted); max-width: 70ch; }
.foot .legal b { color: var(--ink); font-weight: 500; }
.foot .links { display: flex; gap: var(--s4); }
.foot .links a { text-decoration: none; color: var(--ink-muted); }
.foot .links a:hover { color: var(--ink); }

/* legal documents */
.doc { padding: var(--s7) 0 var(--s8); max-width: 720px; }
.doc .label { margin-bottom: var(--s3); display: block; }
.doc .updated { margin: var(--s3) 0 var(--s6); }
.doc h2 { font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; margin: var(--s6) 0 var(--s2); }
.doc p, .doc li { line-height: 1.6; }
.doc ul { padding-left: 20px; }
.doc a { text-underline-offset: 3px; }

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

@media (max-width: 860px) {
  :root { --gutter: var(--s3); }
  .bar nav { display: none; }
  .hero-meta { flex-direction: column; gap: var(--s1); padding-top: var(--s5); }
  .hero-body { padding: var(--s6) 0 var(--s5); }
  .steps { gap: 3px; }
  .step { height: 34px; border-radius: 4px; }
  .step:nth-child(4n+1)::after { margin-top: 13px; width: 5px; height: 5px; }
  .seq-foot { gap: 3px; }
  .seq { padding-bottom: var(--s7); }
  .sec { padding: var(--s7) 0; }
  .sec-head { flex-direction: column; gap: var(--s2); margin-bottom: var(--s5); }
  .apps { grid-template-columns: 1fr; }
  .app { min-height: 0; padding: var(--s4); }
  .app-icon { width: 72px; height: 72px; }
  .how { grid-template-columns: 1fr; border-top: 0; }
  .how > div, .how > div + div { padding: var(--s4) 0; border-left: 0; border-top: 1px solid var(--line); }
  .foot { grid-template-columns: 1fr; gap: var(--s3); }
}
