/* w4n.io root: a light, quiet index of the apps. Colour comes from the apps' own icons. */

:root {
  --page: #ffffff;
  --band: #f5f6f8;
  --ink: #12151a;
  --body: #2c313a;
  --dim: #5a616d;
  --line: #e2e4e9;
  --tag-bg: #ecebff;
  --tag-ink: #3f2fb0;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;   /* light only, by request */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--ink); }
a { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: 74rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 6px; z-index: 5; }
.skip:focus { left: .5rem; }

/* ---------- header ---------- */

.top { border-bottom: 1px solid var(--line); background: var(--page); position: sticky; top: 0; z-index: 4; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }

.mark { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; text-decoration: none; }

.nav { display: flex; gap: clamp(1rem, 3vw, 1.75rem); }
.nav a { color: var(--dim); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero { background: var(--band); border-bottom: 1px solid var(--line); padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__sub { max-width: 37rem; margin-top: 1.5rem; font-size: 1.125rem; color: var(--dim); }

.jump { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: clamp(2rem, 5vw, 3rem); }
.jump a {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .9rem .4rem .45rem;
  background: var(--page); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.jump a:hover { border-color: var(--ink); }
.jump img { width: 28px; height: 28px; border-radius: 8px; display: block; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-block; padding: .7rem 1.2rem; border-radius: 8px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.btn:hover { background: #2b303a; }
.btn--quiet { background: var(--page); color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--page); border-color: var(--ink); }
.jump__label { margin-top: clamp(2.5rem, 6vw, 3.5rem); color: var(--dim); font-size: .875rem; font-weight: 500; }
.jump__label + .jump { margin-top: .75rem; }

.nav { align-items: center; }
.nav .nav__cta { color: #fff; background: var(--ink); padding: .45rem .9rem; border-radius: 8px; font-weight: 600; }
.nav .nav__cta:hover { color: #fff; background: #2b303a; }
@media (max-width: 700px) { .nav a:not(.nav__cta) { display: none; } }

/* ---------- services ---------- */

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.services li { padding-block: 1.75rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.services h3, .steps h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.services p { margin-top: .45rem; }
.services .proof { margin-top: auto; padding-top: 1rem; color: var(--dim); font-size: .875rem; }
.proof a { font-weight: 600; text-underline-offset: .2em; text-decoration-thickness: 1px; text-decoration-color: #b4b9c2; }
.proof a:hover { text-decoration-color: var(--ink); }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .services { grid-template-columns: 1fr; } }

/* ---------- process ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 2.5rem; padding-top: 2.25rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 2rem; height: 2rem; margin-bottom: .9rem; border-radius: 50%;
  border: 1px solid var(--ink); color: var(--ink); font-weight: 600; font-size: .9375rem;
}
.steps p { margin-top: .4rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .steps { grid-template-columns: 1fr; } }

.contact__lead { margin-top: .75rem; font-size: 1.0625rem; color: var(--ink); }
.contact__note { margin-top: .6rem; color: var(--dim); font-size: .9375rem; }

/* ---------- contact form ---------- */

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; max-width: 40rem; }
.field--wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .9375rem; color: var(--ink); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; padding: .65rem .8rem;
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid #c3c7cf; border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 9rem; display: block; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field__error { color: #b3261e; font-size: .875rem; margin-top: .3rem; }
.field__error:empty { display: none; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.form button.btn { font-family: inherit; cursor: pointer; }
.form button.btn:disabled { opacity: .6; cursor: default; }
.form__status { font-size: .9375rem; font-weight: 500; }
.form__status[data-kind="ok"] { color: #1a6b3c; }
.form__status[data-kind="error"] { color: #b3261e; }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } }

/* ---------- section heads ---------- */

.sechead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem;
  padding-top: clamp(2.75rem, 6vw, 4.5rem); padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
}
.sechead h2, .contact h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.02em; }
.sechead p { color: var(--dim); font-size: .9375rem; }

/* ---------- apps ---------- */

.app {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) minmax(0, 16rem);
  gap: 1.5rem 2.5rem;
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}

.app__id { display: flex; gap: 1rem; align-items: flex-start; }
.app__icon { width: 64px; height: 64px; border-radius: 15px; display: block; flex: none; box-shadow: 0 0 0 1px var(--line); }
.app__id h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.app__kind { color: var(--dim); font-size: .9375rem; margin-top: .2rem; }

.tag {
  display: inline-block; vertical-align: .14em; margin-left: .3rem;
  padding: .05rem .5rem; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-ink);
  font-size: .75rem; font-weight: 600; letter-spacing: 0;
}

.app__desc { font-size: 1.0625rem; color: var(--ink); max-width: 36rem; }

.feats { margin-top: 1rem; max-width: 36rem; }
.feats li { position: relative; padding-left: 1.1rem; margin-top: .4rem; }
.feats li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: #a3a9b4; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.5rem; font-size: .9375rem; }
.links a { font-weight: 600; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: #b4b9c2; }
.links a:hover { text-decoration-color: var(--ink); }
.links .btn { padding: .55rem 1.05rem; color: #fff; text-decoration: none; }

.facts { font-size: .9375rem; align-self: start; border-top: 1px solid var(--line); }
.facts > div { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--dim); font-size: .8125rem; font-weight: 500; }
.facts dd { color: var(--ink); margin-top: .1rem; }

@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); }
  .app__id { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app__icon { width: 52px; height: 52px; border-radius: 12px; }
}

/* ---------- approach ---------- */

.approach { background: var(--band); border-block: 1px solid var(--line); margin-top: clamp(2.75rem, 6vw, 4.5rem); padding-bottom: clamp(2.75rem, 6vw, 4.5rem); }
.approach .sechead { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.approach .app:last-of-type { border-bottom: 0; }

.tenets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3.5rem; padding-top: 2.25rem; }
.tenets h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.tenets p { margin-top: .4rem; max-width: 32rem; }
@media (max-width: 700px) { .tenets { grid-template-columns: 1fr; } }

/* the last app sits directly above the tinted band, so it needs no rule of its own */
#nms { border-bottom: 0; }

/* ---------- contact ---------- */

.contact {
  display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: .75rem 2.5rem;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.contact p { max-width: 36rem; }
.contact a { font-weight: 600; text-underline-offset: .2em; }
@media (max-width: 700px) { .contact { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: .9375rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.75rem 2.25rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
