/* Nubb: ink on warm paper, one lime accent, square corners. Same language as the Nubb apps. */

@font-face {
  font-family: "Archivo";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #0a0a0a;
  --ink-soft: #1c1c1a;
  --paper: #f6f4f0;
  --paper-2: #efece5;
  --surface: #fcfbf8;
  --body: #3a3833;
  --muted: #6b675f;
  --line: #dcd8cf;
  --line-strong: #bdb8ad;
  --accent: #c1ff72;
  --side-line: #2a2926;
  --side-dim: #8f8c84;
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

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

.section--ink :focus-visible,
.contact :focus-visible {
  outline-color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  border: 1px solid var(--ink);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow--dim {
  color: var(--side-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    filter 0.15s,
    background 0.15s,
    color 0.15s;
}
.btn--accent {
  background: var(--accent);
  color: var(--ink);
}
.btn--accent:hover {
  filter: brightness(0.94);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--sm {
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
}
.btn--lg {
  height: 58px;
  padding: 0 28px;
  font-size: 17px;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body);
}
.tag--live {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--ink);
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  border: 1px solid var(--ink);
}
.brand__name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.brand--small .brand__name {
  font-size: 18px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a:not(.btn) {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--body);
}
.nav a:not(.btn):hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: transform 0.2s;
}
.menu-toggle__bars {
  top: 20px;
}
.menu-toggle__bars::before {
  left: 0;
  top: -6px;
}
.menu-toggle__bars::after {
  left: 0;
  top: 6px;
}
.menu-open .menu-toggle__bars {
  background: transparent;
}
.menu-open .menu-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: clamp(48px, 9vw, 120px) 0 clamp(56px, 8vw, 104px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__title {
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.mark {
  background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__lead {
  margin-top: 28px;
  max-width: 58ch;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--body);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.panel {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 10px 10px 0 var(--accent);
}
.panel__head,
.panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--side-dim);
}
.panel__head {
  border-bottom: 1px solid var(--side-line);
}
.panel__foot {
  border-top: 1px solid var(--side-line);
}
.panel__list {
  list-style: none;
  padding: 0;
}
.panel__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--side-line);
  font-weight: 700;
  font-size: 17px;
}
.panel__list li:last-child {
  border-bottom: 0;
  color: var(--side-dim);
}
.panel__list .tag {
  border-color: var(--side-line);
  color: var(--side-dim);
}
.panel__list .tag--live {
  border-color: var(--accent);
  color: var(--ink);
}
.dot {
  width: 8px;
  height: 8px;
  background: var(--side-dim);
}
.dot--live {
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.bar {
  flex: 1;
  height: 4px;
  background: var(--side-line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  animation: load 2.8s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@keyframes load {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(260%);
  }
}

/* Strip */
.strip {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--surface);
}
.strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.strip__grid > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
  font-weight: 700;
  font-size: 16px;
}
.strip__grid > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.strip__k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--paper2 {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.section__head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section__title {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.section__lead {
  margin-top: 20px;
  font-size: 18px;
  color: var(--body);
  max-width: 60ch;
}
.section--ink .section__lead {
  color: #c9c6bf;
}

/* Product cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: background 0.2s;
}
.card:hover {
  background: #fff;
}
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--accent);
}
.card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}
.card__title {
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.card__text {
  color: var(--body);
}
.card__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.card__list li {
  display: flex;
  gap: 10px;
}
.card__list li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--accent);
  border: 1px solid var(--ink);
}
.card__link {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.card__link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--side-line);
}
.service {
  padding: 32px 28px 8px 0;
  border-right: 1px solid var(--side-line);
}
.service + .service {
  padding-left: 28px;
}
.service:last-child {
  border-right: 0;
}
.service__k {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.service h3 {
  margin: 14px 0 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.service p {
  color: #c9c6bf;
  font-size: 15px;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 28px 24px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  background: var(--accent);
  font-weight: 800;
  font-size: 18px;
}
.step h3 {
  margin: 20px 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.step p {
  color: var(--body);
  font-size: 15px;
}

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
}
.about__body > p {
  font-size: 19px;
  color: var(--body);
}
.principles {
  list-style: none;
  padding: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line-strong);
}
.principles li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--body);
}
.principles strong {
  color: var(--ink);
}

/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
}
.contact__box {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
.contact__title {
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.contact__lead {
  margin-top: 20px;
  color: #c9c6bf;
  font-size: 18px;
  max-width: 48ch;
}
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.contact__actions .btn {
  max-width: 100%;
}
.contact__hint {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--side-dim);
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contact__links a {
  padding: 8px 12px;
  border: 1px solid var(--side-line);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.contact__links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__copy,
.footer__mail {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.footer__mail {
  text-decoration: none;
}
.footer__mail:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .services,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .service {
    border-bottom: 1px solid var(--side-line);
    padding-bottom: 28px;
  }
  .service:nth-child(2n) {
    border-right: 0;
  }
  .service:nth-child(2n + 1) {
    padding-left: 0;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s,
      transform 0.2s,
      visibility 0.2s;
  }
  .menu-open .nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav a:not(.btn) {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 18px;
  }
  .nav .btn {
    margin-top: 16px;
    height: 48px;
  }
  .hero__grid,
  .about,
  .contact__box {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__panel {
    max-width: 480px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strip__grid > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .strip__grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .services,
  .steps,
  .strip__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .service,
  .service + .service {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }
  .strip__grid > div + div {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
  .hero__actions .btn,
  .contact__actions .btn {
    width: 100%;
  }
  .btn--lg {
    font-size: 15px;
    padding: 0 16px;
  }
  .panel {
    box-shadow: 6px 6px 0 var(--accent);
  }
}

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