/* ZigaBit — zigabit.uk
   Clean black & white. No frameworks, no fonts to load, no JavaScript. */

:root {
  --fg: #0a0a0a;
  --bg: #ffffff;
  --mut: #5c5c5c;
  --line: #0a0a0a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--fg); color: var(--bg); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.mark { width: 18px; height: 18px; display: block; }

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit;
  text-decoration: none;
  margin-left: clamp(14px, 3vw, 32px);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover { border-bottom-color: currentColor; }

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

.hero { padding-block: clamp(5rem, 13vh, 9rem) clamp(4.5rem, 11vh, 7.5rem); }

.bits-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2.25rem;
}

.bits { display: inline-flex; gap: 6px; }

.bit {
  width: 11px;
  height: 11px;
  border: 1px solid var(--fg);
}

.bit.on { background: var(--fg); }

.bits-note {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mut);
}

h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 1.75rem;
}

.cursor {
  display: inline-block;
  width: 0.42em;
  height: 0.82em;
  margin-left: 0.1em;
  transform: translateY(0.06em);
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--mut);
  max-width: 52ch;
  margin-bottom: 2.75rem;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: var(--bg); color: var(--fg); }

.btn.ghost { background: var(--bg); color: var(--fg); }

.btn.ghost:hover { background: var(--fg); color: var(--bg); }

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

.sec {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 65px;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.sec-head .note { color: var(--mut); }

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* ---------- Services ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.card .idx {
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: auto;
  padding-bottom: 2rem;
}

.card h3 { font-size: 1.35rem; letter-spacing: -0.01em; }

.card p { color: var(--mut); font-size: 0.975rem; line-height: 1.55; max-width: 42ch; }

.card:hover { background: var(--fg); color: var(--bg); }

.card:hover p { color: rgba(255, 255, 255, 0.72); }

/* ---------- Approach (inverted) ---------- */

.inv { background: var(--fg); color: var(--bg); }

.inv .sec-head .note { color: rgba(255, 255, 255, 0.6); }

.statement {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 26ch;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.principle {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 1.25rem;
}

.principle h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }

.principle p { color: rgba(255, 255, 255, 0.65); font-size: 0.95rem; }

/* ---------- Contact ---------- */

.mail {
  font-family: var(--mono);
  font-size: clamp(1.25rem, 4.5vw, 2.75rem);
  color: inherit;
  text-decoration: none;
  display: inline-block;
  border-bottom: 2px solid var(--fg);
  padding: 0.05em 0.12em;
  margin: 0 0 clamp(2.5rem, 6vw, 4rem) -0.12em;
  transition: background 0.15s ease, color 0.15s ease;
}

.mail:hover { background: var(--fg); color: var(--bg); }

.contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.contact-item { display: flex; flex-direction: column; gap: 0.35rem; }

.contact-item .k {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mut);
}

.contact-item a {
  font-family: var(--mono);
  font-size: 13px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  width: fit-content;
}

.contact-item a:hover { border-bottom-color: currentColor; }

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

.footer { border-top: 1px solid var(--line); }

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.75rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mut);
}

/* ---------- 404 ---------- */

.err { padding-block: clamp(6rem, 18vh, 12rem); }

.err .code {
  font-family: var(--mono);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
}

.err p { color: var(--mut); margin-bottom: 2.5rem; }

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

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card .idx { padding-bottom: 1.25rem; }
  .principles { grid-template-columns: 1fr; gap: 1.75rem; }
  .contacts { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 520px) {
  .br-d { display: none; }
  .nav-links a { margin-left: 12px; font-size: 11px; letter-spacing: 0.04em; }
  .sec-head .note { display: none; }
}

@media (max-width: 360px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .btn, .card, .mail { transition: none; }
}
